Documentation Index
Fetch the complete documentation index at: https://docs.svantic.com/llms.txt
Use this file to discover all available pages before exploring further.
Smart agents
A smart agent is an agent that plans its own work. You give it instructions and an LLM, and it decides which of its capabilities to call, in what order, to satisfy a natural-language task. Regular agents (what the Defining capabilities guide produces) are tool servers — they expose capabilities and wait to be told which to call. Smart agents expose the same capabilities but can also be handed a free-form prompt.Turning an agent into a smart agent
Addinstructions and llm to the agent config:
- Structured invocation — a caller invokes
lookup_invoicedirectly viaRemoteAgent.invoke_capability. Instructions and the LLM are bypassed. - Natural language — a caller sends a text message via
RemoteAgent.send(...). The LLM plans which capability (or capabilities) to call.
Picking a provider
LlmConfig.provider accepts 'gemini', 'openai', 'anthropic'. API keys come from the config or a matching environment variable:
| Provider | Env var | Default model |
|---|---|---|
gemini | GOOGLE_API_KEY | gemini-2.0-flash |
openai | OPENAI_API_KEY | gpt-4o |
anthropic | ANTHROPIC_API_KEY | claude-sonnet-4-20250514 |
model for long-context / reasoning variants:
LlmConfig for every option.
Writing good instructions
- Address the agent directly (“You are…”). The system-prompt framing matters.
- Enumerate capabilities by name when the intent→capability mapping isn’t obvious from descriptions. Mention them in backticks.
- Be explicit about what not to do. Destructive capabilities deserve explicit guardrails in the instructions (“Never issue a refund larger than $500 without calling
check_policyfirst”). - Keep it under ~500 tokens. Long instructions cost money on every turn.
Capability descriptions matter more, not less
Smart agents pick capabilities by reading their descriptions. If the planner is picking the wrong tool, sharpen the description before touching the instructions. Good: “Return the line items and total for a given invoice. Use this whenever the user asks about invoice contents, charges, or breakdowns.” Less good: “Looks up an invoice.”Mixing smart and structured
Smart agents can delegate to other agents viaRemoteAgent inside a capability handler. This is the most common way to compose a larger system:
