Intelligence · type

AgentState

Four states, and a second request that has no edge to arrive on.

Explained in Agents and behaviour.

type AgentState = 'idle' | 'running' | 'ahead' | 'ready'
import type { AgentState } from '@driftengine/ai';

In depth

            intent completes, buffer empty
        ┌───────────────────────────────────────┐
        ▼                                       │
      IDLE ── floor supplies ──▶ RUNNING ───────┤
                                    │           │
                    remaining ≈ p90 latency     │
                                    ▼           │
                                  AHEAD         │
                                    │           │
                        response lands          │
                                    ▼           │
                                  READY ────────┘
                                          intent completes,
                                          buffer drains

continuationIssued is legal only from running. That is the whole of the one-request-in-flight guarantee: a counter can be violated by any path that forgets to check it, where an edge that does not exist cannot be taken.