Skip to content

ductor v0.8.0

Choose a tag to compare

@PleasePrompto PleasePrompto released this 28 Feb 09:00
· 278 commits to main since this release

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: AgentSupervisor manages main + sub-agents as supervised asyncio tasks with automatic crash recovery (exponential backoff, max 5 retries).
  • agents.json config: 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 InterAgentBus for sync and async messaging between agents. CLI tools use ask_agent.py / ask_agent_async.py via 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.md at root is automatically synced into every agent's MAINMEMORY.md via SharedKnowledgeSync.
  • Health monitoring: Live health status per agent (starting/running/stopped/crashed) with uptime, restart count, and last crash error. Exposed via /interagent/health and ductor status.
  • Agent identity: Each agent gets its own CLAUDE.md / AGENTS.md / GEMINI.md with injected identity (name, role, available peers).
  • CLI management: ductor agents lists all sub-agents. ductor agents add <name> / ductor agents remove <name> for interactive management.
  • Telegram commands: /agents lists 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": true in config.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 ~/.ductor mounted 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>/workspace ensures 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-gateway for Linux DNS resolution. InternalAgentAPI binds to 0.0.0.0 in 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_copy and _newest_mtime tolerate 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 ductor

Existing Docker users:

ductor stop    # removes old container
ductor         # creates new container with correct multi-agent flags