Tool adapters for OpenAI's Agents SDK. JS adapter around the Python-style agent loop with automatic tool execution.
npm install agent402-openai-agents
import { agent402Tools } from "agent402-openai-agents";
import { Agent, Runner } from "openai-agents";
const tools = await agent402Tools();
const agent = new Agent({
name: "my-agent",
instructions: "You are a helpful assistant.",
tools,
});
const result = await Runner.run(agent, "Hash 'hello world' with SHA-256");
console.log(result.finalOutput);
| Option | Type | Description |
|---|---|---|
categories |
string[] |
Filter tools by category. |
slugs |
string[] |
Load only specific tools by slug. |
baseUrl |
string |
Point to a self-hosted Agent402 instance. |
agentKey |
string |
Private key for wallet-only (paid) tools. |
// Filter tools by category.
agent402Tools({ categories: ["search"] })
// Load only specific tools by slug.
agent402Tools({ slugs: ["search", "extract"] })
// Point to a self-hosted Agent402 instance.
agent402Tools({ baseUrl: "https://my-agent402.example.com" })
// Private key for wallet-only (paid) tools.
agent402Tools({ agentKey: process.env.AGENT_KEY })