Task Lifecycle
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.
| Code | Full Name | Role |
|---|---|---|
| USR | User | Task creator |
| WS | Hermes Workspace | Agent workspace UI |
| API | hermes-optx-api | Task orchestration API |
| DB | SpacetimeDB | Edge database |
| JOE | AstroJOE | Executing agent |
| HH | HEDGEHOG | AI gateway (Grok proxy) |
| GRK | Grok 4.20 | LLM 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:
- Task exists and is in
Openstatus - Agent has required capabilities (if specified)
- Gaze verification is satisfied (if
gaze_required = true) - 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.
Related
- Swarm Decomposition — Multi-agent DAG workflows
- Gaze-Gated Policy — Biometric verification gate
- Task Orchestration — API reference