Overview
Coevolved includes an event-based tracing system that emits structured events for:- Step lifecycle (
start,end,error) - LLM prompts/responses
- Tool calls/results
- Agent loop phases (loop start/end, iteration start/end)
- pluggable (swap sinks/formatters)
- safe (sink failures should not break execution)
- privacy-aware (snapshot policies, optional prompt logging)
Events and sinks
Events are dataclasses emitted by aTracer. A tracer can be configured with one or more sinks.
The default tracer includes a console sink for lightweight visibility during development.
Common sink strategies:
- Log to stdout in dev
- Write JSON lines to a file in staging
- Forward events to a queue or observability pipeline in production
JSONLSink with a serializer:
Snapshot policy
Snapshots are optional “captured views” of input/output state attached to events.SnapshotPolicy controls when snapshots are captured:
- Start events (input snapshot)
- End events (output snapshot)
- Error events (input snapshot)
Input hashing and redaction
To group invocations and de-duplicate traces, the tracer computes a hash of the input. If you pass aredactor to the tracer, it can scrub sensitive fields before hashing.
Hashing is a grouping tool, not a security boundary. If you handle secrets, implement redaction and avoid logging full prompt text.