Drop the Cisora SDK into any Node.js or TypeScript agent. Three lines wires the flight recorder around every model and tool call.
Install
npm install @cisora/sdkQuickstart
import { Cisora } from '@cisora/sdk';
const cisora = new Cisora({
apiKey: process.env.CISORA_API_KEY!,
agentName: 'customer-support-bot',
});
// Wrap any LLM call
const reply = await cisora.modelCall('claude-sonnet-4-5', () =>
anthropic.messages.create({ /* … */ })
);
// Wrap any tool call
const sent = await cisora.tool('send_email', () =>
resend.emails.send({ /* … */ })
);
// Or check a planned action before running it
const decision = await cisora.check({
actionType: 'tool',
toolName: 'delete_user',
inputs: { userId: 'u_123' },
});
if (decision.decision === 'block') throw new Error(decision.reason);What gets captured
- Model name, prompt tokens, completion tokens, USD cost (auto-computed)
- Tool name, full input arguments, return value (PII auto-redacted)
- Duration in ms, success or error, error message + stack
- session_id, trace_id, parent_span_id for distributed traces
- User-tagged metadata (any JSON-serializable fields you add)
- Policy decision for every action (allow / block / review)
Notes
Fail-open by default
If Cisora is unreachable the SDK swallows the error and lets your call continue. Set { failOpen: false } to fail-closed for high-risk agents.
Works with any framework
Wrap any function — vanilla fetch, OpenAI, Anthropic, Bedrock, Mistral, custom HTTP clients. The wrapper is provider-agnostic.
Next steps
- · REST API reference — full endpoint list
- · Write your first policy — gate unsafe actions
- · SDK reference — methods and options