Wrap agents, ship APIs - Turn agent CLIs into libraries and OpenAI-compatible servers
Project description
AgentWrap
Wrap agents, ship APIs - Turn agent CLIs into libraries and OpenAI-compatible servers
Prerequisites
CodexAgent requires the OpenAI Codex CLI to be installed:
npm install -g @openai/codex
Note: Unlike the TypeScript package which bundles Codex as a dependency, Python cannot auto-install Node.js CLI tools. You must install Codex globally.
📚 Detailed installation guide: See docs/codex-installation-guide.md for platform-specific instructions, Docker setup, and troubleshooting.
Installation
pip install agentwrap
Quick Start
from agentwrap import CodexAgent, OpenAICompatibleServer
# Create and configure agent
agent = CodexAgent()
agent.configure({
"agent_config": {"type": "codex-agent", "api_key": "OPENA_API_KEY"},
"skills": [
{"type": "anthropic-skill", "path": "./skills/random"}
]
})
# Use as library
for event in agent.run("Generate a random number for me"):
print(event)
# Or start as OpenAI-compatible API server
server = OpenAICompatibleServer(agent)
await server.start_http_server({"port": 8000})
Features
- 🤖 Wrap agent CLIs as Python libraries
- 🔌 OpenAI-compatible API server
- 🛠️ Function calling support
- 📦 MCP (Model Context Protocol) integration
- 🔄 Streaming responses
Documentation
For full documentation, visit: https://github.com/dashi0/agentwrap
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentwrap-0.1.1.tar.gz.
File metadata
- Download URL: agentwrap-0.1.1.tar.gz
- Upload date:
- Size: 40.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65b22e1ab6884e6a815c2b43ee6883b600d627af4e90cc9150ef13480bcd6159
|
|
| MD5 |
a0761dfbf669b04838c41849a479ba90
|
|
| BLAKE2b-256 |
648ed16b7839959d61178e3a33e4757b84e790d5ca3f677f2332ec2257b0bb84
|
File details
Details for the file agentwrap-0.1.1-py3-none-any.whl.
File metadata
- Download URL: agentwrap-0.1.1-py3-none-any.whl
- Upload date:
- Size: 38.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cbfc97a285364ede9a9b78a6d66f43d60b06a1f0c80a89ca94f31a0ff0d24bc
|
|
| MD5 |
ffb86592c755d91f37fcf25f7f65a59e
|
|
| BLAKE2b-256 |
bd4759bca20b28b652266f375bcd1773be86cc94273ff2a0ea661992316aab4a
|