Sign In

@ura-dev/agentrace

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ura-dev/agentrace

Structured observability for AI agents — MCP server + CLI viewer

latest
Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
14
-41.67%
Maintainers
1
Weekly downloads
 
Created
Source

agentrace

Structured observability for AI agents. See what your agent does, why it decides, and where it fails.

MCP server + CLI viewer. Zero dependencies. Works with Claude Code, Cursor, or any MCP client.

Install

# CLI only (global)
npm install -g @ura-dev/agentrace

# As a library in your project
npm install @ura-dev/agentrace

Usage

After install, the agentrace CLI and MCP server are available globally.

# View recent traces
agentrace list

# View a specific trace
agentrace view <trace-id>

# Watch a trace in real-time
agentrace watch <trace-id>

# Show statistics
agentrace stats

MCP Setup

Add to your AI tool config:

{
  "mcpServers": {
    "agentrace": { "command": "agentrace-mcp" }
  }
}

Your AI agent now has access to structured tracing tools.

MCP Tools

ToolDescription
trace_startStart a new trace session
trace_stepLog a step (action, tool used, input/output)
trace_decisionLog a decision point (options, chosen, reasoning)
trace_errorLog an error or unexpected state
trace_endEnd a trace session
trace_listList recent traces
trace_viewView a complete trace

CLI

agentrace list              # Recent traces
agentrace view <trace-id>   # Full trace with events
agentrace watch <trace-id>  # Real-time tail
agentrace stats             # Trace statistics

How it works

When an AI agent starts a complex task, it calls trace_start. As it works, it logs each step (trace_step), records decision points (trace_decision), and captures errors (trace_error). When done, it calls trace_end.

Traces are stored as JSON files in ~/.agentrace/traces/. You can view them with the CLI, or read them directly.

As a library

const { createTrace, addStep, addDecision, endTrace } = require('@ura-dev/agentrace');

const { id } = createTrace({ name: 'deploy pipeline', agent: 'my-agent' });
addStep(id, { action: 'build', tool: 'npm', output: 'success' });
addDecision(id, { question: 'Deploy target?', chosen: 'staging', reasoning: 'Friday deploy' });
endTrace(id, { status: 'completed', summary: 'Deployed to staging' });

Config

Env varDescription
AGENTRACE_DIROverride storage directory (default: ~/.agentrace)

License

MIT — ura

Keywords

agent

FAQs

Package last updated on 29 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts