Agent Container
Task Mode
Accepts aTaskAssignment from the orchestrator. Runs a bounded loop (max 20 iterations) of decide -> act -> learn. Returns a TaskResult with structured output and optional blackboard promotions.
Task mode is used for workflow steps where an agent is given a specific objective with expected output.
Chat Mode
Accepts a user message. On the first message, loads workspace context (AGENTS.md, SOUL.md, USER.md, MEMORY.md) into the system prompt and searches memory for relevant facts. Executes tool calls in a bounded loop (max 30 rounds) and runs context compaction when needed. Chat mode is used for interactive conversations via CLI, Telegram, or Discord.Self-Extending Skills
Agents can write their own Python skills at runtime using thecreate_skill tool and hot-reload them. Custom skills are Python functions decorated with @skill, auto-discovered from the agent’s skills_dir at startup.
Self-Improving via Learnings
Agents track tool failures inlearnings/errors.md and user corrections in learnings/corrections.md. These are automatically injected into the system prompt each session, so agents avoid repeating past mistakes.
Sub-Agents
Agents can spawn ephemeral sub-agents using thespawn_agent tool for specialized work. Sub-agents inherit the parent’s mesh connection but run independently.