SAGO-Agent
Production-grade multi-agent orchestration system — 339 specialist agents, 45 tools, multi-LLM support, streaming, parallel execution, feedback loops, workflows, TUI with dashboard, and built-in security.
What is Sago?
Sago is a production-grade multi-agent orchestration system built for real-world software engineering tasks. It goes beyond simple code generation — it autonomously delegates work to 339 specialist agents, uses 45 production tools, streams responses token-by-token, runs agents in parallel, manages sessions, enforces permissions, and runs workflows.
Key Capabilities
| Feature | Description |
|---|---|
| 339 Specialist Agents | Agents across 22 categories (engineering, security, data, cloud, compliance, etc.) |
| 45 Production Tools | File ops, shell, networking, SSH, coding, Docker, and more |
| Parallel Agent Execution | Run multiple agents simultaneously on the same task |
| Feedback Loops | Agents can request clarification from previous agents in a chain |
| Recursion Protection | Depth tracking, cycle detection, and visited-agent guards |
| Structured Handoffs | Typed context passing between agents with history tracking |
| AI-Powered Routing | sago smart asks the LLM to pick the best agent for any task |
| Token-by-Token Streaming | Real-time streaming with usage tracking via OpenAI streaming API |
| Permission System | Risk-based tool permissions (safe/low/medium/high/critical) with approval workflow |
| Session Persistence | SQLite database + JSON file save/load with full state preservation |
| Workflow Engine | Stateful multi-step workflows with dependencies, retries, and pausing |
| TUI Interface | Rich terminal UI with agent dashboard, autocomplete, collapsible tool calls, and command history |
| Multi-LLM Support | OpenRouter, OpenAI, Gemini, Claude, Ollama |
| Token Cost Tracking | Per-model pricing with cache hit/miss analytics |
| Security Audit | Path traversal protection, input validation, sensitive data filtering |
Quick Start
# Clone the repository
git clone https://github.com/SAGO-AUTOMATES/SAGO-Agent.git
cd SAGO-Agent
# Install dependencies
pip install -e .
# Set your API key
export OPENROUTER_API_KEY="your-key-here"
# Launch the TUI
sago tui
# Or run tasks from CLI
sago smart "Fix the authentication bug"
sago run "Build a REST API" --agent python-engineer
Installation
From Source (Recommended)
git clone https://github.com/SAGO-AUTOMATES/SAGO-Agent.git
cd SAGO-Agent
pip install -e .
Using uv (Faster)
git clone https://github.com/SAGO-AUTOMATES/SAGO-Agent.git
cd SAGO-Agent
uv pip install -e .
Dependencies
- Python 3.11+
- openai (for LLM calls)
- textual (for TUI)
- pydantic (for data validation)
Optional:
- crewai (for CrewAI orchestration path)
- langgraph (for LangGraph workflow engine)
- anthropic (for Claude provider)
- google-generativeai (for Gemini provider)
CLI Commands
Core Execution
| Command | Description |
|---|---|
sago smart "task" |
AI-powered execution — LLM selects best agent, streams response |
sago run "task" |
Execute task with auto-orchestration |
sago run "task" --agent X |
Use specific agent |
sago run "task" --chain X,Y,Z |
Sequential agent chain |
sago run "task" --effort high |
Control execution depth (low/medium/high/max) |
Interactive TUI
| Command | Shortcut | Description |
|---|---|---|
sago tui |
— | Launch interactive terminal UI |
/help |
— | Show all commands |
/agents [filter] |
— | List/search 339 agents |
/agent <name> |
— | Set current agent |
/delegate <agent> <task> |
— | Delegate to specialist |
/chain <a1,a2> <task> |
— | Chain agents sequentially |
/parallel <a1,a2> <task> |
— | Run agents in parallel on same task |
/orchestrate <task> |
— | Auto-delegate to specialists |
/dashboard |
Ctrl+D |
Toggle agent dashboard sidebar |
/tasks |
Ctrl+T |
Show background tasks |
/cancel <id|all> |
Ctrl+C |
Cancel running task(s) |
/handoff |
— | Show handoff targets for current agent |
/effort <level> |
— | Set effort: low/medium/high/max |
/cost |
— | Token usage and costs |
/summary |
— | Toggle task summary display |
/save [name] |
— | Save session to file |
/load <name> |
— | Load session from file |
/compact |
— | Summarize context |
/permissions |
— | Show tool permissions |
/allow <tool> |
— | Allow a tool |
/block <tool> |
— | Block a tool |
/git |
— | Git status |
/diff [file] |
— | Show diff |
/commit <msg> |
— | Commit changes |
Workflows
| Command | Description |
|---|---|
sago workflows |
List all workflows |
sago workflow-create "name" |
Create new workflow |
sago workflow-add-step <id> |
Add step to workflow |
sago workflow-run <id> |
Execute workflow |
System
| Command | Description |
|---|---|
sago status |
System status |
sago agents |
List all agents |
sago info <agent> |
Agent details |
sago init |
Initialize project |
sago daemon start |
Start background server |
sago daemon stop |
Stop server |
339 Agents Across 22 Categories
| Category | Count | Examples |
|---|---|---|
| Specialized Engineering | 71 | security-engineer, devsecops-engineer, blockchain-engineer |
| Engineering Dev | 52 | full-stack-engineer, backend-engineer, mobile-engineer |
| Language Specific | 35 | python-engineer, rust-engineer, go-engineer |
| Data Intelligence | 34 | data-engineer, ml-engineer, ai-engineer |
| Infrastructure Ops | 23 | devops, kubernetes-engineer, terraform-engineer |
| Database Specialists | 16 | postgresql-engineer, mongodb-engineer, redis-engineer |
| Compliance Legal Finance | 16 | gdpr-engineer, soc2-engineer, hipaa-engineer |
| Planning Oversight | 13 | technical-debt-manager, risk-manager, capacity-planner |
| Design Architecture | 12 | solutions-architect, enterprise-architect, security-architect |
| Testing Quality | 11 | qa-engineer, penetration-tester, performance-engineer |
| Orchestration | 10 | engineering-manager, scrum-master, technical-program-manager |
| Content Communication | 10 | technical-writer, documentation-updater, tech-translator |
| Cloud Infra Architecture | 9 | aws-engineer, gcp-engineer, azure-engineer |
| System Extensibility | 6 | agent-builder, prompt-engineer, skill-creator |
| Frontend Frameworks | 5 | react-engineer, vue-engineer, angular-engineer |
| Business Revenue | 5 | developer-advocate, sales-engineer, marketing-engineer |
| People Culture | 3 | technical-recruiter, training-specialist |
| Executive | 3 | cto, vp-engineering, ceo |
| Cloud Providers | 2 | cloudflare-engineer, oracle-cloud-engineer |
| Business Analysis | 2 | business-analyst, data-analyst |
| IT Support | 1 | it-support-engineer |
| Game Development | 1 | game-engineer |
45 Production Tools
File Operations
read_file— Read file contentswrite_file— Write files with auto-directory creationglob_files— Pattern-based file searchgrep_content— Regex content searchfile_operations— Move, copy, delete, rename, mkdir, listarchive— Create/extract zip, tar, tar.gz, tar.bz2hash_checksum— MD5, SHA1, SHA256, SHA512diff_tool— Compare files/textregex_tester— Test/debug regular expressionspdf_reader— Extract text from PDFsdata_processor— JSON/YAML parse, validate, format, query, merge
Shell & System
execute_shell— Run shell commandsbackground_process— Run commands in backgroundprocess_manager— List/kill processesenv_info— System, disk, memory, network infoenv_manager— Environment variable managementos_detector— Detect operating systemcron_schedule— Manage scheduled tasksscreenshot— Capture screenshots
Network
http_client— API requests (GET, POST, PUT, DELETE)web_crawler— Crawl websites, extract contentdns_lookup— DNS resolutionport_scan— Scan portsnetwork_config— Network configuration info
SSH
ssh_connect— SSH connectionsssh_command— Execute remote commandsssh_transfer— File transfer via SCP/SFTP
Coding
code_analyzer— Code structure, complexity, issueslinter— Code lintingformatter— Code formattingtest_runner— Run testsdebugger— Debug with breakpoints, AST analysislog_analyzer— Analyze log filestext_summarizer— Summarize text
DevOps
docker_ops— Docker ps, build, run, composegit_ops— Git status, log, diff, commit, push
Session & Other
session_manager— Session managementclipboard— Clipboard operationsprompt_generator— Generate promptspermission_manager— Manage permissionsspawn_agent— Delegate to specialist agents
Permission System
Sago includes a risk-based permission system that controls which tools can be executed.
Risk Levels
| Level | Tools | Default |
|---|---|---|
| Safe | read_file, glob_files, env_info, os_detector | Auto-approved |
| Low | write_file, edit_file, file_operations | Auto-approved |
| Medium | execute_shell, background_process, docker_ops | Requires approval |
| High | ssh_connect, ssh_command, sudo_executor | Requires approval |
| Critical | spawn_agent | Requires approval |
Managing Permissions
# View all tool permissions
/permissions
# View blocked tools only
/permissions blocked
# Allow a tool
/allow execute_shell
# Block a tool
/block sudo_executor
Configuration
Permissions are stored in ~/.sago/permissions.json:
{
"auto_approve_safe": true,
"auto_approve_low": true,
"require_approval_medium": true,
"require_approval_high": true,
"require_approval_critical": true,
"blocked_tools": ["dangerous_tool"]
}
Session Persistence
Sessions are automatically saved to SQLite (~/.sago/data/sago.db) and can be exported to JSON.
# Save current session
/save my-session
# List saved sessions
/sessions
# Load a session
/load my-session
# Export to markdown
/export
# Compact context (summarize old messages)
/compact
Token Usage & Cost Tracking
# In TUI
/cost
# From CLI
sago usage
Output includes:
- Total input/output tokens
- Cache hit/miss counts and savings percentage
- Per-model cost breakdown (9 models supported)
- Session-level and cumulative tracking
Workflow Engine
Create stateful, multi-step automations:
# Create a workflow
sago workflow-create "Deploy Pipeline"
# Add steps with dependencies
sago workflow-add-step <id> --name "Test" --type agent_call --config '{"task": "Run tests"}'
sago workflow-add-step <id> --name "Build" --type tool_call --config '{"tool": "execute_shell", "args": {"command": "make build"}}' --depends-on test-step
sago workflow-add-step <id> --name "Deploy" --type agent_call --config '{"task": "Deploy to production"}' --depends-on build-step
# Execute
sago workflow-run <id>
# Stream execution
sago workflow-run <id> --stream
Architecture
sago/
├── agents/ # 339 agent profiles
│ ├── profiles/ # One .py per agent with metadata
│ ├── registry.py # Agent loading and lookup
│ ├── spawner.py # Agent execution with feedback loops
│ └── handoff.py # HandoffContext, RecursionGuard, FeedbackRequest
├── tools/ # 45 production tools
│ ├── base.py # BaseTool with permission checks
│ ├── file/ # File operations (12 tools)
│ ├── shell/ # Shell execution
│ ├── network/ # HTTP, DNS, crawling
│ ├── coding/ # Code analysis, debugging
│ ├── ssh/ # SSH operations
│ ├── system/ # Git, Docker, env
│ └── admin/ # Sudo, permissions
├── engine/ # Execution engines
│ ├── simple_executor.py # Smart executor with auto-discovery
│ └── unified.py # Unified executor (simple/crewai/langgraph)
├── permissions.py # Risk-based permission system
├── workflow/ # Workflow engine
│ ├── engine.py # Stateful workflows with dependencies
│ └── langgraph_engine.py # LangGraph integration
├── server/ # TCP daemon server
│ └── daemon.py # Background daemon with client
├── mcp/ # Model Context Protocol
│ └── server.py # MCP server with 45 tools
├── tui/ # Terminal UI
│ ├── app.py # Textual TUI with dashboard
│ ├── widgets/ # AgentDashboard, AgentSpinner, HandoffFlow
│ ├── helpers.py # Agent-tagged message rendering
│ └── smart_input.py # Input processor
├── llm/ # LLM providers
│ ├── openai_provider.py
│ ├── openrouter.py
│ ├── gemini.py
│ └── claude.py
├── memory/ # Memory and context
│ ├── rag.py # RAG memory with search
│ ├── compaction.py # Session compaction
│ └── profiles.py # User profiles
├── cache/ # Intelligent caching
│ └── intelligent.py # Content-hash cache with TTL/LRU
├── tracking/ # Usage tracking
│ └── token_tracker.py # Token counting and cost
├── sessions/ # Session management
│ └── manager.py # Multi-session with parallel execution
├── errors/ # Error handling
│ └── handler.py # Recovery with fallback tools
├── database.py # SQLite persistence
├── paths.py # Cross-platform paths
├── config/ # Configuration
│ ├── loader.py
│ ├── project_config.py
│ └── sago.yaml
└── main.py # CLI entry point
Quality
Sago includes comprehensive coverage across unit, integration, and security categories.
Quality Areas
| Category | Coverage |
|---|---|
| Unit - Tools | All 45 tools with proper arguments |
| Unit - Permissions | Risk levels, blocking, approval workflow |
| Unit - Agents | Registry, profiles, lookup |
| Integration - Executor | Tool discovery, task detection, extraction |
| Integration - Server | Daemon, client, protocol |
| Integration - Workflow | Engine, steps, dependencies |
| Integration - MCP | Server, tools, creation |
| Security | Path traversal, injection, bypass, validation |
Security
Path Traversal Protection
- Tools validate file paths before execution
- Blocked paths configurable per project
Command Injection Protection
- Shell commands validated before execution
- Permission system blocks dangerous operations
Permission Bypass Prevention
- High/critical risk tools require explicit approval
- Session-isolated approval state
- Blocked tools cannot be executed even with valid credentials
Input Validation
- Empty/None inputs handled gracefully
- Special characters sanitized
- Error messages don't expose internals
Sensitive Data Filtering
- API keys never exposed in tool output
- Passwords filtered from system info
LLM Providers
| Provider | Models | API Key | Streaming |
|---|---|---|---|
| OpenRouter | Multiple models | OPENROUTER_API_KEY |
Yes |
| OpenAI | gpt-4o, gpt-4o-mini | OPENAI_API_KEY |
Yes |
| Gemini | gemini-2.0-flash, gemini-1.5-pro | GEMINI_API_KEY |
Yes |
| Claude | claude-3-5-sonnet, claude-3-haiku | ANTHROPIC_API_KEY |
Yes |
| Ollama | Local models | None required | Yes |
Effort Levels
| Level | Max Tokens | Max Iterations | Use Case |
|---|---|---|---|
| Low | 8,192 | 3 | Quick fixes, typos |
| Medium | 16,384 | 5 | Standard tasks |
| High | 32,768 | 8 | Complex architecture |
| Max | 65,536 | 12 | Critical systems |
Configuration
Project Config
After sago init, edit config.sago.json:
{
"agents": {
"python-engineer": {
"enabled": true,
"system_prompt_override": "Custom prompt...",
"tools_add": ["web_crawler"],
"temperature": 0.8
}
},
"permissions": {
"allow_shell_execute": true,
"allow_ssh": false,
"blocked_paths": ["/etc", "/sys"]
}
}
Global Config
Stored in ~/.sago/:
~/.sago/
├── data/sago.db # SQLite database
├── permissions.json # Tool permissions
├── sessions/ # Saved sessions (JSON)
└── config.yaml # Global configuration
CI/CD
GitHub Actions pipeline runs on every push:
- Lint — Ruff code quality
- Type Check — MyPy static analysis
- Unit Tests — Tool, permission, agent tests
- Integration Tests — Executor, server, workflow tests
- Security Tests — Vulnerability checks
- Build — Package build verification
See .github/workflows/ci.yml for details.
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing) - Make your changes
- Ensure code quality with linting
- Submit a pull request
Development Setup
git clone https://github.com/SAGO-AUTOMATES/SAGO-Agent.git
cd SAGO-Agent
pip install -e ".[dev]"
License
MIT License - see LICENSE for details.
Sago — Because every task deserves the perfect agent.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sago_agent-0.1.0.tar.gz.
File metadata
- Download URL: sago_agent-0.1.0.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15443fa9ff810789d64b3045d8f1f962169744e4ea21271b30f9a758dcd2ee9b
|
|
| MD5 |
e6ebe0bd002a12ab6ef6c437fd0ac23d
|
|
| BLAKE2b-256 |
95dd9dfc98301dd112b0c42b45403d592c18582c005f5deb0a0936f84713fb2c
|
Provenance
The following attestation bundles were made for sago_agent-0.1.0.tar.gz:
Publisher:
workflow.yml on SAGO-AUTOMATES/SAGO-Agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sago_agent-0.1.0.tar.gz -
Subject digest:
15443fa9ff810789d64b3045d8f1f962169744e4ea21271b30f9a758dcd2ee9b - Sigstore transparency entry: 2446171377
- Sigstore integration time:
-
Permalink:
SAGO-AUTOMATES/SAGO-Agent@66506722f2137557215189a98a7e95d0225f90cf -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/SAGO-AUTOMATES
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@66506722f2137557215189a98a7e95d0225f90cf -
Trigger Event:
release
-
Statement type:
File details
Details for the file sago_agent-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sago_agent-0.1.0-py3-none-any.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c82eb63a92f3dfb39bc26ffd40376121cdd158900b85cb55138169e1c6bff14
|
|
| MD5 |
b48f422565ca060eb7894ebb3300ad3a
|
|
| BLAKE2b-256 |
cabf2aff8c3c78677187cffc05cb97fc25f92dc7654f1d5dccac565ae157ab3f
|
Provenance
The following attestation bundles were made for sago_agent-0.1.0-py3-none-any.whl:
Publisher:
workflow.yml on SAGO-AUTOMATES/SAGO-Agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sago_agent-0.1.0-py3-none-any.whl -
Subject digest:
1c82eb63a92f3dfb39bc26ffd40376121cdd158900b85cb55138169e1c6bff14 - Sigstore transparency entry: 2446171579
- Sigstore integration time:
-
Permalink:
SAGO-AUTOMATES/SAGO-Agent@66506722f2137557215189a98a7e95d0225f90cf -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/SAGO-AUTOMATES
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@66506722f2137557215189a98a7e95d0225f90cf -
Trigger Event:
release
-
Statement type: