Documentation
SDKs, integrations, and API reference for the agent identity and trust layer.
Quick Start
Get up and running with Vorim AI in 3 steps. Register an agent, check permissions, and emit audit events.
import createVorim from '@vorim/sdk';
// 1. Initialize with your API key
const vorim = createVorim({
apiKey: 'agid_sk_live_your_api_key_here',
baseUrl: 'http://localhost:3002', // optional, defaults to https://api.vorim.ai
});
// 2. Register an agent
const agent = await vorim.register({
name: 'InvoiceBot',
description: 'Processes and sends invoices',
capabilities: ['api_access', 'email_send'],
scopes: ['agent:read', 'agent:write', 'agent:communicate'],
});
console.log('Agent ID:', agent.agent.agent_id);
console.log('Private Key:', agent.private_key); // Save this! Shown only once.
// 3. Check permissions before performing actions
const check = await vorim.check(agent.agent.agent_id, 'agent:write');
if (check.allowed) {
// Perform the action...
// 4. Emit an audit event
await vorim.emit({
agent_id: agent.agent.agent_id,
event_type: 'api_request',
action: 'POST /invoices',
resource: 'invoices',
result: 'success',
latency_ms: 42,
});
}typescriptInstallation
Install the SDK using npm, yarn, or pnpm. Zero dependencies — types are bundled.
# npm
npm install @vorim/sdk
# yarn
yarn add @vorim/sdk
# pnpm
pnpm add @vorim/sdkbashThe SDK requires Node.js 18+ or any modern browser with the Fetch API and Web Crypto API.
Full type definitions included. The SDK re-exports types from @vorim/shared-types for convenience.
Agent Onboarding (Device Flow)
Your AI coding agent can set up Vorim for you. Instead of pasting an API key, the agent runs the OAuth 2.0 Device Authorization Grant (RFC 8628): it starts the flow, shows you a short code and a link, you approve once in the browser, and the agent receives a scoped key. The agent never mints a credential on its own. A signed in, email verified human approves before any key exists, and the key is clamped to a strict scope ceiling (agent registration and audit only).
The one call helper runs the approve and poll loop and, with registerAgent, also registers a first agent identity with the new key. It fails closed: it raises on denial, expiry, or timeout, and never returns a partial credential.
import { deviceLogin } from '@vorim/sdk';
// No API key needed to start. The agent runs this; you approve in the browser.
const { api_key, agent } = await deviceLogin({
clientName: 'my-app',
registerAgent: true, // also register a first agent identity with the new key
onUserCode: ({ user_code, verification_uri }) => {
// Show the human this, verbatim:
console.log(`Approve at ${verification_uri} and enter code ${user_code}`);
},
});
console.log('API key:', api_key); // scope: agents:write, audit:write
console.log('Agent:', agent?.agent.agent_id); // first agent, ready to use
console.log('Private key:', agent?.private_key); // shown once, store ittypescriptThe Python SDK mirrors it with device_login(register_agent=True).
from vorim import device_login
result = device_login(
client_name="my-app",
register_agent=True,
on_user_code=lambda i: print(
f"Approve at {i['verification_uri']} and enter code {i['user_code']}"
),
)
api_key = result["api_key"]
agent = result["agent"] # first agent identity, with its one-time private_keypythonIn an MCP client (Claude Desktop, Cursor) the agent drives it natively with the vorim_onboard_start and vorim_onboard_check tools, with no key required to begin. Or point any agent at the machine readable guide:
# Paste one line into your coding agent:
Read https://vorim.ai/agents.md and follow the device-flow bootstrap to get an
API key, then integrate per https://vorim.ai/documentation/quickstartbashThe unauthenticated start endpoint creates a pending request, not a credential. Only the hashes of the device and user codes are stored. The code is single use and expires in 10 minutes. The minted key is returned exactly once, expires in 90 days, and is revocable in Settings. The agent automates the plumbing. It does not replace your consent.
Framework Integrations
The SDK ships with first-class integrations for popular AI agent frameworks. Each integration provides permission-checked tool execution and automatic audit trail emission via subpath imports.
| Framework | Import | Key exports |
|---|---|---|
| LangChain / LangGraph | @vorim/sdk/integrations/langchain | wrapTool, wrapTools, VorimCallbackHandler, createVorimAgent |
| OpenAI Function Calling | @vorim/sdk/integrations/openai | VorimToolRegistry, runAgentLoop, createVorimOpenAIAgent |
| CrewAI | @vorim/sdk/integrations/crewai | registerCrew, emitCrewTaskEvent, verifyCrewTrust |
| LlamaIndex | @vorim/sdk/integrations/llamaindex | wrapTool, wrapTools, createVorimAgent |
| Anthropic / Claude | @vorim/sdk/integrations/anthropic | VorimToolRegistry, runAgentLoop, createVorimClaudeAgent |
LangChain / LangGraph
Wrap tools with permission checks, attach a callback handler for observability, or use the agent factory to register + wrap in one call.
import createVorim from "@vorim/sdk";
import { wrapTools, VorimCallbackHandler, createVorimAgent } from "@vorim/sdk/integrations/langchain";
const vorim = createVorim({ apiKey: "agid_sk_live_..." });
// Option 1: Wrap existing tools
const guardedTools = wrapTools([searchTool, analysisTool], {
vorim,
agentId: "agid_acme_a1b2c3d4",
permissionMap: { search_docs: "agent:read" },
});
// Option 2: Callback handler (observability only, non-blocking)
const handler = new VorimCallbackHandler(vorim, "agid_acme_a1b2c3d4");
await agent.invoke({ messages }, { callbacks: [handler] });
// Option 3: Full agent factory (register + wrap + observe)
const { agentId, tools, callbackHandler } = await createVorimAgent({
vorim,
name: "research-agent",
capabilities: ["web_search"],
scopes: ["agent:read", "agent:execute"],
tools: [searchTool, analysisTool],
});typescriptOpenAI Function Calling
Use VorimToolRegistry for permission-checked tool execution with OpenAI chat completions.
import OpenAI from "openai";
import createVorim from "@vorim/sdk";
import { VorimToolRegistry, runAgentLoop } from "@vorim/sdk/integrations/openai";
const vorim = createVorim({ apiKey: "agid_sk_live_..." });
const openai = new OpenAI();
const registry = new VorimToolRegistry({ vorim, agentId: "agid_acme_a1b2c3d4" });
registry.add({
name: "search_docs",
description: "Search internal documents",
parameters: { type: "object", properties: { query: { type: "string" } }, required: ["query"] },
execute: async ({ query }) => searchDocs(query),
permission: "agent:read",
});
// Use with chat completions
const response = await openai.chat.completions.create({
model: "gpt-4o",
messages,
tools: registry.toOpenAITools(),
});
// Execute tool calls — permission checked + audited automatically
const toolMessages = await registry.executeToolCalls(
response.choices[0].message.tool_calls ?? []
);typescriptCrewAI
Register an entire crew with Vorim. Each member gets a unique identity, and delegation permissions are auto-granted.
import createVorim from "@vorim/sdk";
import { registerCrew, emitCrewTaskEvent, verifyCrewTrust } from "@vorim/sdk/integrations/crewai";
const vorim = createVorim({ apiKey: "agid_sk_live_..." });
const crew = await registerCrew(vorim, {
crewName: "content-pipeline",
members: [
{ role: "researcher", name: "crew-researcher", capabilities: ["web_search"], scopes: ["agent:read", "agent:execute"] },
{ role: "writer", name: "crew-writer", capabilities: ["file_write"], scopes: ["agent:read", "agent:write"] },
{ role: "editor", name: "crew-editor", capabilities: ["review"], scopes: ["agent:read", "agent:write"], allowDelegation: true },
],
});
// Verify trust before running
const trustReport = await verifyCrewTrust(vorim, crew);
// Audit each task
await emitCrewTaskEvent(vorim, {
role: "researcher",
agentId: crew.getMember("researcher").agentId,
task: "research_competitors",
tool: "web_search",
result: "success",
latencyMs: 3200,
});typescriptLlamaIndex
Wrap LlamaIndex tools with permission checks. Drop-in replacement for any BaseTool.
import createVorim from "@vorim/sdk";
import { wrapTool, createVorimAgent } from "@vorim/sdk/integrations/llamaindex";
const vorim = createVorim({ apiKey: "agid_sk_live_..." });
// Wrap a single tool
const guarded = wrapTool(searchTool, {
vorim,
agentId: "agid_acme_a1b2c3d4",
permissionMap: { search: "agent:read" },
});
// Or use the agent factory
const { agentId, tools } = await createVorimAgent({
vorim,
name: "research-agent",
capabilities: ["search", "write"],
scopes: ["agent:read", "agent:write", "agent:execute"],
tools: [searchTool, writeTool],
permissionMap: { search: "agent:read", write: "agent:write" },
});
// const agent = new OpenAIAgent({ tools });typescriptAnthropic / Claude
Use VorimToolRegistry for permission-checked tool execution with Claude's tool use API.
import Anthropic from "@anthropic-ai/sdk";
import createVorim from "@vorim/sdk";
import { VorimToolRegistry, runAgentLoop } from "@vorim/sdk/integrations/anthropic";
const vorim = createVorim({ apiKey: "agid_sk_live_..." });
const anthropic = new Anthropic();
const registry = new VorimToolRegistry({ vorim, agentId: "agid_acme_a1b2c3d4" });
registry.add({
name: "search_docs",
description: "Search internal documents",
input_schema: { type: "object", properties: { query: { type: "string" } }, required: ["query"] },
execute: async ({ query }) => searchDocs(query),
permission: "agent:read",
});
// Use with Claude messages API
const response = await anthropic.messages.create({
model: "claude-sonnet-4-20250514",
max_tokens: 1024,
messages,
tools: registry.toAnthropicTools(),
});
// Execute tool_use blocks — permission checked + audited automatically
const toolResults = await registry.executeToolUseBlocks(
response.content.filter(b => b.type === "tool_use")
);
// Or use the full agent loop
const answer = await runAgentLoop({
vorim,
agentId: "agid_acme_a1b2c3d4",
anthropic,
model: "claude-sonnet-4-20250514",
systemPrompt: "You are a helpful assistant.",
registry,
userMessage: "Find docs about onboarding",
});typescriptMCP Server
The Vorim MCP server exposes all Vorim operations as tools for Claude Desktop, Cursor, VS Code, and any MCP-compatible AI client. Agents can register themselves, check permissions, log actions, and verify trust — all through natural language.
Installation
npm install -g @vorim/mcp-serverbashConfiguration
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"vorim": {
"command": "npx",
"args": ["@vorim/mcp-server"],
"env": {
"VORIM_API_KEY": "agid_sk_live_..."
}
}
}
}typescriptFor Cursor, add to .cursor/mcp.json in your project root with the same format.
Available Tools (19)
Example Usage
Once configured, you can use natural language in Claude, Cursor, or any MCP client:
// In Claude Desktop or Cursor, just ask:
"Register an agent called invoice-processor with read and execute permissions"
"Check if agent agid_acme_a1b2 has permission to execute"
"Log a tool_call event for agent agid_acme_a1b2: action=process_invoice, result=success"
"What's the trust score for agent agid_acme_a1b2?"
"Export the audit trail for the last 7 days"typescriptAgent Discovery
Vorim AI publishes a machine-readable Agent Card for automated discovery:
curl https://vorim.ai/.well-known/agent.jsonbashThis follows the A2A (Agent-to-Agent) discovery pattern, allowing other agents to programmatically discover Vorim's capabilities, endpoints, and authentication.
A2A Protocol Integration
The @vorim/a2a package adds identity and trust verification to Google's A2A (Agent-to-Agent) Protocol. Extend A2A Agent Cards with cryptographic identity and verify incoming agents before interacting.
Installation
# TypeScript
npm install @vorim/a2a
# Python (included in vorim >= 3.1.0)
pip install vorimbashExtend Your Agent Card
Add a vorimIdentity extension to your A2A Agent Card containing Ed25519 fingerprint, trust score, permission scopes, and a public verification URL.
import { createVorimA2A } from '@vorim/a2a';
const a2a = createVorimA2A({ apiKey: 'agid_sk_...' });
// Extend an existing Agent Card with Vorim identity
const card = await a2a.extendAgentCard(baseCard, 'agid_abc123');
// card.vorimIdentity = {
// agentId: "agid_abc123",
// publicKeyFingerprint: "a3f2...e91c",
// trustScore: 82,
// status: "active",
// scopes: ["agent:read", "data:read"],
// verifyUrl: "https://vorim.ai/v1/trust/verify/agid_abc123",
// badgeUrl: "https://vorim.ai/v1/trust/badge/agid_abc123.svg",
// verifiedAt: "2026-04-15T12:00:00Z"
// }typescriptVerify Incoming Agents
Before interacting with another agent, verify their trust score via Vorim's public API. The live score is checked independently, not from the self-reported value on the card.
// Verify an incoming agent's identity and trust
const result = await a2a.verifyAgent(incomingAgentCard);
if (result.trusted) {
console.log(`Verified: score ${result.score}, status ${result.status}`);
} else {
console.log(`Rejected: ${result.reason}`);
// "Trust score 32 is below minimum 50"
// "Agent is suspended"
// "Missing required scopes: data:write"
}
// Verify with custom requirements
const strict = await a2a.verifyAgent(card, {
minTrustScore: 70,
requiredScopes: ['data:read', 'agent:execute'],
});typescriptMiddleware
Wrap your A2A request handlers with automatic verification. Agents below your trust threshold are rejected before your code runs.
// Auto-verify incoming A2A requests
const handler = a2a.middleware({
minTrustScore: 70,
requiredScopes: ['data:read'],
auditLog: true, // log interactions as audit events
})(async (req) => {
// Only reached if sender agent passes all checks
const { vorimVerification } = req;
console.log(`Trusted agent: score ${vorimVerification.score}`);
return { status: 'ok' };
});typescriptCreate Agent Card from Scratch
Register a new Vorim agent and generate a complete A2A-compatible Agent Card in one call.
const card = await a2a.createAgentCard({
name: 'research-agent',
url: 'https://my-agent.example.com',
provider: { organization: 'Acme Corp' },
skills: [{ id: 'research', name: 'Web Research', tags: ['search'] }],
scopes: ['agent:read', 'data:read'],
});
// Returns a full A2A Agent Card with vorimIdentity extensiontypescriptPython
from vorim.a2a import VorimA2A
a2a = VorimA2A(api_key="agid_sk_...")
# Extend an Agent Card
card = a2a.extend_agent_card(base_card, agent_id="agid_abc123")
# Verify an incoming agent
result = a2a.verify_agent(incoming_card, min_trust_score=60)
if result.trusted:
print(f"Verified with score {result.score}")
# Create a new agent with A2A card
card = a2a.create_agent_card(
name="research-agent",
url="https://my-agent.example.com",
scopes=["agent:read", "data:read"],
)
# Decorator middleware
@a2a.middleware(min_trust_score=70, required_scopes=["data:read"])
def handle_task(request):
return {"status": "ok"}typescriptDiscovery Endpoint
Serve your Vorim-extended Agent Card at /.well-known/agent.json for A2A discovery:
// Express example
app.get('/.well-known/agent.json', async (req, res) => {
const card = await a2a.discoveryEndpoint('agid_abc123', {
name: 'my-agent',
url: 'https://my-agent.example.com',
skills: [{ id: 'research', name: 'Web Research' }],
});
res.json(card);
});typescriptPydantic AI Integration
Type-safe agent identity for Pydantic AI agents. Uses dependency injection to provide identity, permission checking, and audit logging through RunContext.
Installation
pip install vorim pydantic-aibashVorimDeps Dependency
Pass VorimDeps as your agent's dependency type. It provides check(), emit(), grant(), and verify() methods on the context.
from vorim.pydantic_ai import VorimDeps
from pydantic_ai import Agent, RunContext
agent = Agent('openai:gpt-4o', deps_type=VorimDeps)
@agent.tool
async def fetch_data(ctx: RunContext[VorimDeps], query: str) -> str:
# Check permission before acting
check = ctx.deps.check('data:read')
if not check.get('allowed'):
return 'Permission denied: data:read not granted'
result = do_something(query)
# Log the action
ctx.deps.emit('data.fetch', outcome='success')
return result
# Run with Vorim identity
deps = VorimDeps(api_key='agid_sk_...', agent_id='agid_abc123')
result = await agent.run('Fetch the latest data', deps=deps)typescriptvorim_tool Decorator
Automatically checks permissions and logs audit events on every tool call. No manual check()/emit() needed.
from vorim.pydantic_ai import VorimDeps, vorim_tool
agent = Agent('openai:gpt-4o', deps_type=VorimDeps)
@agent.tool
@vorim_tool(scope='data:read', action='data.fetch')
async def fetch_data(ctx: RunContext[VorimDeps], query: str) -> str:
# Permission checked automatically before this runs
# Audit event emitted automatically after this returns
return do_something(query)
# If permission is denied, tool returns 'Permission denied'
# and a denial audit event is loggedtypescriptQuick Start with create_vorim_agent
Register a new agent and create a Pydantic AI Agent in one call:
from vorim.pydantic_ai import create_vorim_agent
agent, deps = create_vorim_agent(
model='openai:gpt-4o',
api_key='agid_sk_...',
agent_name='research-agent',
scopes=['data:read', 'agent:execute'],
system_prompt='You are a research agent.',
)
result = await agent.run('Find the latest papers', deps=deps)typescriptStripe ACP Integration
Agent identity verification for Stripe's Agentic Commerce Protocol. Ensures only authorized agents with the transact permission can initiate checkouts.
Authorize Before Checkout
Three checks run before any checkout: transact permission, trust score threshold, and active status.
# Python
from vorim.stripe_acp import VorimACP
acp = VorimACP(api_key='agid_sk_...', min_trust_score=70)
result = acp.authorize_checkout(
agent_id='agid_abc123',
seller='acme-store',
amount=4999,
currency='usd',
)
if result['authorized']:
# Proceed with Stripe ACP checkout
print(f'Trust score: {result["trust_score"]}')
else:
print(f'Blocked: {result["reason"]}')typescriptExpress Middleware (TypeScript)
import createVorim from '@vorim/sdk';
import { createVorimACP } from '@vorim/sdk/integrations/stripe-acp';
const vorim = createVorim({ apiKey: 'agid_sk_...' });
const acp = createVorimACP(vorim, { minTrustScore: 70 });
// Agent must send X-Vorim-Agent-Id header
app.post('/checkouts', acp.middleware(), (req, res) => {
// Only reached if agent has transact permission + trust score >= 70
const { trustScore, status } = req.vorimAuthorization;
// Create Stripe checkout session...
});typescriptFlask/FastAPI Decorator (Python)
@acp.require_transact(agent_id_header='X-Vorim-Agent-Id')
def create_checkout(request):
# Only reached if agent passes all checks
return process_checkout(request)typescriptAudit Trail
Every commerce interaction is logged automatically:
- checkout.authorize — permission + trust verification (success or denied with reason)
- checkout.created — checkout session initiated
- checkout.completed — payment processed
- checkout.canceled — checkout abandoned
OpenClaw Integration
Give your OpenClaw agent a cryptographic identity, enforce permissions before sensitive actions, and log a tamper-proof audit trail. Works as a skill via mcporter + MCP server.
Setup
Step 1: Create a free account at vorim.ai and get your API key from Settings → API Keys. The free tier includes 3 agents and 10,000 audit events per month.
Step 2: Add the Vorim MCP server to your OpenClaw instance:
# Add Vorim as an MCP server via mcporter
mcporter config add vorim --stdio "npx -y @vorim/mcp-server"
# Set your API key
export VORIM_API_KEY=agid_sk_live_...bashOr install the Vorim skill for automatic identity and audit behavior:
# Copy the skill to your OpenClaw skills directory
mkdir -p ~/.openclaw/skills/vorim
# Add SKILL.md from github.com/Vorim-AI-Labs/vorim-mcp-serverbashUsage
Once configured, your OpenClaw agent can use all 19 Vorim tools via mcporter:
# Register your agent (first run)
mcporter call vorim.vorim_register_agent name="my-openclaw" \
capabilities:='["browse","email","shell"]' \
scopes:='["agent:read","agent:write","agent:execute"]'
# Check permission before a sensitive action
mcporter call vorim.vorim_check_permission \
agent_id="agid_..." scope="agent:execute"
# Log an action to the audit trail
mcporter call vorim.vorim_emit_event \
agent_id="agid_..." event_type="tool_call" \
action="send_email" result="success"
# Verify trust score
mcporter call vorim.vorim_verify_trust agent_id="agid_..."bashWhat the Skill Does
- Permission checks — before shell commands, emails, payments, or any destructive action
- Audit logging — every action is recorded with a tamper-proof hash chain
- Trust verification — external services can verify your agent before interacting
- Denied actions are blocked — if permission is denied, the agent stops and informs the user
Marketplace Trust Widget
Embeddable trust badges for agent marketplaces, directories, and any page that lists AI agents. One script tag — shows a live trust score, verification status, and links to the full verification page. No backend work required.
Badge (Compact)
Best for agent listings, search results, and cards. Shows trust score and verification status inline.
<!-- Drop this on any page -->
<div data-vorim-agent="agid_acme_a1b2c3d4"></div>
<script src="https://vorim.ai/widget/vorim-trust.js"></script>htmlCard (Detailed)
Best for agent detail pages. Shows trust score, org name, scopes, creation date, and key fingerprint.
<div
data-vorim-agent="agid_acme_a1b2c3d4"
data-vorim-style="card"
data-vorim-theme="dark"
></div>
<script src="https://vorim.ai/widget/vorim-trust.js"></script>htmlInline (Minimal)
Best for tables, lists, and compact UIs. Shows a colored dot + score.
<div
data-vorim-agent="agid_acme_a1b2c3d4"
data-vorim-style="inline"
></div>htmlOptions
data-vorim-agentstringRequireddata-vorim-stylestringdata-vorim-themestringdata-vorim-sizestringdata-vorim-linkstringStatic SVG Badge
For README files, GitHub repos, and static pages. Live SVG that updates automatically:
markdownVerification API
For deeper integration. Public endpoint — no authentication required. Returns the live trust score plus a coarse band, an evidence-confidenceindicator, the agent's positive trust signals, and a platform-signed attestation a counterparty can verify offline:
curl https://vorim.ai/v1/trust/verify/agid_acme_a1b2c3d4
# Returns:
{
"agent_id": "agid_acme_a1b2c3d4",
"verified": true,
"trust_score": 85,
"trust_band": "trusted", // untrusted | building | established | trusted
"confidence": "established", // new | developing | established (evidence maturity)
"signals": ["identity_anchor", "reliability", "maturity"],
"status": "active",
"owner": { "org_name": "Acme Corp", "verified": true },
"attestation": {
"attestation_id": "f544370d-...",
"agent_id": "agid_acme_a1b2c3d4",
"trust_band": "trusted",
"confidence": "established",
"issued_at": "2026-06-19T15:41:01Z",
"expires_at": "2026-06-19T15:46:01Z",
"kid": "93da0741...", // matches a key from GET /v1/trust/keys
"signature": "ed25519:aRK3sIs0..."
}
}bashVerify the attestation offline. Fetch Vorim's public signing keys once, match the kid, and verify the Ed25519 signature over the signed fields — no live call back to Vorim, and tampering (e.g. upgrading the band) is rejected. The signed payload deliberately excludes the raw weights and gate thresholds.
curl https://vorim.ai/v1/trust/keys
# Returns the platform public key(s) for verifying attestations:
{
"keys": [
{ "kid": "93da0741...", "alg": "ed25519",
"use": "trust-attestation",
"public_key_pem": "-----BEGIN PUBLIC KEY-----\n..." }
]
}bashWant the full breakdown of why an agent has a given score? The authenticated, owner-only GET /v1/agents/:id/trust endpoint returns ranked, plain-language reason codes for agents in your own org (also shown in the dashboard agent detail). The public surface stays coarse by design — bands and positive signals, never magnitudes or distance-to-threshold.
Use Cases
- Agent marketplaces — show trust badges on every listing, filter by minimum trust score
- Agent directories — sort and filter agents by verification status
- Multi-agent platforms — check trust score before allowing agent-to-agent interaction
- Enterprise procurement — require minimum trust score for agent onboarding
- GitHub READMEs — show live trust badge in your agent's README
CLI Tool
The @vorim/cli scaffolds projects, registers agents, and manages identity directly from the terminal. Get to "first agent secured" in 60 seconds.
Installation
# Run directly (no install needed)
npx @vorim/cli init
# Or install globally
npm install -g @vorim/clibashInitialize a Project
Scaffolds a Vorim-enabled project: tests connection, registers your first agent, emits a test event, and creates vorim.json + .env.
$ npx @vorim/cli init
╔══════════════════════════════╗
║ VORIM AI CLI v1.0.0 ║
║ Agent Identity & Trust Layer ║
╚══════════════════════════════╝
→ Setting up Vorim AI in this project
✓ Found API key: agid_sk_live_abc...
→ Testing connection...
✓ Connected to Vorim AI (healthy)
API Key: agid_sk_live_abc...
Project name (my-project): my-project
First agent name (my-project-agent): my-project-agent
→ Registering agent "my-project-agent"...
✓ Agent registered: agid_org_a1b2c3d4
✓ Granted agent:read permission
✓ First audit event emitted
✓ Created vorim.json
✓ Added Vorim keys to .envbashCommands
Configuration
The CLI looks for your API key in this order:
# 1. Environment variable
export VORIM_API_KEY=agid_sk_live_...
# 2. .env file in current directory
VORIM_API_KEY=agid_sk_live_...
# 3. vorim.json in current directory (created by vorim init)
{ "apiKey": "agid_sk_live_..." }typescriptTrust Widget (Embeddable Badge)
Embed a live trust badge on your website, documentation, or agent marketplace listing. The badge shows the agent's current trust score and updates in real time.
SVG Badge
Embed directly in HTML. No JavaScript required. Cached for 60 seconds.
<!-- HTML embed -->
<img
src="https://vorim.ai/v1/trust/badge/YOUR_AGENT_ID.svg"
alt="Vorim Trust Score"
width="180"
height="32"
/>
<!-- Markdown -->
typescriptClickable Verification
Wrap the badge in a link so visitors can click to verify the agent's full trust profile:
<a href="https://vorim.ai/v1/trust/verify/YOUR_AGENT_ID" target="_blank">
<img
src="https://vorim.ai/v1/trust/badge/YOUR_AGENT_ID.svg"
alt="Vorim Trust Score"
/>
</a>typescriptTrust Verification API
Query the full trust profile programmatically. Public, no authentication required.
GET https://vorim.ai/v1/trust/verify/YOUR_AGENT_ID
Response:
{
"data": {
"agent_id": "agid_abc123",
"trust_score": 82,
"status": "active",
"factors": {
"status_score": 20,
"age_score": 18,
"success_score": 22,
"denial_score": 14,
"scope_score": 8
},
"owner": {
"org_name": "Acme Corp",
"verified": true
}
}
}typescriptUse Cases
Common places to embed the trust badge:
- Agent marketplaces — show trust score next to agent listings
- Partner portals — verify agent identity before granting access
- Documentation — display trust badge in your API docs
- GitHub README — add badge to your agent's repository
- Compliance reports — include verification links in audit submissions
Python SDK
The official Python SDK provides sync and async clients with the same capabilities as the TypeScript SDK.
# Core SDK
pip install vorim
# With framework integrations
pip install vorim[langchain] # LangChain / LangGraph
pip install vorim[crewai] # CrewAI
pip install vorim[openai] # OpenAI Agents SDK
pip install vorim[anthropic] # Anthropic / Claude
pip install vorim[all] # All integrationsbashQuick Start
from vorim import Vorim
vorim = Vorim(api_key="agid_sk_live_...")
# Register an agent
result = vorim.register(
name="invoice-processor",
capabilities=["read_documents", "extract_data"],
scopes=["agent:read", "agent:execute"],
)
# Check permissions (<5ms via Redis)
check = vorim.check(result.agent.agent_id, "agent:execute")
if check.allowed:
# Emit audit event
vorim.emit(
agent_id=result.agent.agent_id,
event_type="tool_call",
action="process_invoice",
result="success",
latency_ms=142,
)
# Verify any agent's trust (public, no auth required)
trust = vorim.verify(result.agent.agent_id)
print(f"Trust score: {trust.trust_score}/100")pythonAsync Client
from vorim import AsyncVorim
async with AsyncVorim(api_key="agid_sk_live_...") as vorim:
result = await vorim.register(
name="async-agent",
capabilities=["search"],
scopes=["agent:read"],
)
print(result.agent.agent_id)pythonLangChain Integration
from vorim import Vorim
from vorim.integrations.langchain import vorim_tool, VorimCallbackHandler
vorim = Vorim(api_key="agid_sk_live_...")
@vorim_tool(vorim, agent_id="agid_acme_...", permission="agent:execute")
def search(query: str) -> str:
"""Search documents."""
return f"Results for {query}"
# search() is now a standard LangChain tool with Vorim permission checks + auditpythonCrewAI Integration
from vorim import Vorim
from vorim.integrations.crewai import register_crew
vorim = Vorim(api_key="agid_sk_live_...")
crew = register_crew(vorim, {
"crew_name": "content-pipeline",
"members": [
{
"role": "researcher",
"name": "crew-researcher",
"capabilities": ["web_search"],
"scopes": ["agent:read", "agent:execute"],
},
],
})pythonOpenAI Integration
from openai import OpenAI
from vorim import Vorim
from vorim.integrations.openai_agents import VorimToolRegistry
vorim = Vorim(api_key="agid_sk_live_...")
client = OpenAI()
registry = VorimToolRegistry(vorim=vorim, agent_id="agid_acme_...")
registry.add(
name="search",
description="Search documents",
parameters={"type": "object", "properties": {"query": {"type": "string"}}},
execute=lambda args: f"Results for {args['query']}",
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Search for AI papers"}],
tools=registry.to_openai_tools(),
)
tool_messages = registry.execute_tool_calls(
response.choices[0].message.tool_calls or []
)pythonAuthentication
All SDK requests are authenticated with an API key. Create one from the Settings page in the Vorim AI dashboard.
import createVorim from '@vorim/sdk';
const vorim = createVorim({
apiKey: 'agid_sk_live_xxxxxxxxxxxxxxxx',
baseUrl: 'https://api.vorim.ai', // default
timeout: 10000, // default: 10 seconds
});typescriptConfiguration options:
apiKeystringRequiredagid_sk_.baseUrlstringhttps://api.vorim.ai.timeoutnumberNever expose your API key in client-side code. The SDK is designed for server-to-server use. Store your key in environment variables.
Agent Identity
Every agent gets a unique Ed25519 cryptographic identity upon registration. The private key is returned once and never stored by Vorim AI.
vorim.register(input)
Register a new agent with a cryptographic keypair.
namestringRequireddescriptionstringcapabilitiesstring[]Required['api_access', 'file_read']).scopesPermissionScope[]Requiredconst agent = await vorim.register({
name: 'InvoiceBot',
description: 'Automated invoice processing agent',
capabilities: ['api_access', 'email_send', 'file_read'],
scopes: ['agent:read', 'agent:write', 'agent:communicate'],
});
// Response
{
agent: {
agent_id: 'agid_acme_a1b2c3d4',
name: 'InvoiceBot',
status: 'active',
trust_score: 50,
// ... more fields
},
private_key: '-----BEGIN PRIVATE KEY-----\n...', // Save this!
public_key: '-----BEGIN PUBLIC KEY-----\n...',
key_fingerprint: 'a1b2c3d4e5f6...',
}typescriptvorim.getAgent(agentId)
Retrieve details for a specific agent.
const agent = await vorim.getAgent('agid_acme_a1b2c3d4');
console.log(agent.name, agent.status, agent.trust_score);typescriptvorim.listAgents(params?)
List all agents in your organization with optional filtering.
const { agents, meta } = await vorim.listAgents({
status: 'active',
page: 1,
per_page: 25,
});
console.log(`${meta.total} agents total, showing page ${meta.page}`);typescriptvorim.revoke(agentId)
Permanently revoke an agent. This cannot be undone.
await vorim.revoke('agid_acme_a1b2c3d4');
// Agent status is now 'revoked', all permissions deniedtypescriptPermissions
Vorim AI supports 7 hierarchical permission scopes. Permission checks are Redis-cached for sub-5ms latency.
agent:readagent:writeagent:executeagent:transactagent:communicateagent:delegateagent:elevatevorim.check(agentId, scope)
Check if an agent has a specific permission. Use this before every action.
const result = await vorim.check('agid_acme_a1b2c3d4', 'agent:write');
if (result.allowed) {
// Agent is authorized — proceed with the action
await performWrite();
} else {
console.log('Permission denied:', result.reason);
}
// Response shape
{
allowed: true,
agent_id: 'agid_acme_a1b2c3d4',
scope: 'agent:write',
latency_ms: 3,
}typescriptvorim.grant(agentId, scope, options?)
Grant a permission scope to an agent with optional constraints.
// Grant with expiration
await vorim.grant('agid_acme_a1b2c3d4', 'agent:transact', {
valid_until: '2026-06-01T00:00:00Z',
});
// Grant with rate limiting
await vorim.grant('agid_acme_a1b2c3d4', 'agent:communicate', {
rate_limit: { max: 100, window: '1h' },
});typescriptAudit Events
Every agent action should be logged for compliance and debugging. Events are stored in TimescaleDB with ULID ordering.
vorim.emit(event)
Emit a single audit event.
agent_idstringRequiredevent_typestringRequiredtool_call, api_request, or message_sent.actionstringRequiredPOST /invoices).resourcestringresultstringRequiredsuccess, denied, or error.latency_msnumbermetadataobjectawait vorim.emit({
agent_id: 'agid_acme_a1b2c3d4',
event_type: 'api_request',
action: 'POST /api/invoices/create',
resource: 'invoices',
result: 'success',
latency_ms: 127,
metadata: {
invoice_id: 'inv_9876',
amount: 1500.00,
currency: 'USD',
},
});typescriptvorim.emitBatch(events)
Emit up to 1,000 audit events in a single request. Ideal for high-throughput scenarios.
const events = actions.map(action => ({
agent_id: 'agid_acme_a1b2c3d4',
event_type: 'tool_call',
action: action.name,
result: action.success ? 'success' : 'error',
latency_ms: action.duration,
}));
const { ingested } = await vorim.emitBatch(events);
console.log(`${ingested} events recorded`);typescriptTrust Verification
Verify an agent's identity and trust score via the public Trust API. No authentication required for verification.
vorim.verify(agentId)
const trust = await vorim.verify('agid_acme_a1b2c3d4');
console.log(trust.verified); // true
console.log(trust.trust_score); // 87
console.log(trust.status); // 'active'
console.log(trust.key_fingerprint); // 'a1b2c3d4e5f6...'typescriptPython
trust = vorim.verify("agid_acme_a1b2c3d4")
print(trust.verified) # True
print(trust.trust_score) # 87
print(trust.status) # 'active'
print(trust.key_fingerprint) # 'a1b2c3d4e5f6...'
# Async
async with AsyncVorim(api_key="agid_sk_live_...") as client:
trust = await client.verify("agid_acme_a1b2c3d4")pythonTrust score factors (0-100):
Payload Signing
Sign payloads with the agent's Ed25519 private key for tamper-proof verification.
vorim.sign(payload, privateKeyPem)
// Sign a payload with the agent's private key
const payload = JSON.stringify({ action: 'transfer', amount: 500 });
const signature = await vorim.sign(payload, agent.private_key);
console.log(signature);
// 'ed25519:base64encodedSignature...'
// Include signature in audit events for verification
await vorim.emit({
agent_id: agent.agent_id,
event_type: 'api_request',
action: 'POST /transfers',
result: 'success',
signature, // Stored with the audit event
});typescriptError Handling
The SDK throws VorimError for all API errors with structured details.
import { VorimError } from '@vorim/sdk';
try {
await vorim.check('invalid_agent_id', 'agent:read');
} catch (err) {
if (err instanceof VorimError) {
console.log(err.status); // 404
console.log(err.code); // 'AGENT_NOT_FOUND'
console.log(err.message); // 'Agent not found'
console.log(err.details); // { agent_id: 'invalid_agent_id' }
}
}typescriptCommon error codes:
| Status | Code | Description |
|---|---|---|
400 | VALIDATION_ERROR | Invalid request body or parameters |
401 | UNAUTHORIZED | Missing or invalid API key |
403 | FORBIDDEN | Insufficient permissions |
404 | NOT_FOUND | Resource not found |
409 | CONFLICT | Resource already exists |
429 | RATE_LIMITED | Too many requests |
500 | INTERNAL_ERROR | Server error |
Credential Delegation
Credential delegation lets agents safely access third-party OAuth services (Google, GitHub, Slack, etc.) without ever seeing refresh tokens. The platform acts as a proxy — agents receive short-lived access tokens through scoped, time-limited delegations.
How It Works
1. Register an OAuth provider with your client credentials (encrypted at rest with AES-256-GCM)
2. Store a connection — user authorizes OAuth access, refresh token is encrypted in the vault
3. Delegate to an agent — bind an agent to a connection with attenuated scopes
4. Agent requests a token — platform exchanges the refresh token and returns a short-lived access token
5. Everything is audited — every delegation, revocation, and token use is logged
Register an OAuth Provider
// Register a Google OAuth provider
await vorim.registerProvider({
provider_key: 'google',
display_name: 'Google Workspace',
client_id: 'your-google-client-id',
client_secret: 'your-google-client-secret',
auth_url: 'https://accounts.google.com/o/oauth2/v2/auth',
token_url: 'https://oauth2.googleapis.com/token',
scopes_available: ['drive.readonly', 'gmail.send', 'calendar.events'],
});typescriptStore an OAuth Connection
// After user completes OAuth consent flow
await vorim.storeConnection({
provider_id: 'provider-uuid',
refresh_token: 'ya29.a0AfH6SM...', // encrypted at rest
scopes_granted: ['drive.readonly', 'gmail.send'],
external_account_id: 'user@gmail.com',
});typescriptDelegate to an Agent
// Give an agent access to a subset of the connection's scopes
await vorim.delegateCredential({
connection_id: 'connection-uuid',
agent_id: 'agid_acme_a1b2c3d4',
scopes_delegated: ['drive.readonly'], // must be ⊆ connection scopes
max_requests_per_hr: 100,
valid_until: '2026-04-30T00:00:00Z',
});typescriptAgent Requests a Token
// Agent requests a short-lived access token
const token = await vorim.requestToken({
agent_id: 'agid_acme_a1b2c3d4',
scope: 'drive.readonly',
});
// Use the token (expires in ~1 hour)
const response = await fetch('https://www.googleapis.com/drive/v3/files', {
headers: { Authorization: `${token.token_type} ${token.access_token}` },
});typescriptRevoke a Delegation
Revoking a delegation cascades to all downstream delegation chains. Revocation is immediate.
// Revoke agent's access (cascades to all chains)
await vorim.revokeDelegation('delegation-uuid');
// Or revoke the entire connection (revokes ALL delegations)
// DELETE /v1/credentials/connections/:idtypescriptPython SDK
from vorim import Vorim
client = Vorim(api_key="agid_sk_live_...")
# Register provider
client.register_provider(
provider_key="github",
client_id="your-github-client-id",
client_secret="your-github-client-secret",
auth_url="https://github.com/login/oauth/authorize",
token_url="https://github.com/login/oauth/access_token",
)
# Delegate to an agent
client.delegate_credential(
connection_id="connection-uuid",
agent_id="agid_acme_a1b2c3d4",
scopes_delegated=["repo:read"],
)
# Agent requests a token
token = client.request_token(
agent_id="agid_acme_a1b2c3d4",
scope="repo:read",
)pythonSecuritynoteEphemeral Agents (did:key)
Ephemeral agents are short-lived agents that bootstrap identity on instantiation using the W3C did:key format. They auto-expire after a configurable TTL without manual cleanup.
When to Use Ephemeral Agents
Use ephemeral agents for temporary tasks, one-off workflows, CI/CD pipelines, testing, or any scenario where an agent doesn't need a persistent identity. They still get full permission checks and audit trail coverage.
Register an Ephemeral Agent
// Register an ephemeral agent (auto-expires in 1 hour)
const result = await vorim.registerEphemeral({
capabilities: ['data-processing', 'report-generation'],
scopes: ['agent:read', 'agent:write'],
ttl_seconds: 3600, // 1 hour (min: 60, max: 86400)
});
console.log(result.did_key); // did:key:z6Mkp...
console.log(result.ttl_seconds); // 3600
console.log(result.expires_at); // ISO timestamp
console.log(result.private_key); // Ed25519 key (returned once)typescriptPython SDK
from vorim import Vorim
client = Vorim(api_key="agid_sk_live_...")
# Register ephemeral agent (5-minute lifetime)
result = client.register_ephemeral(
capabilities=["temp-task"],
scopes=["agent:read", "agent:execute"],
ttl_seconds=300,
)
print(result.did_key) # did:key:z6Mkp...
print(result.expires_at) # auto-expires in 5 minutespythonEphemeral vs. Persistent Agents
| Property | Persistent | Ephemeral |
|---|---|---|
| ID format | agid_{org}_{uuid} | did:key:z6Mk... |
| Lifetime | Permanent (until revoked) | TTL-based (60s to 24h) |
| Registration | POST /agents | POST /agents/ephemeral |
| Permissions | Updatable after creation | Fixed at creation, expire with agent |
| Cleanup | Manual revocation | Automatic on TTL expiry |
| Audit trail | Full | Full (attributable to did:key) |
| Use case | Production services | Temporary tasks, testing, CI/CD |
Auto-cleanupnoteHow Pricing Works
Vorim is usage-based. You pay for what your agents do, not how many you create.
The meter is the audit event: every signed action your agent emits through the SDK is one unit. That includes permission checks, agent actions, and the audit records the SDK writes on your behalf. Agent registration, identity issuance, and trust score reads do not count against the meter.
Each tier comes with a monthly included volume. Agents and seats are capped per tier (a separate constraint that exists because they map to product surface area, not infrastructure cost):
- Free, $0: 10,000 audit events / month, up to 3 agents, 30-day retention.
- Starter, Custom: 100,000 audit events / month, up to 10 agents, 90-day retention.
- Growth, Custom: 1,000,000 audit events / month, up to 50 agents, unlimited retention.
- Enterprise, Custom: unlimited audit events, unlimited agents, commit-and-burst pricing, self-hosted option, SSO/SAML, custom MSA.
Why events and not agents? Agent count taxes the behavior the product is built to encourage (creating more agents, smaller-scoped agents, ephemeral agents). Event count tracks the actual unit of value: signed records that a regulator, customer, or counterparty can verify. Pricing on agents would make the right architectural choice expensive; pricing on events keeps the incentives aligned.
Overage and cap behavior. If you exceed your included monthly volume, events keep recording and your dashboard prompts an upgrade. There’s no automatic per-event overage charge or hard rejection at the cap. For per-event overage rates and commit-and-burst commercial terms, contact us in conversation.
For Starter or Growth, see /pricing or email team@vorim.ai. For Enterprise, book a call to discuss commit-and-burst, self-hosted deployment, and SSO/SAML.
API Reference
All REST API endpoints are prefixed with /v1. Authenticate via Authorization: Bearer <jwt> or Bearer agid_sk_*.
| Method | Endpoint | Auth | Description |
|---|---|---|---|
POST | /auth/register | None | Create organization + user |
POST | /auth/login | None | Email/password login |
POST | /auth/refresh | None | Refresh JWT tokens |
GET | /agents | JWT | List agents |
POST | /agents | JWT | Register new agent |
GET | /agents/:id | JWT | Get agent details |
PATCH | /agents/:id | JWT | Update agent |
DELETE | /agents/:id | JWT | Revoke agent |
POST | /agents/:id/permissions | JWT | Grant permission |
GET | /agents/:id/permissions | JWT | List permissions |
DELETE | /agents/:id/permissions/:scope | JWT | Revoke permission |
POST | /agents/:id/permissions/verify | JWT | Check permission |
POST | /audit/events | API Key | Submit audit events |
GET | /audit/events | API Key | Query audit events |
POST | /audit/export | API Key | Export audit bundle |
GET | /trust/verify/:agentId | None | Public trust check |
GET | /trust/badge/:agentId.svg | None | Embeddable SVG badge |
Check the features page for an overview, or contact us for support. For enterprise needs, reach out at sales@vorim.ai.