@maiife-ai-pub/trace
v0.2.2
Published
Agent workflow tracer — trace, view, and analyze agent execution spans
Maintainers
Readme
@maiife-ai-pub/trace
Agent workflow tracer — trace, view, and analyze agent execution spans with OTLP export support.
Part of the Maiife AI Governance Toolkit.
Install
npm install -g @maiife-ai-pub/trace
# or use as a library
npm install @maiife-ai-pub/traceCLI
# List recent traces
maiife-trace list
# List traces from last 7 days
maiife-trace list --days 7
# View a specific trace
maiife-trace view --id <traceId>
# Analyze traces for patterns
maiife-trace analyzeMCP Server
{
"mcpServers": {
"maiife-trace": {
"command": "npx",
"args": ["@maiife-ai-pub/trace", "mcp"]
}
}
}Available tools: trace_list, trace_view, trace_analyze
Programmatic API
import { createTracer, exportOTELFile } from "@maiife-ai-pub/trace";
const tracer = createTracer();
const id = tracer.startTrace("my-agent", "chat-completion");
tracer.addSpan(id, "llm-call", { model: "claude-sonnet-4-6", tokens: 1200 });
tracer.endTrace(id, "success");
// Export as OTLP/JSON for Jaeger, Grafana Tempo, etc.
exportOTELFile(tracer.getAll());Traces are persisted to ~/.maiife/traces/ automatically on endTrace.
Set OTEL_EXPORTER_OTLP_ENDPOINT to push traces to an observability backend.
License
Apache 2.0 — Built by Maiife
