Configure ACP Server for high availability deployments with centralized storage
from acp_sdk.server import RedisStore, Server from redis.asyncio import Redis # Configure Redis connection redis = Redis( host="your-redis-host", port=6379, password="your-redis-password", ) server = Server() # Create your agent @server.agent() async def my_agent(input): # Your agent implementation pass # Run server with Redis store server.run(store=RedisStore(redis=redis))
from acp_sdk.server import PostgreSQLStore, Server from psycopg import AsyncConnection # Configure PostgreSQL connection aconn = await AsyncConnection.connect( "postgresql://user:password@host:5432/database", ) server = Server() # Create your agent @server.agent() async def my_agent(input): # Your agent implementation pass # Run server with PostgreSQL store server.run( store=PostgreSQLStore( aconn=aconn, table="acp_store", # Optional: custom table name channel="acp_update" # Optional: custom notification channel ) )
CONFIG SET notify-keyspace-events KEA
acp_store
/ping
export REDIS_HOST=your-redis-host export REDIS_PORT=6379 export REDIS_PASSWORD=your-redis-password export REDIS_DB=0
export POSTGRES_HOST=your-postgres-host export POSTGRES_PORT=5432 export POSTGRES_USER=your-username export POSTGRES_PASSWORD=your-password export POSTGRES_DATABASE=your-database