ai-proxy-core
ai-proxy-core is a Python reverse proxy that adds AI-driven decision logic for routing, anomaly detection, and adaptive traffic shaping.
This is a foundational library for building:
- AI-powered API gateways
- fraud/anomaly-aware reverse proxies
- inference traffic routers
- intelligent load balancers
MVP Features
- Reverse proxy with backend pools
- Adaptive backend scoring based on:
- latency
- active connections
- error rate
- Basic anomaly detection (moving average / z-score)
- Circuit breaker auto-disable for failing backends
- Prometheus metrics
- Connection pooling (reused httpx.AsyncClient)
- Graceful shutdown with cleanup hooks
- Configurable request timeout per proxy instance
Quickstart
pip install -e .
ai-proxy run -c examples/config.yml
Test:
curl http://localhost:9200/
curl http://localhost:9200/metrics
Changelog
0.1.1 (2025-XX-XX)
- Migrated build system to hatchling
- Added connection pooling via module-level httpx.AsyncClient
- Added graceful shutdown (startup/shutdown events in FastAPI app)
- Added logging across proxy, app, and CLI modules
- Added ProxyConfig with configurable timeout_seconds
- Wired window_size from config to ZScoreDetector
- Added --log-level CLI option
- Fixed bare except in app.py (returns JSONResponse 502)
- Expanded test suite (backend, balancer, config, proxy tests)
- Added ruff linting configuration
- Added CI workflow (GitHub Actions)
- Added LICENSE and .gitignore
0.1.0 (Initial release)
- Reverse proxy with backend pools
- Adaptive backend scoring
- Z-score anomaly detection
- Circuit breaker
- Prometheus metrics
Roadmap
- Plug-in ML models (sklearn/onnx)
- LLM-based WAF rules generation
- Token bucket rate limiting
- Geo routing
- Request classification + prioritization
- Web dashboard
Metadata
Release files for kubenew-ai-proxy 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 | Provenance | Actions |
|---|---|---|---|---|
| kubenew_ai_proxy-0.1.1.tar.gz | 8.0 kB | Without provenance | Details for kubenew_ai_proxy-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kubenew_ai_proxy-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for kubenew_ai_proxy-0.1.1-py3-none-any.whl |
Total release size: 17.3 kB
Release files / kubenew_ai_proxy-0.1.1.tar.gz
| Download URL | kubenew_ai_proxy-0.1.1.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f147826390c9fb54991993326273d777a864be42c90820d7ac3cb328516b6be7
|
|
BLAKE2b-256 checksum How to use checksums |
422b46aa643789733fd4a2611fe994214eb92bec98c7f8a8d59a390eb92daeb6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / kubenew_ai_proxy-0.1.1-py3-none-any.whl
| Download URL | kubenew_ai_proxy-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5bdea535cca331b03a0c016969a858b4d50d61e201d676733920aed8b5913dd3
|
|
BLAKE2b-256 checksum How to use checksums |
3aacc33daa53f52926aa51a8259b0741b011bfc36adf06191fee4fe849636f73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for kubenew-ai-proxy 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.