Migrate Developer.hs to use agentd HTTP API

t-539.4·WorkTask·
·
·
Parent:t-539·Created2 weeks ago·Updated2 weeks ago

Description

Edit

Migrate Ava's Developer.hs to use agentd HTTP API instead of direct Agent.runAgent.

Current state:

  • Developer.hs spawns Agent.runAgent directly in-process
  • Tracks status via IORef and Telegram updates
  • No isolation, no persistence, no recovery

Target state:

  • Developer.hs calls agentd HTTP API to spawn agents
  • POST /agents with prompt, workspace, model
  • Polls GET /agents/:id for status (or uses webhook)
  • Can survive Ava restarts (agent runs independently)

Implementation: 1. Add HTTP client for agentd API in Developer.hs 2. Replace runOrchestrator logic with:

  • POST /agents to spawn
  • Poll GET /agents/:id or setup webhook for status
  • POST /agents/:id/stop for cancellation

3. Status message updates from webhook or polling 4. Handle agent completion via webhook callback

Benefits:

  • Agent runs survive Ava restarts
  • Multiple agents can run in parallel
  • Centralized agent management via agentd
  • Future: web UI for agent monitoring

Timeline (5)

💬[human]2 weeks ago

Note: Omni/Ava/Web.hs agent control plane now uses agentd HTTP API (spawn/send/stop) with agentd webhooks. Developer.hs still uses Agent.runAgent directly; needs migration.

🔄[human]Open → Done2 weeks ago
💬[human]2 weeks ago

Migrated Omni/Ava/Telegram/Developer.hs to spawn/poll agentd via HTTP (AGENTD_URL), track run_id, and stop via agentd. Added agentd helper types, status polling with timeout, and webhook URL support (AGENTD_WEBHOOK_URL). Removed in-process Agent.runAgent usage.