AgentFlow
AI-Native Communication Intelligence for Multi-Agent Systems
AgentFlow is a multi-agent orchestration platform with an intelligent communication layer that reduces LLM API costs by 40-70% through intent classification, predictive caching, delta encoding, and state deduplication.
Quick Start
pip install agentflow
Define and run a pipeline
from agentflow import Agent, Pipeline, Orchestrator
agent_a = Agent("researcher", tier=1)
agent_b = Agent("analyst", tier=1, depends_on=["researcher"])
agent_c = Agent("writer", tier=2, depends_on=["analyst"])
pipeline = Pipeline()
pipeline.add_agent(agent_a)
pipeline.add_agent(agent_b)
pipeline.add_agent(agent_c)
orchestrator = Orchestrator(pipeline)
results = orchestrator.run("Analyse steel supply chain risks")
Classify agent intents
from agentflow.comms.intent_classifier import IntentClassifier
classifier = IntentClassifier()
classifier.load("data/intent_model.pkl")
result = classifier.classify("what is the current throughput")
print(result) # {"intent": "query", "confidence": {"query": 0.77, ...}}
Start the API server
# In-memory (development)
AGENTFLOW_ADMIN_KEY=your-key uvicorn agentflow.api.server:create_app --factory --host 0.0.0.0 --port 8100
# With persistence (production)
AGENTFLOW_ADMIN_KEY=your-key AGENTFLOW_DATABASE_URL=sqlite+aiosqlite:///agentflow.db uvicorn agentflow.api.db_app:create_persistent_app --factory --host 0.0.0.0 --port 8100
API authentication
All endpoints (except /health) require an API key header:
curl -H "X-API-Key: your-key" http://localhost:8100/events/summary
Architecture
AgentFlow has four layers:
Layer 1 — Orchestration: Wave-based parallel execution, dependency resolution, fault tolerance, multi-provider LLM routing with circuit breaker and key rotation.
Layer 2 — Communication Intelligence: Intent classification (TF-IDF + logistic regression, 99.96% accuracy), delta encoding (RFC 6902 JSON Patch + msgpack), state deduplication (content-addressed SHA-256), predictive caching (structural template learning).
Layer 3 — Observability: AgentPulse per-agent cost attribution, compression metrics, intent distribution analytics, Streamlit dashboard.
Layer 4 — Enterprise: RBAC (admin/operator/viewer), rate limiting, output filtering, CompressProxy for legacy integration, Docker + Helm deployment.
Database
AgentFlow uses SQLAlchemy 2.0 async with Alembic migrations. SQLite for development, PostgreSQL for production.
# Run migrations
alembic upgrade head
# Switch to PostgreSQL
export AGENTFLOW_DATABASE_URL=postgresql+asyncpg://user:pass@host/agentflow
alembic upgrade head
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /health | Health check |
| POST | /events/record | Record an agent event |
| GET | /events/summary | Tenant-wide summary |
| GET | /events/agent/{id} | Per-agent metrics |
| GET | /events/intents | Intent distribution |
| POST | /pipelines | Create pipeline run |
| GET | /pipelines/{id} | Get pipeline status |
| PUT | /pipelines/{id} | Update pipeline |
| POST | /classify | Classify intent |
| POST | /classify/train | Train classifier |
| POST | /dedup/store | Store content |
| GET | /dedup/resolve/{hash} | Resolve by hash |
| POST | /predict/observe | Record template |
| GET | /predict/template/{id} | Get prediction |
| GET | /audit | Audit trail |
| GET | /costs/summary | Cost breakdown |
Security
- API key authentication (SHA-256 hashed, never stored in plaintext)
- Role-based access control (admin, operator, viewer)
- Per-endpoint permission mapping
- Rate limiting with burst detection
- Output filtering (prompt leak and PII detection)
- Input sanitisation
- Canary token detection
- Request signing
- AES-GCM encryption at rest
- Row-level tenant isolation
- Audit trail on all operations
- Soft deletes (GDPR-friendly)
Configuration
Environment variables:
| Variable | Description | Default |
|---|---|---|
| AGENTFLOW_ADMIN_KEY | Admin API key (required) | — |
| AGENTFLOW_OPERATOR_KEY | Operator API key | — |
| AGENTFLOW_VIEWER_KEY | Viewer API key | — |
| AGENTFLOW_DATABASE_URL | Database connection string | sqlite+aiosqlite:///agentflow.db |
| STRIPE_SECRET_KEY | Stripe API key | — |
| STRIPE_WEBHOOK_SECRET | Stripe webhook secret | — |
Installation with extras
pip install agentflow[postgres] # PostgreSQL support
pip install agentflow[dashboard] # Streamlit dashboard
pip install agentflow[dev] # Development tools
Pricing
AgentFlow is a paid product with three tiers. There is no free tier — the orchestrator is the core USP.
Starter (69/month): 100K messages, 20 agents, sequential execution + intent classification. Pro (199/month): 1M messages, 50 agents, parallel wave execution + full compression. Enterprise (599/month): Unlimited, self-hosted option, SSO/RBAC, SLA.
| Tier | Price | Messages/month | Agents | Execution |
|---|---|---|---|---|
| Starter | 79/month | 100,000 | 20 | Sequential |
| Pro | 249/month | 1,000,000 | 50 | Parallel (wave-based) |
| Enterprise | 799/month | Unlimited | Unlimited | Parallel + self-hosted |
License
Proprietary — Sedge5 Technology Solutions
Metadata
Release files for agentflow-sdk 0.2.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 |
|---|---|---|---|---|
| agentflow_sdk-0.2.1.tar.gz | 64.3 kB | Without provenance | Details for agentflow_sdk-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentflow_sdk-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for agentflow_sdk-0.2.1-py3-none-any.whl |
Total release size: 114.6 kB
Release files / agentflow_sdk-0.2.1.tar.gz
| Download URL | agentflow_sdk-0.2.1.tar.gz |
|---|---|
| Size | 64.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2e4dd475f90ce616b9d4fe80c074e33f469b89238c11397da39882b5a12a837
|
|
BLAKE2b-256 checksum How to use checksums |
c37eb9bf2ec1d817dc6a60f57d7174ffd46141ea68bcc32426eef31321efa632
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / agentflow_sdk-0.2.1-py3-none-any.whl
| Download URL | agentflow_sdk-0.2.1-py3-none-any.whl |
|---|---|
| Size | 50.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63827b4b153952408f00dd2107c5c37c53c293c6f3f5f317d353b95758cc6296
|
|
BLAKE2b-256 checksum How to use checksums |
4334ffe8dc7c8e07c74391a142ccaafc5bbbd5fe623c9e59758edf6b5c06cf87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for agentflow-sdk 0.2.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.