Framework Adapters
Wrap popular AI frameworks for use with the Reminix runtime
Reminix provides adapters that let you wrap agents from popular AI frameworks and serve them using the Reminix runtime. This allows you to:
- Reuse existing agents — No need to rewrite your Vercel AI or OpenAI-based agents
- Unified API — All agents expose the same
/invokeand/chatendpoints - Streaming support — Built-in streaming for all adapters
- Dashboard integration — Monitor all your agents in one place
Installation
Adapters are provided as a separate package for tree-shaking and optional dependencies:
npm install @reminix/runtime @reminix/adapters
# or
pnpm add @reminix/runtime @reminix/adaptersYou only need to install the AI framework(s) you're using:
# For OpenAI
npm install openai
# For Anthropic
npm install @anthropic-ai/sdk
# For LangChain
npm install @langchain/core @langchain/openai
# For LangGraph
npm install @langchain/langgraph
# For Vercel AI SDK
npm install ai @ai-sdk/openaiAvailable Adapters
| Framework | Adapter Functions |
|---|---|
| LangChain.js | fromLangChainAgent, fromAgentExecutor, fromLangChainChatModel |
| LangGraph.js | fromCompiledGraph |
| Vercel AI SDK | fromToolLoopAgent, fromGenerateText |
| OpenAI SDK | fromOpenAI |
| Anthropic SDK | fromAnthropic |
Import Styles
Subpath imports (recommended for tree-shaking and explicit dependencies):
import { fromOpenAI } from '@reminix/adapters/openai';
import { fromAnthropic } from '@reminix/adapters/anthropic';
import { fromAgentExecutor } from '@reminix/adapters/langchain';
import { fromCompiledGraph } from '@reminix/adapters/langgraph';
import { fromGenerateText } from '@reminix/adapters/vercel-ai';Main entry import (access all adapters via a single import):
import { fromOpenAI, fromAnthropic, fromGenerateText } from '@reminix/adapters';Quick Example
import OpenAI from 'openai';
import { fromOpenAI } from '@reminix/adapters/openai';
import { serve } from '@reminix/runtime';
const client = new OpenAI();
const agent = fromOpenAI(client, {
name: 'gpt4-agent',
model: 'gpt-4o',
});
serve(agent);That's it! Your OpenAI-powered agent now has:
POST /agent/gpt4-agent/invoke— Single-turn requestsPOST /agent/gpt4-agent/chat— Multi-turn conversations- Streaming support with
stream: true - Health checks and discovery endpoints