@openclaw-agent-trace/core
v0.1.2
Published
Core types, schemas, and utilities for Agent Monitor
Downloads
34
Readme
@openclaw-agent-trace/core
Core types, schemas, and utilities for Agent Monitor — open-source observability for AI agents.
What's Inside
- Types — Event, Agent, Analytics type definitions
- Schemas — Zod validation schemas for all data structures
- Redaction Engine — Strips API keys and secrets from 20+ providers before data leaves your machine
- Cost Calculator — Built-in pricing for OpenAI, Anthropic, Google, Mistral, DeepSeek, Groq, Cohere
- Event Classifier — Categorizes events by type (LLM, tool call, API, shell, etc.)
- Fingerprinting — Deduplication via content hashing
Install
npm install @openclaw-agent-trace/coreUsage
import {
RedactionEngine,
calculateEventCost,
classifyEvent,
generateId,
} from '@openclaw-agent-trace/core';
// Redact sensitive data
const engine = new RedactionEngine();
const cleaned = engine.redact(myData);
// Calculate cost for an LLM event
const cost = calculateEventCost(event);
// Generate time-sortable UUID v7
const id = generateId();Part of Agent Monitor
This is the core library used by:
@openclaw-agent-trace/sdk— Client SDK for tracking events@openclaw-agent-trace/server— API server
GitHub: https://github.com/YasirAmeen/agent_open_claw_trace
License
MIT
