pip install ayder-cli==2.5.1 Copy PIP instructions
A multi-provider AI agent chat client for your terminal. ayder supports Ollama, Anthropic Claude, OpenAI, Gemini, or any OpenAI-compatible API and provides an autonomous coding assistant with file system tools and shell access.
Provider SDKs are now optional. The core install ships only OpenAI + Ollama (plus DeepSeek, which reuses the OpenAI SDK); Anthropic, Google, Qwen, and GLM are opt-in extras -- install only what you use. Selecting a driver whose package isn't installed fails fast with the exact pip install command and a list of the drivers available in your install. See CHANGELOG.md and Installation.
Upgrading from 1.x (breaking): anthropic and google are no longer installed by default. Run pip install ayder-cli[anthropic] / [google] (or [all]) if you use them.
Most AI coding assistants require cloud APIs, subscriptions, or heavy IDE plugins. ayder-cli takes a different approach:
LLMs on their own can only generate text. To be a useful coding assistant, the model needs to act on your codebase. ayder-cli ships 16 built-in tools that the model can call, plus optional plugin toolsets (see Plugins):
Each tool has an OpenAI-compatible JSON schema so models that support function calling can use them natively. For models that don't, ayder-cli also parses a custom XML-like syntax ( value ) as a fallback.
Requires Python 3.12+. Works best with uv. If you don't have uv in your path, get it from Astral uv.
Core install (OpenAI + Ollama, plus DeepSeek which reuses the OpenAI SDK):
pip install ayder-cli Optional providers (install only what you use):
pip install ayder-cli[anthropic] # Claude pip install ayder-cli[google] # Gemini pip install ayder-cli[qwen] # Qwen (dashscope) pip install ayder-cli[glm] # GLM (zhipuai) pip install ayder-cli[all] # everything If you select a driver whose package isn't installed, ayder prints the exact install command and lists the drivers available in your install.
# Install to user environment (uv tool) uv tool install ayder-cli # Or for nightly / development builds: git clone https://github.com/ayder/ayder-cli.git cd ayder-cli # Install in development mode python3.12 -m venv .venv source .venv/bin/activate uv pip install -e . # Or as a uv tool (always on the path) uv tool install -e . Ollama setup (default provider) # Make sure Ollama is running with a model ollama pull qwen3-coder ollama serve # Optional: optimize Ollama for your model export OLLAMA_CONTEXT_LENGTH=65536 export OLLAMA_FLASH_ATTENTION=true export OLLAMA_MAX_LOADED_MODELS=1 Cloud providers Add an API key to a profile in ~/.ayder/config.toml (see Configuration below) and switch provider in the TUI:
/provider anthropic # or: openai, google, deepseek, qwen, glm Note: anthropic and google require the corresponding optional extra (see Installation above). openai, ollama, and deepseek are included in the core install.
ayder-cli uses a flexible profile-based configuration system. On the first run, it creates a config file at ~/.ayder/config.toml.
The generated file includes an [llm.evren] profile for the evren gateway (https://evren-llmapi.ssyz.org.tr/v1) with an empty api_key. Fill in your key and switch to it with /provider evren.
Because profiles are just names, you can configure the same model to run through different drivers:
config_version = "2.0" [app] provider = "qwen_local" # <--- Currently using the local Ollama version # --- Profiles --- # 1. Local Qwen via Ollama driver [llm.qwen_local] driver = "ollama" base_url = "http://localhost:11434" model = "qwen2.5-coder:latest" num_ctx = 65536 # 2. Cloud Qwen via OpenAI driver (e.g., DeepInfra, Together) [llm.qwen_cloud] driver = "openai" base_url = "https://api.deepinfra.com/v1/openai" api_key = "sk-..." model = "Qwen/Qwen2.5-Coder-32B-Instruct" num_ctx = 65536 In the TUI, typing /provider qwen_cloud seamlessly switches from your local GPU to the cloud endpoint.
config_version = "2.0" [app] provider = "openai" # Active provider profile name editor = "vim" # Editor for /task-edit command verbose = false # Show file contents after write + LLM debug max_background_processes = 5 # Max concurrent background processes (1-20) max_iterations = 10 # Max agentic iterations per message (1-100) max_output_tokens = 32768 # Max tokens in LLM response max_history_messages = 30 # Messages kept in history prompt = "STANDARD" # System prompt tier: MINIMAL, STANDARD, EXTENDED tool_tags = ["core", "metadata"] # Enabled tool tags (see /plugin) # skills = ["development-workflow"] # or "none"; default: the built-in skills agent_timeout = 300 # Seconds before a background agent is cancelled [logging] file_enabled = true # master switch for ALL file logging file_path = ".ayder/log/ayder.log" error_path = ".ayder/log/errors.log" # always written unless file_enabled = false trace_enabled = false trace_path = ".ayder/log/trace.jsonl" rotation = "10 MB" retention = "7 days" # level = "INFO" # optional; omitted entirely when unset, which means NONE. # NONE, ERROR, WARNING, INFO, DEBUG, TRACE [logging.channels] # Per-channel level overrides. Unlisted channels inherit the global level. # Channels: llm, tool, agent, context, plugin, ui, core, external # llm = "TRACE" # verbose LLM traffic # plugin = "WARNING" # quiet plugin discovery # external = "ERROR" # throttle third-party libraries # ui = "NONE" # disable this channel entirely [context_manager] enabled = true max_context_tokens = 8192 [temporal] enabled = false host = "localhost:7233" namespace = "default" metadata_dir = ".ayder/temporal" # --- Provider Profiles --- [llm.my_local_ollama] driver = "ollama" base_url = "http://localhost:11434" model = "qwen3-coder:latest" num_ctx = 65536 [llm.openai_cloud] driver = "openai" api_key = "sk-..." model = "gpt-4o" num_ctx = 128000 [llm.anthropic] driver = "anthropic" api_key = "sk-ant-..." model = "claude-sonnet-4-5-20250929" num_ctx = 200000 [llm.gemini] driver = "google" api_key = "AIza..." model = "gemini-3-pro" num_ctx = 1000000 Please adjust num_ctx context size window according to your local computer RAM. If Ollama crashes, decrease the value.
Use /effort to open a picker, or /effort high to change the active session. Changes apply between turns and are inherited by future agents that use the session's profile; explicit agent settings take precedence. They do not change config.toml. /effort default restores the provider's default behavior (omits OpenAI effort and Ollama's think parameter).
Support varies by model. OpenAI values follow its Chat Completions API. Ollama uses the installed Python SDK's boolean and three-level think options; its SDK does not yet accept the server API's newer max value. GPT-OSS expects low, medium, or high, and cannot disable thinking. See Ollama thinking.
Set persistent defaults per LLM profile and agent:
[llm.openai] driver = "openai" reasoning_effort = "medium" [llm.ollama] driver = "ollama" reasoning_effort = "high" [agents.reviewer] provider = "openai" reasoning_effort = "high" system_prompt = "Review code and report findings." Omit an agent's reasoning_effort to inherit its profile, or set it to "default" to clear an inherited effort. On Ollama, "none" maps to think = false; an explicit effort overrides the legacy think setting. Existing think = true/false/"low"/"medium"/"high" profile and agent settings remain supported. OpenAI omits reasoning effort by default, preserving compatibility with models and endpoints that do not support it.
You do not need a separate profile for every model. The profile defines the connection (driver, base URL, API key).
Once a profile is active, use /model in the TUI to swap models on the fly:
If the provider rejects the listing request, /model shows the server's error.
Changes made with /model apply to the current session only. To make a model the permanent default, update model = "..." in your config.toml.
# Start (launches TUI by default) ayder # Or run as a module python3 -m ayder_cli Command Mode (Non-Interactive) # Execute a single command and exit ayder "create a hello.py script" # Pipe input (auto-detected, no flag needed) echo "create a test.py file" | ayder # Read from file ayder -f instructions.txt # Explicit stdin mode ayder --stdin < prompt.txt # Override the main LLM system prompt with a file # (the environment section with working directory and start time, # and the tool instructions, are still appended) ayder --system-prompt prompt-file.md "refactor this code" Task Commands (CLI Mode) Execute task-related commands directly without entering the TUI:
# List all tasks ayder --tasks # Implement a specific task by ID or name ayder --implement 1 ayder --implement auth # Implement all pending tasks sequentially ayder --implement-all Tool Permissions (-r/-w/-x/--http) By default, every tool call requires user confirmation. Use permission flags to auto-approve tool categories:
Installed plugins extend these categories (e.g. python_editor → write, virtualenv tools → execute, dbs_tool → web).
# Auto-approve read-only tools ayder -r # Auto-approve read and write tools ayder -r -w # Auto-approve everything (fully autonomous) ayder -r -w -x # Allow web tools without prompts ayder -r --http # Combine with other flags ayder -r -w "refactor the login module" echo "fix the bug" | ayder -r -w -x Context Management ayder-cli includes a context manager that automatically keeps your conversation within the model's token budget. The implementation is driver-aware — Ollama gets a specialized KV-cache-optimized manager, while cloud providers (Anthropic, OpenAI, Gemini) use a general-purpose tiered manager.
Ollama-specific optimizations (automatic when driver = "ollama"):
General-purpose manager (Anthropic, OpenAI, Gemini, and other drivers):
Every message is assigned an importance tier (system > recent user > recent assistant > tool results > old history). When the conversation approaches the token budget, old tool results are compressed (JSON structurally summarized, large text head/tail truncated) and the lowest-priority messages are pruned. Tool call + result pairs are kept as atomic units. The newest unit is always kept, even when it alone exceeds the budget, so the model always sees the request it is answering.
The context manager is configured under [context_manager] in config.toml:
You can also manually manage context with the context tool and its slash-command shortcuts: /save-context, /load-context, /list-contexts, /context-stats, and /compact.
A skill is a directory with a SKILL.md file, optionally starting with name: and description: frontmatter. ayder looks in three places, and a later one overrides an earlier one with the same name:
ayder ships a development-workflow skill for multi-step software work: a plan note and tasks, approval before any project file changes, then execution with per-task status. Small edits and questions skip it. The system prompt is a general assistant; when a skill fits the request, the model loads it itself.
The skills enabled for a session are listed in the system prompt under "### Skills" (name and description), and only those can be loaded by the model. The skills setting chooses them:
The main session reads [llm. ].skills, then [app].skills. An agent reads [agents. ].skills, then its provider profile's; never [app]. The /skill command loads any discovered skill, including project skills that are not in the catalog.
The model loads one with skill(action="load", name=...); the instructions come back as the tool result, so the conversation's earlier messages (and the provider's KV cache) are unchanged. Several skills can be active; other files in a skill's directory are read on demand with skill(action="read"). A skill directory or SKILL.md that links outside its skills directory is listed but never read or loaded; copy the skill instead of symlinking it. A loaded skill stays in context for the whole session: when trimming or compaction removes it, ayder adds it back right after the system prompt, or inside the Ollama summary.
ayder-cli is optimized for both large and small (local) LLMs:
The standard mode for general coding and chat. Uses the system prompt.
> create a fibonacci function Available tools: file read/write, shell commands, search, context, notes, tasks.
Activated with /plan. The AI breaks down requirements into tasks stored in .ayder/tasks/.
> /plan add user authentication to the app Task Mode (/implement) Activated with /implement. The AI implements tasks from the task list.
> /implement # Interactive task picker > /implement 1 # Implement TASK-001 directly Task Management ayder-cli includes a built-in task system:
Tasks are stored as markdown files in .ayder/tasks/ using slug-based filenames (e.g., TASK-001-add-auth-middleware.md).
The task tool resolves identifiers (a path, filename, ID or slug) only to files inside .ayder/tasks/. An identifier that points elsewhere, including through a symlink, is not resolved. If .ayder/tasks/, .ayder/context/ or .ayder/notes/ itself resolves outside the project, those tools return a security error.
> /tasks # Interactive task browser > /task-edit 1 # Open TASK-001 in the in-app editor > /implement 1 # Implement TASK-001 Pluggable Tool Architecture Adding a new tool is as simple as:
When agents are configured, the call_agent tool is also registered so the main LLM can dispatch them (see Multi-Agent System).
Plugin tools — python_editor, dbs_tool, temporal_workflow, virtualenv tools, and MCP integrations ship as optional plugins in the ayder/ayder-plugins repo (see Plugins). Once installed they are auto-discovered exactly like built-ins.
Main LLM (your conversation) │ ├─ calls `call_agent` tool ─────────────────────────────────┐ │ OR you type `/agent ` │ │ ▼ │ AgentRunner (background asyncio task) │ ┌─────────────────────────────────┐ │ │ Isolated ChatLoop │ │ │ • own LLM provider + model │ │ │ • own context window │ │ │ • own ToolRegistry │ │ │ • auto-approves all tools │ │ │ • produces │ │ └────────────────┬────────────────┘ │ │ completes │ ▼ │ AgentSummary → _summary_queue │ ▼ (next main LLM turn) pre_iteration_hook drains queue └─ injects AgentSummary as system message into main context └─ main LLM sees: "[Agent 'reviewer' completed] FINDINGS: ..." Key properties:
Add [agents. ] sections to your ~/.ayder/config.toml:
[app] provider = "ollama" agent_timeout = 300 # Global timeout for all agents (seconds) [llm.ollama] driver = "ollama" model = "qwen3-coder:latest" num_ctx = 65536 [llm.anthropic] driver = "anthropic" api_key = "sk-ant-..." model = "claude-sonnet-4-5-20250929" num_ctx = 200000 # --- Agents --- [agents.code-reviewer] system_prompt = """You are a senior code reviewer. Review the code for bugs, security issues, and style violations. Be concise and actionable.""" provider = "anthropic" # Optional: use a different provider than main model = "claude-sonnet-4-5-20250929" # Optional: use a different model [agents.test-writer] system_prompt = """You are a test engineer. Write comprehensive pytest tests for the code provided. Follow existing test patterns in the codebase.""" # No provider/model → inherits from [app] provider [agents.doc-writer] system_prompt = """You are a technical writer. Write clear, concise docstrings and inline comments for the code provided.""" Each agent field:
# List configured agents and their status /agent list # Dispatch an agent to review your authentication module /agent code-reviewer Review src/auth.py for security issues # Dispatch the test writer for a specific module /agent test-writer Write tests for src/api/users.py # Cancel a running agent /agent cancel code-reviewer Via the main LLM (automatic):
When agents are configured, the main LLM is told about them via its system prompt and can call call_agent autonomously:
You: Review the authentication module and write tests for it. LLM: I'll dispatch two agents to handle this in parallel. [calls call_agent: name="code-reviewer", task="Review src/auth.py..."] [calls call_agent: name="test-writer", task="Write tests for src/auth.py..."] Both agents are running in the background. I'll incorporate their findings when they complete. ... (agents run independently) ... LLM: [next turn, after agents complete] The code-reviewer found 2 issues: ... The test-writer produced 8 new tests: ... Agent summary format:
Agents end their final response with a structured block that ayder-cli parses:
FINDINGS: Found a SQL injection vulnerability in login() and missing input validation in register() FILES_CHANGED: none RECOMMENDATIONS: Parameterize all DB queries; add Pydantic validators to all endpoints This summary is injected into the main LLM's context as a system message so the main agent can act on it, summarize it for you, or chain it to further work.
MCP support is built in and installed with Ayder. Add .ayder/mcp.json in your project root, then start Ayder:
{ "mcpServers": { "local-tools": { "command": "python", "args": ["server.py"], "env": {"EXAMPLE_SETTING": "value"} }, "remote-tools": { "url": "http://localhost:8000/mcp" } } } Local servers use stdio and run from the project root; remote servers use Streamable HTTP. Their tools automatically join the standard core toolset in the CLI, TUI, and delegated agents. No plugin installation or /plugin toggle is needed. Tool calls retain the usual permissions: x for stdio servers and http for HTTP servers. Configure only servers you intend Ayder to connect to: local server commands start during runtime initialization to discover tools.
Tools keep their server-provided names unless they conflict with an existing tool; conflicting names receive a server__ prefix (and a numeric suffix if needed). Unreachable servers are skipped so other tools remain available. Connections are shared by agents in the same project and closed on process exit. Restart Ayder after changing mcp.json.
Existing mcp-tool plugin installations are automatically skipped in favor of built-in support; your existing .ayder/mcp.json continues to work. The legacy ayder-cli[mcp] installation extra is still accepted.
Official plugins (venv, python, dbs, temporal) are maintained in the ayder/ayder-plugins repository. Install any plugin directly from GitHub:
ayder install-plugin https://github.com/ayder/ayder-plugins/tree/main/venv-tools ayder install-plugin https://github.com/ayder/ayder-plugins/tree/main/python-tools Plugins can also be hosted in any public GitHub repository — point install-plugin at any repo or subdirectory containing a plugin.toml.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.




