# Section 10 · Observability and cost control An unobserved agentic system is ungovernable and unpredictable in cost. Observability is not an end-of-project option; it is a design property, carried by the middleware chain. And the trace it produces does not serve the dashboard alone: the same stream feeds continuous behavioral evaluation (section 12) and provenance (section 08). ## Three independent levels of observability | Level | What | Use | | --- | --- | --- | | Structured logs | One line per event, typed context (module, request ID, session). | Standard aggregation, search, alerting. | | Lifecycle events | Every orchestrator step and every tool call persisted. | Replay of a trajectory, behavioral audit. | | Per-model-call metrics | Input and output tokens, cache, tier used, duration, status, attempt. | Cost and performance tracking per agent. | ## Propagating a request ID A unique identifier is propagated from the entry point to every tool and model call, and down to subagents via parent-child lineage. It is what makes it possible to reconstruct a complete trajectory after the fact, a condition of the auditability required in regulated environments. ## Reconstructing the context of a past decision Auditing a decision is not just finding that a call took place; it is reconstructing the context as it was at the moment the agent decided. Yet working memory consolidates and forgets (section 06). Observability must therefore be able to unfold a compressed memory back to the raw facts it came from, at the exact timestamp of the decision, by following the pointers deposited at consolidation. Current execution stays light; explaining a past decision stays possible, even after working memory has summarized it. This is the condition of an audit that holds in a regulated environment. A consequence often forgotten: these traces contain prompts and outputs, hence data. Exporting them to a third-party observability service is an exfiltration like any other; they follow the same sovereignty regime as the data they carry (section 15). ## Cost is steered by architecture, not by luck Three levers, all structural, keep cost under control: - Model boundary: anything deterministic does not pay the price of a model call. - Tier-based routing: a task's estimated complexity selects the fast, balanced, or deep tier. In doubt, go up one tier rather than risk a bad answer. - Caching and prompt stability: the stable segments of the prompt are positioned for reuse. Content stability takes precedence over token reduction alone. ## ! Explicit caps in continuous operation For a system running in the background, an aggregated cost counter per root task and caps per time window are indispensable. On overrun, the orchestrator stops and returns a synthesis, rather than continuing unchecked. Recurring cost thus becomes a steered quantity, not an endured one. **Key takeaways** - Three independent levels: structured logs, lifecycle events, per-model-call metrics. - A request ID propagated everywhere makes every trajectory replayable and auditable. - Cost is steered by the model boundary, tier-based routing, and caching, plus explicit caps. - The trace is not just a dashboard: it is the single stream that also feeds continuous evaluation and provenance. - Traces contain prompts and outputs, hence data: same sovereignty regime; third-party export is an exfiltration. - Auditing means reconstructing the context of a decision: unfold a consolidated memory back to its raw facts at the timestamp, via the consolidation pointers. --- © Thibault Souris, 2026 · Creative Commons BY-ND 4.0 (https://creativecommons.org/licenses/by-nd/4.0/) · the work’s text unaltered, as plain text for this page; the PDF version is the reference: https://runward.dev/docs/en/reference/doctrine/Designing-and-Running-Agentic-Systems-2026.pdf