VORIM
We use cookies

We use cookies to analyze site traffic and improve your experience. You can choose to accept all cookies or only essential ones. See our Privacy Policy.

OpenAI Agents SDK

A tool registry that checks a permission before dispatching a function call, and an agent loop that emits an audit event for every turn without you writing one.

OpenAI 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 ?? []
);
typescript
Need Help?

Book a demo for a walkthrough, or contact us for support. For enterprise needs, reach out at sales@vorim.ai.