Deployment Overview
๐ AgentMap โ Deployment
AgentMap provides flexible deployment options to suit different use cases, from local CLI development to scalable production services. This guide helps you choose the right deployment approach and provides implementation guidance.
Deployment Optionsโ
๐ฅ๏ธ Command-Line Interface (CLI)โ
Best for: Development, testing, automation scripts, and batch processing
- Quick setup: No additional infrastructure required
- Direct execution: Run workflows directly from terminal
- Scaffolding support: Generate missing agent implementations
- Debugging tools: Built-in graph inspection and validation
# Install and run immediately
pip install agentmap
agentmap run --graph MyWorkflow --state '{"input": "value"}'
Get Started with CLI Deployment โ
๐ FastAPI Standalone Serviceโ
Best for: Web applications, microservices, and API-first architectures
- HTTP API: RESTful interface for workflow execution
- Auto-documentation: Swagger/OpenAPI integration
- Async execution: Non-blocking workflow processing
- Health monitoring: Built-in health checks and metrics
from agentmap.services.fastapi import AgentMapAPI
app = AgentMapAPI()
# Accessible at http://localhost:8000/docs
๐ FastAPI Integrationโ
Best for: Embedding workflows into existing applications
- Flexible integration: Add workflows to existing FastAPI apps
- Custom middleware: Authentication, logging, monitoring
- Shared services: Reuse existing database connections and services
- Custom routing: Integrate workflows into your URL structure
from fastapi import FastAPI
from agentmap.services.fastapi import include_agentmap_routes
app = FastAPI()
include_agentmap_routes(app, prefix="/workflows")
Integrate with Existing Apps โ
Quick Start by Use Caseโ
๐งช Development & Testingโ
# Install AgentMap
pip install agentmap
# Create a simple workflow
echo "TestGraph,start,InputAgent,Get input,input,result" > test.csv
# Run immediately
agentmap run --graph TestGraph --csv test.csv --state '{"input": "hello"}'
๐ Data Processing Pipelineโ
# Install with data processing extras
pip install agentmap[data]
# Use CLI for batch processing
agentmap run --graph DataPipeline --csv pipeline.csv
๐ Web Serviceโ
# main.py
from agentmap.services.fastapi import AgentMapAPI
app = AgentMapAPI(
csv_file="workflows.csv",
enable_docs=True,
enable_monitoring=True
)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8000)
# Deploy
python main.py
๐ข Enterprise Integrationโ
# enterprise_app.py
from fastapi import FastAPI, Depends
from agentmap.services.fastapi import include_agentmap_routes
from your_auth import get_current_user
app = FastAPI(title="Enterprise Workflows")
# Add AgentMap with authentication
include_agentmap_routes(
app,
prefix="/api/workflows",
dependencies=[Depends(get_current_user)]
)