OPTXOPTX DOCS
Architecture Flows

Task Lifecycle

701515

Happy path sequence diagram — from task creation through HEDGEHOG execution to completion.

Task Lifecycle (Happy Path)

The complete success workflow from user request through agent execution to result storage.

Task Lifecycle — User submits task, JOE claims and executes via HEDGEHOG, completes with DAG check
Task Lifecycle (Happy Path)
CodeFull NameRole
USRUserTask creator
WSJettChat / WorkspaceAgent UI (SSE streaming via hermes-optx-api)
APIhermes-optx-api v0.3.0Task orchestration + SSE streaming + Tempo billing
DBSpacetimeDBEdge database
JOEAstroJOEExecuting agent
HHHEDGEHOGAI gateway (Grok proxy)
GRKGrok 4.20LLM inference

Key Concepts

Task Discovery

AstroJOE discovers tasks by subscribing to SpacetimeDB's memory_entry table filtered by category = "task" and status = "Open". SpacetimeDB's subscription model delivers real-time notifications without polling.

Claim Validation

When an agent claims a task, the API validates:

  1. Task exists and is in Open status
  2. Agent has required capabilities (if specified)
  3. Gaze verification is satisfied (if gaze_required = true)
  4. Policy constraints are met

Execution

The agent uses its SKILL.md tools to execute — typically via HEDGEHOG for AI reasoning, SpacetimeDB for data retrieval, or AARON for gaze operations.

DAG Resolution

On completion, the orchestrator checks if this task unblocks any dependent tasks. If all dependencies for a waiting task are Completed, it auto-transitions to Claimed for the assigned agent.