AgentAssert Type-C HTTP forwarding proxy — formal behavioral contracts middleware for any AI agent, any provider.
Project description
agentassert-typec-proxy
HTTP forwarding proxy — formal behavioral contracts middleware with zero code change.
This is the flagship. Drop it between any agent harness and any LLM API. Set one env var. Done.
Quickstart
pip install agentassert-typec-proxy
agentassert-proxy proxy start --contract contract.yaml
Then in your agent environment:
export ANTHROPIC_BASE_URL=http://localhost:9000/anthropic
export OPENAI_BASE_URL=http://localhost:9000/openai
Supported Providers
| Provider | Route Prefix | Env Var |
|---|---|---|
| Anthropic | /anthropic |
ANTHROPIC_BASE_URL |
| OpenAI | /openai |
OPENAI_BASE_URL |
| Gemini | /gemini |
GEMINI_BASE_URL |
| OpenRouter | /openrouter |
OPENROUTER_BASE_URL |
Endpoints
| Method | Path | Description |
|---|---|---|
GET |
/health |
Health check, returns contract name and Θ |
GET |
/status |
Full status: Θ, JSD, violation count |
POST |
/admin/reload |
Trigger contract hot-reload |
Performance
- p99 overhead < 30ms (excluding provider RTT)
- All regex patterns pre-compiled at startup
- Hot-reload via SHA256 file polling (500ms interval)
- Fail-safe: invalid contract → keeps old monitor
License
MIT
Project details
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 agentassert_typec_proxy-0.4.0.tar.gz.
File metadata
- Download URL: agentassert_typec_proxy-0.4.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bad3ab32624efc03b9909b3848efda257e0e9dba8545ba8c52121345458443d
|
|
| MD5 |
dffeae918931745ae73f592c2fb79bd9
|
|
| BLAKE2b-256 |
796ec92e0b6dd1f7dc4cfef1fd0d8b1dc8c7cdcc54cf836006bcc251c95a3f41
|
File details
Details for the file agentassert_typec_proxy-0.4.0-py3-none-any.whl.
File metadata
- Download URL: agentassert_typec_proxy-0.4.0-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0db280e80968cde4dae118ebbfb440cdd5fa5cc8812f2dda6f46627fbf73b7ac
|
|
| MD5 |
acf7fc49eeb0d5df90336a69fab546f5
|
|
| BLAKE2b-256 |
e1ed026ef007dcb6a1047f0a165aba28f2c43a6887927bd1863b5187d00189de
|