Paidwen

Paidwen replays each session of your agents, step by step.

A session gathers what your agents did for one conversation: their calls to the model and their actions, in the order they happened. Paidwen builds it from the journal, with nothing to install beyond the SDK.

Name the session in the context of the SDK.

await paidwen.context({ sessionId: conversation.id }, async () => {
  await agent.run(conversation.message);
});
with paidwen.context(session_id=conversation.id):
    agent.run(conversation.message)

Every decision, tool call and human answer inside the context carries the session. The identifier holds up to 256 characters, for example the id of the conversation with your own customer.

Send the calls to the model through the span processor.

The replay shows the request, the reasoning and the answer of each call to the model, when your instrumentation records the messages. Add the span processor of the SDK to your OpenTelemetry setup, as in the quickstart:

new NodeTracerProvider({ spanProcessors: [paidwen.spanProcessor()] }).register();
provider = TracerProvider()
provider.add_span_processor(paidwen.span_processor())
trace.set_tracer_provider(provider)

Paidwen adds the session only to its own copy of each call. Your own traces stay as they are.

Each step shows what happened.

  • A call to the model shows the model, the new messages since the previous call of the same agent, the reasoning when the model returns it, the tools it asks for, its answer, the tokens and the cost.
  • An action shows its decision with the tool, the parameters, the verdict, the rule and the permission, then the human answer and the execution.

In the dashboard, open Sessions, then a session. Previous and Next, or the arrow keys, move from one step to the next.

The API reads the sessions page by page.

HTTP
GET /v1/agent-sessions?agent_id=0199f1c2-0000-7000-8000-000000000001
GET /v1/agent-sessions/conversation-4821?limit=100

Without from, the list covers the last 30 days. Each page carries a cursor: before for the list, after for the steps.

The replay has four limits.

  • It shows only what goes through the SDK.
  • A call whose instrumentation does not record the messages shows the model, the tokens, the cost and the duration.
  • The reasoning appears only when the model returns it and the instrumentation records it.
  • A session lasts as long as the journal of your plan: 7 days on the free plan, then 30 days, 90 days or 1 year.