Observed since 20 Oct, 22:50 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Main autonomous orchestrator agent that coordinates sub-worker agents via MCP.
Agent_head is the central orchestrator agent for the orchestra multi-agent system. It coordinates multiple specialized Worker Agents and direct MCP (Model Context Protocol) tool servers through a unified LangGraph ReAct loop. This enables complex, multi-step tasks that require coordination across different domains and tools.
Agent_head can also natively run as an MCP server itself or as a REST API Backend, enabling you to build expansive agent networks spanning multiple orchestrators collaborating on heavy computation tasks.
Detailed system mechanics and configuration guides have been moved to dedicated documentation files:
config.yaml breakdowns.engine//channels/ rewrite — see below..claude/docs/, which covers the engine/channels rewrite, the FastAPI route inventory, current security findings, and subsystems added since late August 2026 (heartbeat, tool approval, MCP OAuth, media store, device pairing, P2P networking) that this README and docs/architecture.md do not describe.Agent_head acts as the highly-agile "brain" of your software interface:
┌──────────────┐
│ Claude │
│ Desktop / │ ← External MCP clients
│ Cursor / etc │
└──────┬───────┘
│ (MCP)
┌────────────────────────────────▼────────────────────────────────┐
│ Agent_head │
│ (Orchestrator + MCP Server) │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌───────────────────────┐ │
│ │ LangGraph │ │ Memory │ │ MCP Server │ │
│ │ ReAct Agent │ │ (RAG) │ │ (8 tools exposed) │ │
│ └──────────────┘ └──────────────┘ └───────────────────────┘ │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌───────────────────────┐ │
│ │ Summarizer │ │ Sessions │ │ Progress Streaming │ │
│ │ (windowed) │ │ (SQLite) │ │ (SSE / ctx.info) │ │
│ └──────────────┘ └──────────────┘ └───────────────────────┘ │
└────────────────────────────┬───────────────────────────────────┘
│
┌──────────────┼──────────────┐
│ │ │
┌──────▼─────┐ ┌──────▼─────┐ ┌──────▼─────┐
│ Worker │ │ Worker │ │ MCP │
│ Agent A │ │ Agent B │ │ Tools │ ← filesystem, search, etc.
│ (Agent_a) │ │ (Agent_a) │ │ (direct) │
└────────────┘ └────────────┘ └────────────┘
┌──────────────────────────────────────────┐
│ Agent Network (optional) │
│ │
│ Agent_head ◄──SSE/HTTP──► Agent_head │
│ ↕ ↕ │
│ Agent_head ◄──stdio──► Agent_head │
│ │
│ Shared sessions, multi-agent identity │
└──────────────────────────────────────────┘
| File | Purpose |
|---|---|
main.py | Single entry point (installed as the agento command) — engine boot, channel startup, --init/--reset/--global-path |
api/server.py | FastAPI REST + SSE server |
engine/ | Centralized engine — SessionRegistry, EventBus, SQLitePersistence |
channels/ | Pluggable channels — web, CLI, Telegram, Discord, MCP |
core/mcp/mcp_server.py | MCP server mode (tools exposed) |
core/config/config_loader.py | Typed configuration loading (config.yaml) |
core/config/runtime_config.py | RuntimeConfigStore — the live runtime_config.json source of truth |
core/config/config_models.py | Config schema (AppConfig dataclass tree, model/embedding registries) |
core/mcp/mcp_loader.py | MCP client/server connection management |
core/memory/memory.py | Long-term memory backends |
core/llm/conversation_summarizer.py | Rolling history compression (windowed) |
core/memory/history.py | Abstract session history backend interface |
core/memory/history_sqlite.py | SQLite session persistence (working copy + full archive) |
core/llm/llm.py | LLM provider factory — model registry resolution, instance cache |
core/tools/image_tools.py | Image read / save / screenshot / OCR |
core/tools/audio_tools.py | Audio transcribe / TTS / record / play |
core/tools/command_tools.py | Shell command execution — run (foreground/background), output, kill, list, monitor |
core/session/job_logger.py | Structured per-job logging |
config.yaml | Main configuration file (factory defaults) |
.agents/runtime_config.json | Live configuration (sole source of truth once generated) |
run_command, get_command_output, kill_command, list_commands, monitor_command) — persistent cwd, timeouts, background tasks with completion messages, streamed monitors; confined to ./workspace with a scoped env, and every command except read-only allowlisted ones (command_tools.auto_approve) requires human approvaluv package manager (recommended) or pipuv tool install --force git+https://github.com/tharindumendis/agent_orchestrator_template.git
# Clone the repo
git clone <repository-url>
cd agent_orchestrator_template
# Create virtual environment
uv venv .venv
# Activate environment (Windows)
.venv\Scripts\activate
# Install dependencies
uv sync
# Or with pip
pip install -e .
uv sync --group dev
# Or
pip install -e ".[dev]"
Pick what kind of agent you're building and start from its profile:
agento --init --profile personal # private assistant on your own computer
agento --init --profile public_chatbot # public domain chatbot for any website/app
agento --init --profile server_bot # 24/7 server bot with scheduled jobs
agento --init --profile sandbox # chat agent confined to ./workspace
Who can reach the agent (admin token, paired phones, API keys, your app's JWTs, anonymous visitors, Telegram/Discord senders, teammates' agents) and what each of them may do is all configuration — see .claude/docs/security-model.md.
Run the setup wizard to generate a config in the current directory:
agento --init
(--setup is kept as a back-compat alias for --init.) This creates .agents/config.yaml which
is auto-loaded on next run. On the first plain agento run afterward, .agents/runtime_config.json
is generated from it exactly once — from then on runtime_config.json is the sole live source
of truth for the whole process; config.yaml is never rewritten automatically. Edit
config.yaml for version-controlled defaults, or patch the running config via REST/MCP/the web UI
for live changes. Two more CLI flags round out the lifecycle:
agento --reset # regenerate runtime_config.json from config.yaml, discarding runtime patches
agento --global-path # print the OS-wide fallback config directory and exit
agent:
name: "OrchestratorAgent"
version: "1.0.0"
debug: false # true → writes full prompt/response logs to .agents/logs/runs/
system_prompt: |
You are a powerful autonomous orchestrator agent...
max_iterations: 50
The legacy single model: block is still supported (auto-migrated into the registry below on
first load), but new configs should use the model registry: any number of models can be
registered, and each model-consuming position (agent, summarizer, heartbeat) picks one directly
by id — no shared "role" name to fight over reusing:
models:
registry:
- id: "primary"
provider: "ollama" # "ollama" | "openai" | "gemini" | "anthropic" | "bedrock" | "nvidia"
model_name: "qwen3:32b"
temperature: 0.0
base_url: "http://localhost:11434" # Ollama only
api_key: "" # OpenAI / Gemini / Anthropic
- id: "fast-summarizer"
provider: "ollama"
model_name: "qwen3:8b"
temperature: 0.0
agent:
model_id: "primary" # "" = fall back to the first registry entry
Models can also be registered and reassigned at runtime — via GET/POST /engine/models,
DELETE /engine/models/{id}, PATCH /engine/models/positions/{position}, or the "Models" tab in
agento-webui — without editing config.yaml or restarting. A running session can additionally
be pinned to its own model independent of the global default via
POST /engine/sessions/{session_id}/model (or the per-session selector in the web UI's chat
header).
worker_agents:
- name: "core-agent"
description: "General-purpose worker"
command: "agento-mcp"
args: []
env:
WORKER_AGENT_CONFIG: "./service_config/worker_config.yaml"
mcp_clients:
- name: "filesystem"
command: "npx.cmd"
args: ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"]
- name: "shell"
command: "npx.cmd"
args: ["-y", "shell-exec-mcp"]
memory:
enabled: true
backend: "rag" # "rag" (ChromaDB) or "jsonl"
memory_dir: "./memory"
max_save_length: 500
auto_feed_top_k: 3 # chunks injected before each turn
auto_feed_category: "all" # "all" | "history" | "facts"
rag_server:
command: "uvx"
args: ["agent-rag-mcp"]
env:
RAG_CONFIG: "./service_config/rag_config.yaml"
Embedding models used by the RAG backend are likewise registered by id and referenced, rather than inlined, mirroring the LLM registry above:
embedding_models:
registry:
- id: "default"
provider: "sentence_transformers"
model: "all-MiniLM-L6-v2"
memory:
rag:
embedding_model: "default"
Add/remove entries and set the default at runtime via GET/POST /engine/embedding-models,
DELETE /engine/embedding-models/{id}, PATCH /engine/embedding-models/default, or the "Models"
tab in agento-webui.
chat_history:
backend: "sqlite"
connection_string: "./session_db/sessions.db"
Two tables are maintained automatically:
| Table | Contents | Trimmed? |
|---|---|---|
sessions | Working copy — windowed slice fed to LLM | Yes (after summarisation) |
session_archive | Full archive — every message ever sent | Never |
summarizer:
enabled: true
summarize_every_n_messages: 8 # compress after this many new Human+AI messages
keep_recent_messages: 8 # keep this many raw messages for the LLM feed
save_to_memory: true # persist extracted facts to long-term memory
model_id: "fast-summarizer" # references models.registry — "" falls back to the agent's model
(The legacy inline summarizer.model: block is still supported for back-compat and is
auto-migrated into models.registry on first load, but model_id is the preferred way to pick a
lighter/cheaper model for summarization now.)
Note: Summarisation only shrinks the working copy fed to the LLM. The full unabridged conversation is always preserved in the
session_archivetable and accessible viaGET /history/sessions/{id}/full-export.
agento
This command seamlessly creates the .agents hidden folder in your working directory and instantiates config.yaml alongside specialized agent configs, keeping your agent logic tightly bound to your project environment.
Starts an interactive prompt (all enabled channels — CLI, web, MCP, etc. — per config.yaml).
Each turn is persisted to the engine's session store as it happens. Note: the CLI channel's
session is keyed to your local user identity for the life of the running process — it does
not currently resume the same conversation across a full restart of agento. Type quit or
press Ctrl-C to exit.
Single-shot task, no interactive channels:
agento --task "Analyse the codebase and suggest improvements"
Custom config path:
agento --config /path/to/custom_config.yaml
Disable specific channels (all are on by default per config.yaml; these flags force
one off regardless of config):
agento --no-web # skip the FastAPI web/WebSocket server
agento --no-cli # skip the interactive CLI channel
agento --no-mcp # skip the FastMCP server
agento --no-telegram # skip the Telegram channel
agento --no-discord # skip the Discord channel
Model selection is config-driven, not a CLI flag — set it in config.yaml's models.registry
(see "Model Configuration" below) or change it live via the POST /engine/models API /
POST /engine/sessions/{id}/model for one session.
# Export to current directory (.agents/ subfolder)
agento --init
# Export to a specific project directory
agento --init /path/to/my-project
(--setup remains a back-compat alias for --init.)
agento-api # http://127.0.0.1:9000 by default (channels.web.port)
agento-api --port 9001
agento-api --config /path/to/config.yaml
| Method | Path | Description |
|---|---|---|
GET | /health | Liveness check |
GET | /sessions | List live sessions |
POST | /sessions | Create / resume a session |
GET | /sessions/{id} | Session metadata |
DELETE | /sessions/{id} | Clear session |
POST | /sessions/{id}/chat | Send message → SSE stream |
POST | /sessions/{id}/shutdown | Tear down agent (keep history) |
GET | /history/sessions | List all saved session IDs |
GET | /history/sessions/{id}/export | Export working-copy history (JSON) |
GET | /history/sessions/{id}/full-export | Export full archive (JSON) — never trimmed |
{"type": "tool_call", "name": "...", "args": {...}}
{"type": "tool_result", "name": "...", "content": "..."}
{"type": "token", "content": "..."} // intermediate AI text
{"type": "done", "content": "..."} // final answer
{"type": "error", "content": "..."} // something went wrong
Run Agent_head as an MCP server so other agents, Claude Desktop, or Cursor can connect:
# stdio transport (default — Claude Desktop, Cursor, other agento-mcp instances)
agento-mcp
agento-mcp --config /path/to/config.yaml
# SSE transport (LAN / internet agent networks)
agento-mcp --transport sse --port 9000 --host 0.0.0.0
# Streamable HTTP (modern MCP standard, production use)
agento-mcp --transport http --port 9000
8 MCP tools exposed:
| Tool | Description |
|---|---|
orchestrate_task | One-shot task execution |
create_session | Create or join a persistent session with agent identity |
chat | Multi-turn conversation in a session |
list_sessions | List all active sessions |
get_session_history | Retrieve conversation history |
list_agents | List configured workers & tools |
get_status | Agent health + workload (for supervisors) |
close_session | Tear down a session and persist history |
Agent_head uses a two-layer storage model so you never lose conversation history:
Every turn
│
├─► append_to_archive() ← PERMANENT — every message, never trimmed
│
├─► save_session() ← WORKING COPY — windowed slice for LLM input
│
└─► [if threshold hit] summarize()
│
└─► save_session(trimmed_history) ← WORKING COPY shrinks
(archive stays untouched)
On session resume:
GET /history/sessions/{id}/full-export for debugging# config.yaml
agent:
debug: true
When enabled, every prompt fed to the LLM is written to .agents/logs/runs/<session_id>.log.
Can also be flipped live from agento-webui's Config page (Agent tab → "Debug Mode" toggle) — it
takes effect immediately on already-running sessions, no restart required, since it's a pure
logging switch rather than something baked into a session's compiled graph.
While agent.debug: true, every AI response received during a live session's turn (not just the
legacy single-shot path above) is additionally written out as its own complete JSON file — full
content, additional_kwargs (provider-specific extras), response_metadata (model name, finish
reason, etc.), tool_calls, and usage_metadata (token counts), not just the reply text:
logs/sessions/raw_responses/
├── sess-abc123_turn0001_2026-08-19T02-10-03.120Z.json
├── sess-abc123_turn0002_2026-08-19T02-10-07.884Z.json
└── ...
Each MCP task creates a structured log in the configured log_dir:
logs/mcp/jobs/
├── 2025-04-20_12-00-00_abc123.log
└── 2025-04-20_12-05-30_def456.log
config.yamlagento-mcp)npx @modelcontextprotocol/server-filesystem --help # verify install
pip show chromadbmemory/ directory has write permissionsuvx agent-rag-mcp) is installedchat_history.backend: "sqlite" in configconnection_string path is writablesummarize_every_n_messages to compress more aggressivelykeep_recent_messages: 4-6 for smaller context windowssummarizer.model config)max_iterations for faster single-turn responsesagent_orchestrator_template/
├── main.py # Entry point (installed as `agento`) — starts all enabled services
├── api/
│ └── server.py # FastAPI REST + WebSocket server (legacy /sessions/* + new /engine/* routes)
├── engine/ # Centralized agent engine (new architecture)
│ ├── factory.py # EngineFactory — routes channel messages to sessions
│ ├── session_registry.py # SessionRegistry — per-channel_id AgentSession lifecycle
│ ├── event_bus.py # Pub/sub for turn events (tool_call/token/done/...)
│ ├── persistence.py # SQLite persistence (engine.db) — messages + turns
│ ├── heartbeat.py # Proactive scheduled/heartbeat turns
│ ├── notifications.py # Outbound agent → human notification sink
│ ├── tool_approval.py # Approval-gated tool execution
│ ├── media_store.py # Media attachment storage
│ ├── models.py # EngineEvent and related dataclasses
│ └── current.py, turn_runner.py
├── channels/ # Interface adapters that attach to the engine
│ ├── base.py # BaseChannel abstraction
│ ├── cli_channel.py # CLI/TUI channel
│ ├── web_channel.py # Web/browser channel
│ ├── discord_channel.py
│ └── telegram_channel.py
├── core/ # Shared runtime library used by both architectures
│ ├── agent/ # LangGraph ReAct loop, REPL, TUI
│ │ ├── agent.py # Single-shot orchestrator
│ │ ├── agent_runner.py # Interactive per-turn ReAct loop
│ │ ├── repl.py # Plain-text REPL (TUI fallback)
│ │ └── tui.py, tui_*.py # Textual full-screen TUI + config/env/history screens
│ ├── config/ # Config loading, runtime store, secrets
│ │ ├── config_loader.py, config_models.py
│ │ ├── runtime_config.py, runtime_overlay.py
│ │ └── secret_ref.py, secrets_store.py, mutation_policy.py, mcp_import.py, paths.py
│ ├── llm/ # LLM provider factory + summarization
│ │ ├── llm.py # Provider dispatch (openai/anthropic/bedrock/ollama/...)
│ │ ├── conversation_summarizer.py
│ │ ├── summarization_apply.py, summarizer_settings.py, token_estimate.py
│ ├── mcp/ # MCP client/server
│ │ ├── mcp_loader.py, mcp_server.py, mcp_tools.py
│ ├── memory/ # Long-term memory + conversation history backends
│ │ ├── history.py, history_sqlite.py # Conversation history (legacy path)
│ │ ├── memory.py, memory_sqlite.py, memory_rag.py # Long-term memory backends
│ │ └── rag/ # Chunk → embed → store → watch pipeline
│ ├── notifications/ # Inbound notification sources (Discord/Twitter/webhooks/...)
│ │ └── social/
│ ├── session/ # AgentSession primitive (used by MCP server + engine)
│ │ ├── session.py, session_logger.py, job_logger.py
│ └── tools/ # Tool assembly pipeline
│ ├── tool_registry.py, task_scheduler.py, skill_loader.py
│ └── image_tools.py, audio_tools.py, notify_tool.py, self_config_tool.py, sleep_tool.py, summarize_tool.py
├── skills/ # Skills directory (SKILL.md files)
├── docs/ # Architecture + reference docs
├── config.yaml # Default config
├── pyproject.toml # Package config
├── .agents/ # Local project config (auto-created by --init)
│ ├── config.yaml # Factory defaults — never rewritten by the running app
│ ├── runtime_config.json # Live config — sole source of truth once generated
│ ├── service_config/
│ ├── logs/runs/ # Per-session debug logs
│ └── skills/ # Project-local skills
├── memory/ # Long-term memory storage
└── service_config/ # Worker + service configs
@lc_tool decorated function and add it to all_tools in main.py / api/server.py / core/mcp/mcp_server.pycore/llm/llm.py's get_llm() factorymodels.registry (or embedding_models.registry) in config, or register one at runtime via POST /engine/models / the agento-webui Models tabConversationHistoryBackend in core/memory/history.pyskills/<name>/SKILL.md — auto-discovered, no code changes neededpytest
pytest --cov=core --cov-report=html
Code style: black formatting, PEP 8, type hints, docstrings.
MIT License — see LICENSE file for details.
sessions (windowed, LLM feed) + session_archive (append-only, never trimmed). Full history preserved even after summarisation.GET /history/sessions/{id}/full-export: New API endpoint to retrieve the complete, unabridged session conversation.--session flag defaults to "default" session. Use --session no for ephemeral (no persistence) mode.mcp_server.py Bug Fixes: Fixed datetime.now() crash (was calling method on module, not class), fixed image tools loading inside except block (only loaded when memory failed), added archive support.core/llm/llm.py.agento-mcp)For more information, see the orchestra system documentation.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.2.0 | 17 Oct 2026 | 50 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:50 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:5ec9b033e61f3ffca951f5123eb4529c684b58c1d0198fd9645500514605d79b