traceagently
v0.1.0
Published
Real-time observability for AI agents. See every thought, tool call, and error — live.
Maintainers
Readme
traceagently
Real-time observability for AI agents. See every thought, tool call, and error — live.
Install
npm install traceagently
# or
pnpm add traceagentlyQuick Start
import { TraceAgently } from "traceagently";
const ta = new TraceAgently({ apiKey: "ta_live_..." });
const trace = await ta.startTrace({
agentId: "support-bot",
task: "Refund user #123",
});
await trace.thought("I need to check the order database");
await trace.toolCall("check_order", { userId: 123 });
await trace.toolResult({ status: "delivered" });
await trace.finalResponse("Cannot refund a delivered order");Or with the callback form (auto-closes on completion or error):
await ta.trace({ agentId: "support-bot", task: "Refund user #123" }, async (t) => {
await t.thought("Checking order...");
await t.toolCall("check_order", { userId: 123 });
await t.toolResult({ status: "delivered" });
await t.finalResponse("Cannot refund a delivered order");
});Traces appear live at app.traceagently.com.
Event Types
| Method | Description |
|---|---|
| trace.thought(content) | A reasoning step |
| trace.toolCall(name, args) | Tool invocation |
| trace.toolResult(result) | Tool result |
| trace.error(message) | An error |
| trace.finalResponse(content) | Final answer — also ends the trace |
API Keys
Get your API key at app.traceagently.com/dashboard/keys.
