@sisu-ai/mw-trace-viewer
v11.0.0
Published
Generate interactive HTML and JSON traces to inspect every model call, tool action, and error.
Downloads
401
Maintainers
Readme
@sisu-ai/mw-trace-viewer
Generate interactive HTML and JSON traces to inspect every model call, tool action, and error.
Setup
npm i @sisu-ai/mw-trace-viewerUsage
import { traceViewer } from '@sisu-ai/mw-trace-viewer';
const app = new Agent()
.use(traceViewer({ style: 'dark' }))
// ...rest of your pipelineOptions
enable?: boolean— force on/off (default: enabled when--traceorTRACE_JSON=1/TRACE_HTML=1present)path?: string— output target;.htmlwrites HTML only,.jsonwrites JSON + HTML sidecar (default:trace.json)html?: boolean— write HTML (defaulttrue, or controlled byTRACE_HTML=1env var)json?: boolean— write JSON (defaulttrue, or controlled byTRACE_JSON=1env var)style?: 'light'|'dark'— built‑in themes (defaultlight)template?: (doc, style) => string— custom HTML rendererdir?: string— directory for traces when no explicit path given (default:traces)
CLI / Env
--traceor--trace=run.json|run.html— enable tracing with optional output path--trace-style=light|dark— set theme via CLITRACE_JSON=1— enable tracing and control JSON output (only JSON if set alone)TRACE_HTML=1— enable tracing and control HTML output (only HTML if set alone)TRACE_STYLE=dark— set theme via env var
Priority: Options passed to traceViewer() always take precedence over env vars. If neither are set, both HTML and JSON are written by default.
What’s captured
input,finalmessage text- Full
messagesarray eventsfrom the tracing logger (wrapsctx.logunder the hood)
Community & Support
Discover what you can do through examples or documentation. Check it out at https://github.com/finger-gun/sisu. Example projects live under examples/ in the repo.
Documentation
Core — Package docs · Error types
Adapters — OpenAI · Anthropic · Ollama
- @sisu-ai/mw-agent-run-api
- @sisu-ai/mw-context-compressor
- @sisu-ai/mw-control-flow
- @sisu-ai/mw-conversation-buffer
- @sisu-ai/mw-cors
- @sisu-ai/mw-error-boundary
- @sisu-ai/mw-guardrails
- @sisu-ai/mw-invariants
- @sisu-ai/mw-orchestration
- @sisu-ai/mw-rag
- @sisu-ai/mw-react-parser
- @sisu-ai/mw-register-tools
- @sisu-ai/mw-tool-calling
- @sisu-ai/mw-trace-viewer
- @sisu-ai/mw-usage-tracker
- @sisu-ai/tool-aws-s3
- @sisu-ai/tool-azure-blob
- @sisu-ai/tool-extract-urls
- @sisu-ai/tool-github-projects
- @sisu-ai/tool-rag
- @sisu-ai/tool-summarize-text
- @sisu-ai/tool-terminal
- @sisu-ai/tool-web-fetch
- @sisu-ai/tool-web-search-duckduckgo
- @sisu-ai/tool-web-search-google
- @sisu-ai/tool-web-search-openai
- @sisu-ai/tool-wikipedia
Anthropic — hello · control-flow · stream · weather
Ollama — hello · stream · vision · weather · web-search
OpenAI — hello · weather · stream · vision · reasoning · react · control-flow · branch · parallel · graph · orchestration · orchestration-adaptive · guardrails · error-handling · rag-chroma · web-search · web-fetch · wikipedia · terminal · github-projects · server · aws-s3 · azure-blob
Contributing
We build Sisu in the open. Contributions welcome.
Contributing Guide · Report a Bug · Request a Feature · Code of Conduct
Star on GitHub if Sisu helps you build better agents.
Quiet, determined, relentlessly useful.
