ATO SDK (src/index.ts)

Agentic-Tool-Optimization · packages/sdk/src/index.ts · typescript · MIT
ai, analytics, integration, infra, tag:trace

Captures and sends LLM traces for analysis, providing cost calculation and batch flushing.

// Source: https://github.com/WillNigri/Agentic-Tool-Optimization | License: MIT | Copyright 2026 ClaudeScope Contributors
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * @ato/sdk — Auto-capture LLM traces for ATO
 *
 * Quick start:
 *   import { init } from '@ato/sdk';
 *   init({ apiKey: 'your-ato-api-key' });
 *
 * Then wrap your LLM client:
 *   import { wrapAnthropic } from '@ato/sdk/anthropic';
 *   import { wrapOpenAI } from '@ato/sdk/openai';
 *
 * Or capture traces manually:
 *   import { capture } from '@ato/sdk';
 *   capture({ provider: 'custom', model: 'my-model', ... });
 */

export { init, getClient, AtoClient, generateTraceId } from './client.js';
export { calculateCost, MODEL_PRICING } from './pricing.js';
export type { ModelPricing } from './pricin

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key