Extension Guide
ARES is designed for extension at every layer. Each section below references the exact SDK option or interface to implement.
Add an LLM provider
The SDK ships with built-in support for OpenAI, Ollama, Anthropic, and OpenRouter. To use a custom provider:
- Implement the
llm.Clientinterface (Generate,Chat,GenerateEmbedding,GenerateStream). - Construct a
*core.LLMConfigwith your provider name and base URL. - Pass it via
sdk.WithLLMConfig(cfg)or add failover withsdk.WithFallbackLLM(cfg).
Add a custom tool
- Implement the
tools.Toolinterface (Name,Description,Execute,Parameters,Capabilities), or wrap a function withtools.ToolFunc. - Register it:
runtime.RegisterTool(myTool), or pass it as ansdk.WithToolagent option. - For idempotent (retry-safe) tools in the sub-agent, type-assert the
ToolBinderto*toolBinderand callBindIdempotentTool.
Add a knowledge store backend
- Implement the
knowledge.KnowledgeStoreinterface (13 methods includingStore,Query,HybridSearch,FindDuplicate). - Wire it via
sdk.WithKnowledgeStore(myStore)or register it as aprovider.GraphProviderwithsdk.WithKnowledgeProvider.
Add a strategy source
- Implement
agents.StrategySourcereturning the liveActiveStrategy(prompt + LLM params). - Inject it via
leader.WithStrategySource(src)orsub.WithStrategySource(src)when constructing agents.
Add an MCP server connection
- Start an MCP server exposing tools over stdio.
- Connect with
sdk.WithMCP(MCPConn{Command: "...", Args: []string{...}}). Discovered tools are auto-registered into the tool registry.
Tune the knowledge quality gate
Use sdk.WithAKGQualityGate(knowledge.QualityGateConfig{...}) to adjust the
extraction / consistency / freshness / usage weights and score thresholds that
gate which candidates become active KnowledgeObjects.