aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2026-03-09 12:31:27 +0100
committerAlexander Potapenko <glider@google.com>2026-03-09 15:11:02 +0000
commitd8745277da1fb53808dc64e2e26bc8984b5bc625 (patch)
treeb62170495514572aa1c65c98ece175ae0afdcd9f /pkg
parent0bd2cd434805ad8cc1e7b854025fa1d2e1a192cb (diff)
pkg/aflow: instructions for implementing tools in GEMINI.md
Provide some instructions on how tools should be named, implemented and registered. Update #6878
Diffstat (limited to 'pkg')
-rw-r--r--pkg/aflow/GEMINI.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/aflow/GEMINI.md b/pkg/aflow/GEMINI.md
index 1d8a610e9..73808137c 100644
--- a/pkg/aflow/GEMINI.md
+++ b/pkg/aflow/GEMINI.md
@@ -45,6 +45,11 @@ Workflows are typically registered using `aflow.Register`.
- First commit is better to be the simplest possible workflow definition without new tools.
Commit `pkg/aflow: repro workflow skeleton` is an example.
+### Implementing Tools
+- Tool names (the first string argument to `aflow.NewFuncTool`) should use `lowercase-with-dashes` instead of `CamelCase`.
+- If a tool does not refer to the kernel state or checkout path, declare its state parameter directly as `state struct{}` in the function signature, instead of defining an empty struct type.
+- When registering tools for an `LLMAgent`, **always** use `aflow.Tools(tool1, tool2, toolSlice...)` to avoid aliasing issues that can occur when combining slices of tools. Do not use standard `append()` or `[]aflow.Tool{...}` literal initializations when combining or adding to existing tool sets.
+
### LLM Integration
- **Models**: Prefer `aflow.GoodBalancedModel` (Flash) for simple tasks and `aflow.BestExpensiveModel` (Pro)