npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@veridex/agents-adapters

v0.1.5

Published

Framework adapters for the Veridex Agent Runtime — import/export agents from OpenAI Agents SDK, LangGraph, PydanticAI, and OpenAPI

Readme

@veridex/agents-adapters

Import, export, and live-bridge package for bringing existing agent systems into the Veridex runtime.

Status

@veridex/agents-adapters is usable today and already covers import/export plus live runtime bridges, but this area will keep expanding as more real-world migration paths get exercised.

What This Package Does

Use @veridex/agents-adapters when you want to:

  • import OpenAI Agents SDK definitions into Veridex
  • import LangGraph or PydanticAI-style agent definitions
  • turn OpenAPI operations into tool contracts
  • export Veridex definitions back into other framework shapes
  • invoke external runtimes live instead of rewriting them first

This package exists to reduce rewrites and make migration incremental.

Installation

npm install @veridex/agents-adapters @veridex/agents

Package Surface

| Export | Role | |---|---| | OpenAIAgentsAdapter | Import/export OpenAI Agents SDK-style definitions | | LangGraphAdapter | Import/export LangGraph-style definitions | | PydanticAIAdapter | Import/export PydanticAI-style definitions | | OpenAPIImporter | Convert OpenAPI operations into Veridex tools | | OpenAIRuntimeBridge | Invoke a live OpenAI Agents SDK runtime | | LangGraphRuntimeBridge | Invoke a deployed LangGraph assistant/thread/run surface | | PydanticAIRuntimeBridge | Invoke a live PydanticAI endpoint or A2A-facing runtime |

Import and Export Adapters

OpenAI Agents SDK

import { OpenAIAgentsAdapter } from '@veridex/agents-adapters';

const adapter = new OpenAIAgentsAdapter();

const imported = adapter.importAgent({
  name: 'Support Agent',
  instructions: 'Handle support requests safely.',
  model: 'gpt-4o-mini',
  tools: [
    {
      type: 'function',
      function: {
        name: 'lookup_order',
        description: 'Look up an order by id',
        parameters: {
          type: 'object',
          properties: {
            orderId: { type: 'string' },
          },
          required: ['orderId'],
        },
      },
    },
  ],
});

console.log(imported.definition);
console.log(imported.warnings);
console.log(imported.unsupportedFeatures);

Imported tools use safe stub executors until you bind them to a real executor or a live bridge.

OpenAPI to tools

import { OpenAPIImporter } from '@veridex/agents-adapters';

const importer = new OpenAPIImporter({
  filterTags: ['orders'],
});

const { tools, warnings, apiInfo } = importer.importTools(openApiSpec);
console.log(apiInfo.title, tools.length, warnings);

Each operation becomes a Veridex tool contract with:

  • safety class inferred from the HTTP method
  • schema preserved from parameters and request body
  • response schema preserved when possible
  • OpenAPI metadata attached to the tool

Live Runtime Bridges

Adapters are for definitions. Bridges are for real execution.

OpenAI Agents SDK bridge

import { OpenAIRuntimeBridge } from '@veridex/agents-adapters';

const bridge = new OpenAIRuntimeBridge({
  name: 'existing-openai-agent',
  agent: existingOpenAIAgent,
  runner: {
    run: async (agent, input, options) => existingRunner.run(agent, input, options),
  },
});

const result = await bridge.invoke({
  prompt: 'Summarize the escalation policy',
});

console.log(result.output);

Use a bridge as a Veridex tool

const remoteTool = bridge.asTool({
  name: 'delegate_to_existing_agent',
  safetyClass: 'network',
});

Use a bridge as a handoff target

const handoffHandlers = {
  external_support_agent: bridge.asHandoffHandler(),
};

This is the recommended migration path when you want Veridex governance, approvals, traces, or budgets around an external runtime without a full rewrite on day one.

Migration Strategy

The best way to adopt this package is usually:

  1. import or bridge the existing agent
  2. run it through Veridex for tracing and policy
  3. replace stub executors with real executors or tools
  4. move sensitive or payment-related behavior into Veridex-native contracts over time

That keeps migration practical instead of forcing a big-bang rewrite.

What Gets Lost Across Frameworks

No framework adapter is perfect. Common gaps include:

  • memory configuration
  • hook semantics
  • framework-specific workflow graphs
  • native approval or governance behavior
  • custom runtime middleware

The adapters preserve metadata and emit warnings so these gaps stay visible.

Related Packages

| Package | Use it with | |---|---| | @veridex/agents | Required target runtime for imported tools and definitions | | @veridex/agents-openclaw | Use when the external system is OpenClaw or Pi rather than OpenAI, LangGraph, or PydanticAI | | @veridex/agents-control-plane | Add governance, approvals, and audit around bridged runtimes |

Known Rough Edges

  • Import/export support is necessarily lossy across frameworks with different abstractions.
  • Live bridge coverage will keep improving as more real deployments are integrated.
  • Some adapters intentionally produce stub executors so imports fail closed rather than pretending to be production-ready.

Contributions are especially welcome around migration examples, richer adapter fidelity, and more real deployment fixtures in tests.