AI-Native Communication Intelligence for Multi-Agent Systems
Project description
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
Project details
Release history Release notifications | RSS feed
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 agentflow_sdk-0.2.1.tar.gz.
File metadata
- Download URL: agentflow_sdk-0.2.1.tar.gz
- Upload date:
- Size: 64.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2e4dd475f90ce616b9d4fe80c074e33f469b89238c11397da39882b5a12a837
|
|
| MD5 |
afd92ab03ca2e489e643d20c8586c4c9
|
|
| BLAKE2b-256 |
c37eb9bf2ec1d817dc6a60f57d7174ffd46141ea68bcc32426eef31321efa632
|
File details
Details for the file agentflow_sdk-0.2.1-py3-none-any.whl.
File metadata
- Download URL: agentflow_sdk-0.2.1-py3-none-any.whl
- Upload date:
- Size: 50.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63827b4b153952408f00dd2107c5c37c53c293c6f3f5f317d353b95758cc6296
|
|
| MD5 |
101ab335ddc8d67d9f7409fb8b8ba960
|
|
| BLAKE2b-256 |
4334ffe8dc7c8e07c74391a142ccaafc5bbbd5fe623c9e59758edf6b5c06cf87
|