ductor v0.8.0
ductor v0.8.0
Multi-agent system, group chat mode, Docker sandboxing for multi-agent, and robust inter-agent communication.
Multi-agent system
Run multiple ductor agents in a single process — each with its own Telegram bot, provider config, and workspace, coordinated by a central supervisor.
- Single-process supervisor:
AgentSupervisormanages main + sub-agents as supervised asyncio tasks with automatic crash recovery (exponential backoff, max 5 retries). agents.jsonconfig: Define sub-agents with their own Telegram token, provider, model, and reasoning effort. Hot-reloaded via FileWatcher — add/remove agents without restart.- Inter-agent bus: In-memory
InterAgentBusfor sync and async messaging between agents. CLI tools useask_agent.py/ask_agent_async.pyvia the internal HTTP API. - Internal HTTP API: Localhost aiohttp server (
127.0.0.1:8799) bridges CLI subprocesses to the bus. Endpoints:/interagent/send,/interagent/send_async,/interagent/agents,/interagent/health. - Shared knowledge:
SHAREDMEMORY.mdat root is automatically synced into every agent'sMAINMEMORY.mdviaSharedKnowledgeSync. - Health monitoring: Live health status per agent (starting/running/stopped/crashed) with uptime, restart count, and last crash error. Exposed via
/interagent/healthandductor status. - Agent identity: Each agent gets its own
CLAUDE.md/AGENTS.md/GEMINI.mdwith injected identity (name, role, available peers). - CLI management:
ductor agentslists all sub-agents.ductor agents add <name>/ductor agents remove <name>for interactive management. - Telegram commands:
/agentslists running agents with health status./agent_restart <name>restarts a sub-agent in-process. - Ordered startup: Main agent starts first (Docker, workspace, auth), sub-agents start only after main is ready — no race conditions.
Thanks to @n-haminger for the initial multi-agent system implementation in #16!
Group mention-only mode
New group_mention_only config option for running ductor in Telegram group chats without responding to every message.
- Bot only responds when mentioned (
@botname) or replied to directly. - Works for both text and media messages.
- Enable via
"group_mention_only": trueinconfig.json.
Thanks to @n-haminger for #15!
Docker multi-agent support
Shared Docker container architecture for multi-agent mode — all agents use one sandbox.
- Single shared container: Root
~/.ductormounted at/ductor. Main agent creates the container; sub-agents reuse it via class-level asyncio lock (no race conditions). - Per-agent working directory:
docker exec -w /ductor/agents/<name>/workspaceensures each agent operates in its own workspace. - Container path mapping: Host paths are translated to container paths (
~/.ductor/agents/test/workspace→/ductor/agents/test/workspace). - Inter-agent communication in Docker:
--add-host=host.docker.internal:host-gatewayfor Linux DNS resolution.InternalAgentAPIbinds to0.0.0.0in Docker mode so containers reach the bus. - No rebuild needed: Existing Docker users just need
ductor stop && ductor— the image stays the same, only the container is recreated with correct flags.
Bug fixes
- Codex parser:
parse_codex_result()no longer leaks raw JSONL when Codex produces no assistant text (e.g. silent-success tasks). Differentiates between genuine empty output and unparseable output. - Skill sync race conditions:
_ensure_copyand_newest_mtimetolerate concurrent file operations from parallel agents (marker deletion,__pycache__repopulation, partial rmtree). - Lint/type fixes: Resolved ruff SIM102/SIM103/TRY300 warnings and mypy type narrowing issues across multiple files.
Upgrade
ductor upgrade
# or
pip install --upgrade ductorExisting Docker users:
ductor stop # removes old container
ductor # creates new container with correct multi-agent flags