Install
pnpm add @kestrel-agents/observability@0.7.0 @kestrel-agents/sdk@0.7.0Create a tracer and wrap the agent
import {
createTracer,
InMemoryTraceProcessor,
} from "@kestrel-agents/observability";
const tracer = createTracer({
processors: [new InMemoryTraceProcessor()],
});
const tracedAgent = tracer.wrapAgent(agent);The wrapper instruments run(), stream(), resume(), and subscribe() while
preserving their SDK contracts. Traces carry the Kestrel identities needed to
connect a request with its session, run, actor, tenant, and terminal outcome.
OpenTelemetry export
Kestrel's trace model can be exported through the package's OpenTelemetry bridge:
import { OpenTelemetryTraceExporter } from "@kestrel-agents/observability";
const exporter = new OpenTelemetryTraceExporter();The export layer does not replace Kestrel's durable run events or terminal results. It makes the same operation easier to find in an external tracing system.
Read the Observability reference and Reliability guide next.