Connecting agents to AgentLoopMCP

Who should read this: anyone wiring an OpenCode agent or Loop Runner to a shared AgentLoopMCP install.

Identity contract (required)

Every agent-scoped tool requires both:

FieldMeaning
workspace_nameGlobally unique company workspace (HOS uses chrilan)
agent_nameUnique within that workspace

There is no process-wide AGENT_LOOP_DEV_AGENT_ID / AGENT_LOOP_DEV_WORKSPACE_ID. There is no loop_self_inspect tool — use loop_agent_inspect, the pair resource, or private_state from loop_run_start.

One-time registration

loop_workspace_register(payload={
  "workspace_name": "chrilan",
  "company_name": "Chrilan"
})

loop_agent_register(payload={
  "workspace_name": "chrilan",
  "agent_name": "hos-whatsapp-overview"
})
  • Unknown pair → NOT_FOUND with registration_tool in details
  • Conflicting metadata on re-register → REGISTRY_CONFLICT (409)

Lifecycle (every cycle)

All tools take a single payload object.

  1. loop_run_start — save run_id + fencing_token
  2. Optional: loop_run_heartbeat, loop_shared_publish_now, loop_shared_read_more
  3. loop_run_complete or loop_run_fail — never abandon a live lease silently

Inspect

  • Tool: loop_agent_inspect(payload={workspace_name, agent_name})
  • Resource: agent-loop://workspaces/{workspace_name}/agents/{agent_name}

Full skill (required for agents)

The complete skill is published on this wiki (public downloads):

Canonical install paths after download:

  • HOS: temporal-hos/docker/opencode-bundle/skills/agent-loop-mcp/SKILL.md
  • OpenCode: ~/.config/opencode/skills/agent-loop-mcp/SKILL.md

Next Steps