# Single Agent Configuration Example # # This demonstrates configuring a single AI agent with tools and MCP support. [agent] cwd = "." # Provider configuration - supports env var interpolation provider = "openai" model = "${MODEL:-gpt-4}" # api_key = "${OPENAI_API_KEY}" # Uncomment to use API key from env # Tools available to the agent # Can be builtin tools or MCP tools using patterns: # - "edit" - builtin tool # - "github.*" - all tools from github MCP server # - "github.search_repos" - specific tool from github MCP server tools = [ "read_tool", "index", "edit", "shell", "glob", "search_text" ] # System prompt - can be a string, array of strings, or mixed with file references: # system = "inline prompt" # system = ["part1", "part2"] # system = ["inline", { file = "prompts/assistant.md" }] system = "You are a helpful coding assistant." # Optional: Middleware for advanced behavior # Uncomment to enable plan mode (read-only observation and planning) # [[middleware]] # type = "plan_mode" # enabled = true # reminder = "You are in plan mode. Only observe, analyze, and plan. Do not make changes." # Uncomment to enable context management with auto-compaction # Note: auto_compact is controlled by [agent.execution.compaction].auto # [[middleware]] # type = "context" # warn_at_percent = 80 # fallback_max_tokens = 64000 # Uncomment to enable duplicate code detection # [[middleware]] # type = "dedup_check" # threshold = 0.85 # min_lines = 5 # Optional: MCP servers for external tools # [[mcp]] # name = "github" # transport = "stdio" # command = "npx" # args = ["-y", "@anthropic/mcp-server-github"] # env = { GITHUB_TOKEN = "${GITHUB_TOKEN}" }