Catalog PyPI
PACKAGE EXPLORERView in registry

agent-wire-proxy

PyPI

Protocol bridge for OpenAI Responses, Chat Completions, and Anthropic Messages clients.

agentsanthropicapi-proxyllmopenaivllm
Versions collected1
Direct dependencies4From release 0.2.0
Last observed21 Oct, 08:57 UTC

README

Version 0.2.0 documentation

Agent Wire Proxy

A lightweight compatibility proxy that lets OpenAI Responses, OpenAI Chat Completions, and Anthropic Messages clients share OpenAI-compatible backends.

Use it when Codex expects /v1/responses, Claude Code expects Anthropic Messages, or several model IDs need to route through one local proxy.

[!IMPORTANT] This is an alpha-stage compatibility layer. Keep it on localhost unless it is protected by authentication and a TLS reverse proxy.

Install

python3 -m pip install agent-wire-proxy

Python 3.11 or newer is required.

Quick start

Create models.toml:

[proxy]
default_model = "example-model"

[[models]]
id = "example-model"
target = "http://127.0.0.1:8000"
upstream_api = "chat_completions"
api_key_env = "UPSTREAM_API_KEY"
aliases = ["claude-example-model"]

Provide upstream credentials outside version control:

export UPSTREAM_API_KEY="<your-upstream-api-key>"

Start the proxy:

agent-wire-proxy \
  --listen 127.0.0.1:18009 \
  --config models.toml

Check it:

curl -fsS http://127.0.0.1:18009/health
curl -fsS http://127.0.0.1:18009/v1/models

The package also exposes a reentrant Python API:

from agent_wire_proxy import serve

proxy = serve(config="models.toml", listen=("127.0.0.1", 0), block=False)
print(proxy.server_port)

# Later:
proxy.shutdown()
proxy.server_close()

Launch Codex or Claude Code

Choose an agent and model interactively:

agent-wire-tui

Or select them directly:

agent-wire-tui --agent codex --model example-model
agent-wire-tui --agent claude --model claude-example-model

Automation can request a secret-free launch contract without starting the agent:

agent-wire-tui \
  --agent codex \
  --model example-model \
  --config /absolute/path/to/models.toml \
  --launch-json

Run agent-wire-proxy --help or agent-wire-tui --help for all options.

Supported endpoints

MethodPathPurpose
GET/healthHealth check
GET/v1/modelsModel discovery
POST/v1/responsesOpenAI Responses
POST/v1/chat/completionsOpenAI Chat Completions
POST/v1/messagesAnthropic Messages
POST/v1/messages/count_tokensApproximate token count

Upstreams must expose OpenAI Responses or Chat Completions. Anthropic is supported as a client-facing API, not as an upstream API. Compatibility covers text, multi-turn messages, function tools, parallel tool calls, tool results, streaming events, and usage information. Provider-specific features are best effort.

Security

  • Set AGENT_WIRE_PROXY_CLIENT_API_KEY to authenticate non-health requests.
  • Keep upstream credentials in environment variables.
  • Prompt and response content is omitted from logs unless --log-content is explicitly enabled.
  • Prefer a localhost binding; use an authenticated TLS reverse proxy for network exposure.

License

MIT License.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.2.025 Aug 20264

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 08:57 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:d200d6cd25c47da80833c6e1a8ccc7769e7175d445f87271a514abf32702439c