Token Efficiency Encyclopedia

Structured State Extraction

Replace the growing conversational transcript with an explicit, mutable state object that the agent reads and patches at each step, instead of appending every observation and reasoning trace to context.

How It Works

At each step the model receives three inputs: an immutable task/procedure specification, the current structured state, and the latest observation. The model emits a state delta (a patch) rather than free-form continuation; a runtime validates the patch against a schema and merges it into state (Σₜ₊₁ = Σₜ ⊕ ΔΣₜ). Intermediate reasoning traces are discarded once the patch is validated — they are never carried forward into the next turn's prompt, unlike in transcript-based agent loops.

This only works when the task's state is a sufficient statistic: everything the agent needs to act correctly must be representable in the current state, discoverable as execution proceeds. Tasks defined over the trajectory itself (auditing, debugging "what happened") don't fit this pattern.

Complexity

This is the mechanism behind the technique's payoff on long horizons — the gap widens with T, not just with prompt size.

Evidence

From Badhe, Tiwari & Chung, "SKILL.state: Scalable Long-Horizon Agent Skills" (EMNLP; arXiv:2608.26263):

Benefits

Anti-patterns

See Also

Tools