# xtrm-agent — Claude Code Instructions ## Project Multi-agent AI automation system with shared message bus, specialized roles, and deny-by-default security. ## Stack - Python 3.12+, uv for dependency management - Anthropic SDK for Claude, LiteLLM for DeepSeek/Kimi/MiniMax - discord.py for Discord, prompt-toolkit + rich for CLI - MCP Python SDK for tool server connections - Pydantic for config validation, typer for CLI ## Structure - `xtrm_agent/` — Main package - `xtrm_agent/llm/` — LLM providers (Anthropic, LiteLLM) - `xtrm_agent/tools/` — Tool registry, builtins, approval, MCP, delegate - `xtrm_agent/channels/` — CLI and Discord channels - `agents/` — Agent definitions (markdown + YAML frontmatter) - `config.yaml` — Main configuration ## Commands - `uv run xtrm-agent chat` — Interactive REPL - `uv run xtrm-agent chat -m "msg"` — Single-shot - `uv run xtrm-agent serve` — Production (Discord + all agents) - `uv run xtrm-agent status` — Show config - `uv run xtrm-agent agents` — List agents ## Key Patterns - Message bus (asyncio queues) decouples channels from agents - Router resolves @mentions, channel defaults, delegation targets - Per-agent tool filtering via registry.filtered() - Deny-by-default approval engine - Agent definitions in markdown with YAML frontmatter - Inter-agent delegation via DelegateTool + AgentMessage bus