Self-Hosting
Run AgentRecall on your own infrastructure with full control over data and models.
BYOK Mode (Bring Your Own Key)
Self-hosting gives you complete control. Your data never leaves your servers, and you can use your own Neo4j instance and AI model.
Docker Setup
# docker-compose.yml
version: "3.8"
services:
agentrecall:
image: agentrecall/agentrecall:latest
ports:
- "8700:8700"
environment:
- NEO4J_URI=bolt://neo4j:7687
- NEO4J_USER=neo4j
- NEO4J_PASSWORD=***
- MODEL_PATH=Qwen/Qwen2.5-7B
- MODE=local
depends_on:
- neo4j
neo4j:
image: neo4j:5
ports:
- "7474:7474"
- "7687:7687"
environment:
- NEO4J_AUTH=***
volumes:
- neo4j_data:/data
volumes:
neo4j_data:docker compose up -dRunning with Your Own Neo4j
# Connect to an existing Neo4j instance
from agentrecall_sdk import AgentRecall
memory = AgentRecall(
mode="local",
neo4j_uri="bolt://your-neo4j-host:7687",
neo4j_user="neo4j",
neo4j_password="your_password"
)Running with Your Own Model
By default, local mode uses a bundled Qwen2.5-7B. You can swap in any compatible model:
# Using a different model path
memory = AgentRecall(
mode="local",
model_path="/path/to/your/model",
neo4j_uri="bolt://localhost:7687",
neo4j_user="neo4j",
neo4j_password="password"
)Environment Variables
| Variable | Default | Description |
|---|---|---|
MODE | cloud | cloud or local |
NEO4J_URI | bolt://localhost:7687 | Neo4j connection URI |
NEO4J_USER | neo4j | Neo4j username |
NEO4J_PASSWORD | — | Neo4j password |
MODEL_PATH | Qwen/Qwen2.5-7B | HuggingFace model or local path |
API_PORT | 8700 | API server port |
API_KEY | — | API key for authentication |
LOG_LEVEL | info | Logging verbosity |
Verification
# Health check
curl http://localhost:8700/health
# Expected response
{
"status": "healthy",
"mode": "local",
"neo4j": "connected",
"model": "Qwen/Qwen2.5-7B"
}