Sinks¶
techrevati.runtime.sinks ¶
Sinks — pluggable observability outputs for the runtime.
The orchestrator emits two streams while running:
AgentEventlifecycle events (state transitions, recovery, gate, permission, handoff, budget). These go to anEventSink.- Per-turn usage (model +
UsageSnapshot+ cost). These go to aUsageSink.
Both protocols are tiny and synchronous. Default implementations
buffer in memory with a bounded ring so long-running sessions can't
balloon. Cross-process / cross-host observability (OpenTelemetry,
Datadog, your own pipeline) ships as a separate sink that wraps these
protocols — see techrevati.runtime.otel.
EventSink ¶
Bases: Protocol
Receives every AgentEvent the runtime produces.
UsageSink ¶
Bases: Protocol
Receives per-turn usage tuples (model, snapshot, cost in USD).
NoopEventSink
dataclass
¶
Discard every event. The default when no sink is configured.
NoopUsageSink
dataclass
¶
Discard every usage record. The default when no sink is configured.
RingBufferEventSink
dataclass
¶
In-memory bounded ring of recent events.
Useful for tests, debug consoles, and short-lived processes. The
buffer drops oldest entries silently once capacity is reached;
if you need durability, plug in an OTel sink or write a custom one.
RingBufferUsageSink
dataclass
¶
In-memory bounded ring of recent usage records.