Complete Op migration for agent execution

t-427·WorkTask·
·
·
Created1 month ago·Updated1 month ago

Description

Edit

Fully migrate agent execution to Op free-monad programs.

Goal

Eliminate remaining runtime call sites of Engine.runAgent/runAgentWithProvider in favor of Op programs + interpreters, so the whole system uses the free-monad agent core end-to-end.

Current Direct Call Sites (non-test)

  • Omni/Agent/Telegram.hs
  • Omni/Agent/Telegram/Telegram.hs
  • Omni/Agent/Orchestrator.hs
  • Omni/Agent/Memory.hs
  • Omni/Agent/Subagent/Coder.hs
  • Omni/Agentd/Studio.hs
  • Omni/Agent/Op/Legacy.hs (bridge)

Requirements

1. Replace remaining Engine.runAgent* usage with Op programs + Seq/Par interpreters. 2. Preserve existing behavior (cost tracking, events, errors, tool calls, streaming where applicable). 3. Remove or quarantine Op.Legacy if no longer needed. 4. Update tests / docs accordingly.

Acceptance Criteria

  • No runtime call sites of Engine.runAgent* outside tests.
  • agentd Studio and Telegram workflows still emit trace events and status updates.
  • All affected modules build.

Notes

  • Use Omni/Agent/Programs/Agent.hs or other Op programs as the execution path.
  • Use existing SeqConfig hooks (events, iteration) to keep tracing intact.

Timeline (6)

🔄[human]Open → InProgress1 month ago
💬[human]1 month ago

Replaced remaining Engine.runAgent* runtime call sites with Op programs via new Omni.Agent.Op.Bridge runner (Telegram, Orchestrator, Memory, Coder subagent, Agentd Studio). Bridge preserves event/cost/tool trace callbacks, guardrail tracking, and tool trace behavior. Updated docs (README, ARCHITECTURE, Subagent DESIGN) and marked Op.Legacy deprecated. bild Omni/Agent/Telegram.hs timed out after 10m.

💬[human]1 month ago

Added Op bridge for legacy Engine callbacks; runtime paths now call OpBridge (Telegram, Orchestrator, Memory, Studio).

🔄[human]InProgress → Done1 month ago