Skip to content

Latest commit

 

History

History
55 lines (36 loc) · 1.31 KB

File metadata and controls

55 lines (36 loc) · 1.31 KB

Tracer & Playground

Tracer

Tracer saves trace files and serves a local UI for inspecting conversations.

Set trace_id to save trace files:

import { AutoLLMClient } from "@prismshadow/agenthub";

const client = new AutoLLMClient({ model: "gpt-5.5" });

const config = { trace_id: "agent1/conversation_001" };

for await (const event of client.streamingResponseStateful({
  message: {
    role: "user",
    content_items: [{ type: "text", text: "Hello" }],
  },
  config,
})) {
  console.log(event);
}

Default cache dir: cache, or AGENTHUB_CACHE_DIR. For trace_id="agent1/conversation_001", AgentHub writes:

  • cache/agent1/conversation_001.json: Structured trace data with the full history and config.
  • cache/agent1/conversation_001.txt: Human-readable conversation transcript.

Browse traces:

import { Tracer } from "@prismshadow/agenthub/integration/tracer";

const tracer = new Tracer();
tracer.startWebServer("127.0.0.1", 25750);

Open Tracer at http://127.0.0.1:25750.

Playground

Playground starts a local chat UI for manual model checks.

Start Playground for manual chat:

import { startPlaygroundServer } from "@prismshadow/agenthub/integration/playground";

startPlaygroundServer("127.0.0.1", 25751);

Open Playground at http://127.0.0.1:25751.