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
Release files for agentwrap 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agentwrap-0.1.1.tar.gz | 40.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentwrap-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 78.1 kB
Release files / agentwrap-0.1.1.tar.gz
| Download URL | agentwrap-0.1.1.tar.gz |
|---|---|
| Size | 40.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65b22e1ab6884e6a815c2b43ee6883b600d627af4e90cc9150ef13480bcd6159
|
|
BLAKE2b-256 checksum How to use checksums |
648ed16b7839959d61178e3a33e4757b84e790d5ca3f677f2332ec2257b0bb84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / agentwrap-0.1.1-py3-none-any.whl
| Download URL | agentwrap-0.1.1-py3-none-any.whl |
|---|---|
| Size | 38.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5cbfc97a285364ede9a9b78a6d66f43d60b06a1f0c80a89ca94f31a0ff0d24bc
|
|
BLAKE2b-256 checksum How to use checksums |
bd4759bca20b28b652266f375bcd1773be86cc94273ff2a0ea661992316aab4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|