agent-tool
Installation
SKILL.md
Add an Agent Tool ({{ cookiecutter.ai_framework }})
Agent tools live in backend/app/agents/tools/ and are surfaced to the model so it can call them mid-conversation. The assistant is defined in backend/app/agents/.
Steps
-
Write the tool function in
backend/app/agents/tools/<tool_name>.py:- Async, fully type-hinted, with a clear docstring — the docstring and signature are what the model sees, so make them precise.
- Pure logic: take typed args, return a JSON-serializable result. Raise on hard errors; return a structured
{"error": ...}for soft failures the model should reason about. - Keep secrets/IO behind
settingsand the service layer; don't inline credentials.
-
Export it from
backend/app/agents/tools/__init__.py(add the import and append to__all__, matching the existing feature-gated blocks).