1 · Ingress and Egress
Channel I/O is isolated from Agent reasoning. A session key serializes work for one conversation.
2 · Core Agent Loop
Loads AGENTS, SOUL, USER, TOOLS, SKILLS, EMBODIED, ENVIRONMENT, TASK, RUNTIME, TARGETS, SESSIONS, memory, and conversation history.
Calls the selected Provider with messages and tool schemas. Tool results re-enter the same context until the model returns final content or reaches maxToolIterations.
Filesystem, shell, web, message, subagent, cron, scene graph, image, MCP, and optional verify_session tools.
3 · Agent-Owned Services
Persists per-channel JSONL history.
Consolidates long histories into memory/MEMORY.md and memory/HISTORY.md.
Runs bounded background Agent work.
Applies semantic success/failure/replan verdicts from Runtime evidence.
4 · Track A / Track B Boundary
SESSIONS.md → queue and state
LOG.md + ENVIRONMENT.md + LESSONS.md + artifacts/runtime/* → evidence and feedback
Agent planning never calls a raw Target. It appends a pending Session; the Watchdog owns claim, Preflight, execution, and Runtime writeback.