agentwrap
v0.1.1
Published
Wrap agents, ship APIs - Turn agent CLIs into libraries and OpenAI-compatible servers
Downloads
25
Maintainers
Readme
AgentWrap (TypeScript)
Wrap agents, ship APIs - Turn agent CLIs into libraries and OpenAI-compatible servers
Installation
npm install agentwrapNote: TypeScript package bundles @openai/codex as a dependency - no additional setup required!
Quick Start
import { CodexAgent, OpenAICompatibleServer } from 'agentwrap';
const agent = new CodexAgent();
await agent.configure({
agent_config: { type: 'codex-agent', apiKey: 'OPENAI_API_KEY' },
skills: [
{type: 'anthropic-skill', path: './skills/random'}
]
});
// Use as library
for await (const event of agent.run('Generate a random number for me')) {
console.log(JSON.stringify(event.content));
}
// Or start as OpenAI-compatible API server
const server = new OpenAICompatibleServer(agent);
await server.startHttpServer({ port: 8000 });Features
- 🤖 Wrap agent CLIs as TypeScript libraries
- 🔌 OpenAI-compatible API server
- 🛠️ Function calling support
- 📦 MCP (Model Context Protocol) integration
- 🔄 Streaming responses
- ✅ Full TypeScript type safety
Documentation
For full documentation, visit: https://github.com/dashi0/agentwrap
Changelog
See CHANGELOG.md for release history and version updates.
License
MIT
