AIYO (Agent In Your Orbit) — AI automation agent built on any-llm-sdk. Supports OpenAI-compatible and Anthropic backends.
This is a Monorepo with multiple packages:
AIYO/
├── libs/
│ └── aiyo/ # Core agent library
├── packages/
│ ├── aiyo-cli/ # Interactive CLI tool
│ └── aiyo-server/ # Web API & UI server
# Install all packages in development mode
uv pip install -e libs/aiyo -e packages/aiyo-cli -e packages/aiyo-server
# Or use uv sync (recommended)
uv syncFor Jira, Confluence, and Gerrit integration:
# Install with ext dependencies
uv pip install -e "libs/aiyo[ext]" -e packages/aiyo-cli -e packages/aiyo-server
# Or using uv sync
uv sync --extra extThen configure credentials in ~/.aiyo/.env (see Configuration section below).
# Check if ext tools are loaded
uv run aiyo info
# Should show: jira_cli, confluence_cli, gerrit_cli (if ext is installed)Requirements: Python 3.11+
Create a .env file (or use ~/.aiyo/.env for per-user config):
# LLM Provider (openai or anthropic)
PROVIDER=openai
MODEL_NAME=gpt-4o-mini
OPENAI_API_KEY=sk-...
# OPENAI_BASE_URL=https://api.example.com/v1 # Optional: for proxies
# Or for Anthropic:
# PROVIDER=anthropic
# MODEL_NAME=claude-3-5-sonnet-20241022
# ANTHROPIC_API_KEY=sk-ant-...
# Optional: Proxy settings (if behind corporate firewall)
# HTTP_PROXY=http://proxy.example.com:8080
# HTTPS_PROXY=http://proxy.example.com:8080
# Optional: Agent settings
# AGENT_MAX_ITERATIONS=70
# RESPONSE_TOKEN_LIMIT=8190
# LLM_TIMEOUT=300
# WORK_DIR=/path/to/workspaceConfiguration loading order (first match wins):
.envin current directory~/.aiyo/.env— per-user config (recommended for API keys)/etc/aiyo/aiyo.env— system-wide defaults
For Jira, Confluence, and Gerrit integration, add to ~/.aiyo/.env:
JIRA_SERVER=https://your-jira.example.com
JIRA_USERNAME=your-username
JIRA_PASSWORD=your-password-or-api-token
CONFLUENCE_SERVER=https://your-confluence.example.com
CONFLUENCE_TOKEN=your-personal-access-token
GERRIT_SERVER=https://your-gerrit.example.com
GERRIT_USERNAME=your-username
GERRIT_PASSWORD=your-http-password# Using uv run (recommended)
uv run aiyo
# Or if virtual environment is activated
aiyoRich UI with syntax highlighting, bottom status bar, tab completion, and diff display for file edits.
Slash Commands:
| Command | Action |
|---|---|
/help |
Show all commands |
/reset |
Clear conversation history |
/compact |
Compress history (two-layer: micro → deep) |
/summary |
Show token usage |
/stats |
Show detailed session statistics |
/save |
Save history to .history/ as JSONL |
/clear |
Clear screen |
/exit |
Exit |
Keyboard Shortcuts:
| Key | Action |
|---|---|
Ctrl-C |
Cancel running task (or clear input if idle) |
Ctrl-D |
Exit (when input is empty) |
Shift-Tab |
Toggle plan mode |
@filename |
Fuzzy-search files in cwd and attach |
@path/to/ |
Browse a directory |
Plan Mode (Shift-Tab to toggle): Restricts all write operations to the .plan/ directory and disables shell commands. The agent can only create/edit files under .plan/, useful for reviewing a plan before executing it.
# Using uv run (recommended)
uv run aiyo-server
# Or if virtual environment is activated
aiyo-server
# With custom port
uv run aiyo-server --port 8080
# Development mode (auto-reload)
uv run aiyo-server --reloadThen open http://localhost:8000 in your browser.
The Web UI provides:
- Real-time chat with markdown rendering
- Tool execution visualization
- File upload support
- Conversation reset/compact controls
uv run aiyo replSame slash commands as the interactive shell, outputs plain text. Useful over SSH or in terminals without full ANSI support.
uv run aiyo prompt "summarize the build log"
echo "what is 2+2" | uv run aiyo promptOutputs only the agent's response to stdout — no tool logs, no spinner. Suitable for shell scripts and CI pipelines.
uv run aiyo info # show provider/model/tools info
uv run aiyo --debug # enable debug logging from startupAIYO provides built-in tools organized by permission level:
Safe operations that don't modify state:
| Tool | Description |
|---|---|
get_current_time |
Returns current date and time |
think |
Allows the agent to think through a problem |
read_file |
Read text file contents |
read_image |
Read image files (multimodal support) |
read_pdf |
Extract text from PDF files |
list_directory |
List directory contents |
glob_files |
Find files matching a pattern |
grep_files |
Search file contents with regex |
fetch_url |
Fetch and extract web page content |
task_create |
Create a tracked task |
task_get |
Get task details |
task_list |
List all tasks |
task_update |
Update task status |
task_delete |
Delete a task |
load_skill |
Load a skill's full instructions |
load_skill_resource |
Load a skill resource file |
ask_user |
Ask the user a question with options |
Operations that modify files or execute commands:
| Tool | Description |
|---|---|
write_file |
Create or overwrite a file |
edit_file |
Edit file contents (search/replace) |
shell |
Execute shell commands |
from aiyo import Agent
# Agent uses all built-in tools by default
agent = Agent()
# Or add custom tools
agent = Agent(extra_tools=[my_custom_tool])Skills inject task-specific instructions into the agent's system prompt without adding new tools. Place SKILL.md files in any configured skills directory. Directories are scanned from highest to lowest priority; when two skills use the same name, the first one found wins and lower-priority copies are ignored.
WORK_DIR/.aiyo/skills/— project-level~/.aiyo/skills/— user-levelSKILLS_DIRenv var — additional directory
A skill file uses YAML frontmatter:
---
name: my-skill
description: What this skill does
---
Full instructions here. The agent loads this on demand via the `load_skill` tool.Available skills are listed at startup; the agent calls load_skill("my-skill") when it determines the skill is relevant.
AIYO loads skills, MCP server config, and agent instruction files from the following paths.
All existing directories are scanned in priority order. Duplicate resolved paths are deduplicated with the higher-priority entry kept. Lower-priority directories only contribute skills whose name has not already been loaded.
| Priority | Path |
|---|---|
| 1 (highest) | WORK_DIR/.aiyo/skills/ |
| 2 | ~/.aiyo/skills/ |
| 3 (lowest) | SKILLS_DIR env var, when set |
Only one MCP config file is loaded. Discovery stops at the first existing file:
| Priority | Path |
|---|---|
| 1 (highest) | MCP_CONFIG env var (if set) |
| 2 | WORK_DIR/.aiyo/mcp.json |
| 3 (lowest) | ~/.aiyo/mcp.json |
All found files are merged into the system prompt in this order:
| Order | Path |
|---|---|
| 1 | WORK_DIR/.aiyo/AGENTS.md |
| 2 | ~/.aiyo/AGENTS.md |
Each included section is prefixed with its source path. WORK_DIR/AGENTS.md is not loaded.
from aiyo import Agent
async def main():
agent = Agent() # Default tools are built-in
response = await agent.chat("list files in the current directory")
print(response)from aiyo.agent.middleware_base import Middleware
from aiyo import Agent
class MyMiddleware(Middleware):
def on_tool_call_end(self, tool_name: str, tool_id: str,
tool_args: dict, tool_error: Exception | None,
result: object) -> object:
print(f"Tool called: {tool_name}")
return result
agent = Agent(extra_middleware=[MyMiddleware()])async def my_tool(query: str) -> str:
"""Search internal knowledge base. Requires a search query string."""
return f"Results for: {query}"
from aiyo import Agent
# All built-in tools are included by default; append custom tools as needed
agent = Agent(extra_tools=[my_tool])Tool functions must have a docstring (used as the tool description) and type-annotated parameters (used to generate the JSON schema).
# Core methods
response = await agent.chat("message") # Send message, get response
agent.reset() # Clear history (keeps system prompt)
agent.toggle_plan_mode() # Toggle plan mode
agent.compact() # Compress history (two-layer)
agent.save_history() # Save history to .history/
# Properties
agent.model_name # Current model name
agent.stats # SessionStats object
agent.plan_mode # Check if plan mode is active
# Debug
agent.set_debug(True) # Enable debug loggingIf you see Connection failed error:
-
Check network connectivity:
curl -I https://api.anthropic.com curl -I https://api.openai.com
-
Check proxy settings (if behind corporate firewall):
env | grep -i proxySet if missing:
export HTTP_PROXY=http://proxy.example.com:8080 export HTTPS_PROXY=http://proxy.example.com:8080
-
Verify API key:
echo $OPENAI_API_KEY # or $ANTHROPIC_API_KEY
-
Check provider/model settings:
uv run aiyo info
If you hit rate limits:
- Wait a moment and retry
- Check your provider's rate limits
- Consider using a different model tier
If conversations get too long:
- Use
/compactto compress history - Use
/resetto start fresh - Save context to files and reference them
File operations are sandboxed to WORK_DIR (defaults to current directory). To access files elsewhere:
- Change to that directory before running
aiyo - Or set
WORK_DIRenvironment variable
If uv run aiyo info doesn't show Jira/Confluence/Gerrit tools:
- Install with
uv sync --extra ext - Verify credentials in
~/.aiyo/.env - Check server URLs are correct
# Run tests
uv run pytest tests/ -v
uv run pytest tests/test_agent.py::TestAgent::test_tool_is_called -v
# Format code
uv run black libs/ packages/ tests/
# Lint
uv run ruff check libs/ packages/ tests/AIYO uses a middleware-based architecture:
- Agent: Core orchestration loop with tool calling
- Middleware: Hooks for extending behavior (logging, stats, compaction, plan mode, vision)
- Tools: File system, shell, web fetch, image/PDF reading, task management, and extensible domain tools
- History Manager: Two-layer compression (micro → deep) for long conversations with token counting
- Stats: Comprehensive session statistics tracking
See CLAUDE.md for detailed architecture documentation.
MIT License — see LICENSE file for details.