Installation

Install the Rekall SDK for your language, configure environment variables, and verify your setup. Rekall supports TypeScript, Python, Go, and direct REST API access.

SDK Installation

Rekall provides first-class SDKs for the most popular languages. Each SDK includes typed interfaces, automatic retries, and built-in support for all 7 memory types.

TypeScript

The @rekall/agent-sdk package is the full-featured agent SDK with type-safe memory operations, semantic search, and agent lifecycle management. It requires Node.js 18 or later.

npm install @rekall/agent-sdk

Verify the installation:

npx rekall --version
# => @rekall/agent-sdk v1.x.x

Python

The rekall-agent-sdk package supports Python 3.9+ and includes both synchronous and async interfaces. It works with any Python AI framework including LangChain, LlamaIndex, and CrewAI.

pip install rekall-agent-sdk

Verify the installation:

python -c "import rekall; print(rekall.__version__)"
# => 1.x.x

Go

The Go SDK provides idiomatic Go interfaces with context support, structured errors, and efficient connection pooling. Requires Go 1.21 or later.

go get github.com/rekall-ai/rekall-agent-sdk

Import it in your code:

import (
rekall "github.com/rekall-ai/rekall-agent-sdk"
)
func main() {
client, err := rekall.NewClient(
rekall.WithAPIKey(os.Getenv("REKALL_API_KEY")),
)
if err != nil {
log.Fatal(err)
}
defer client.Close()
}

Lightweight REST Client

If you do not need the full agent SDK features (lifecycle management, automatic consolidation, local caching), the @rekall/client package provides a thin, typed wrapper around the REST API with minimal dependencies.

npm install @rekall/client
Usage
import { Rekall } from '@rekall/client';
const client = new Rekall({
apiKey: process.env.REKALL_API_KEY,
});
// Same API, lighter footprint
const memory = await client.memories.create({
type: 'episodic',
content: 'User prefers dark mode interfaces.',
});

Which package should I use?

Use @rekall/agent-sdk if you are building an AI agent that needs memory management, execution state, and automatic consolidation. Use @rekall/client if you just need to read and write memories from a backend service or script.

Docker Setup

For self-hosted deployments or local development, Rekall provides official Docker images. The Docker setup includes the API server, PostgreSQL, Redis, Qdrant for vector search, and Neo4j for the semantic knowledge graph.

docker-compose.yml
1version: '3.8'
2
3services:
4 rekall-api:
5 image: ghcr.io/rekall-ai/rekall-server:latest
6 ports:
7 - "8080:8080"
8 environment:
9 - DATABASE_URL=postgresql://rekall:rekall@postgres:5432/rekall
10 - REDIS_URL=redis://redis:6379
11 - QDRANT_URL=http://qdrant:6333
12 - NEO4J_URI=bolt://neo4j:7687
13 - NEO4J_USER=neo4j
14 - NEO4J_PASSWORD=your_neo4j_password
15 - GRAPHITI_ENABLED=true
16 - REKALL_API_KEY=rk_your_api_key_here
17 depends_on:
18 - postgres
19 - redis
20 - qdrant
21 - neo4j
22
23 postgres:
24 image: postgres:16
25 environment:
26 - POSTGRES_USER=rekall
27 - POSTGRES_PASSWORD=rekall
28 - POSTGRES_DB=rekall
29 volumes:
30 - pgdata:/var/lib/postgresql/data
31 ports:
32 - "5432:5432"
33
34 redis:
35 image: redis:7-alpine
36 ports:
37 - "6379:6379"
38
39 qdrant:
40 image: qdrant/qdrant:latest
41 ports:
42 - "6333:6333"
43 volumes:
44 - qdrant_data:/qdrant/storage
45
46 neo4j:
47 image: neo4j:5.15.0-community
48 environment:
49 - NEO4J_AUTH=neo4j/your_neo4j_password
50 - NEO4J_PLUGINS=["apoc"]
51 ports:
52 - "7474:7474"
53 - "7687:7687"
54 volumes:
55 - neo4j_data:/data
56
57volumes:
58 pgdata:
59 qdrant_data:
60 neo4j_data:

Start the services:

docker compose up -d
# Check that all services are running
docker compose ps
# View logs
docker compose logs -f rekall-api

Production deployments

The Docker Compose configuration above is intended for local development. For production, use managed PostgreSQL, managed Qdrant (or Qdrant Cloud), configure TLS, set strong passwords, and use a secrets manager for API keys. See the self-hosting guide for production recommendations.

Environment Variables

Configure Rekall using these environment variables. Only REKALL_API_KEY is required; all others have sensible defaults.

VariableRequiredDefaultDescription
REKALL_API_KEYYes--Your API key, prefixed with rk_
REKALL_BASE_URLNohttps://api.rekall.ai/v1API base URL. Override for self-hosted or staging.
REKALL_TIMEOUTNo30000Request timeout in milliseconds.
REKALL_MAX_RETRIESNo3Maximum number of automatic retries on failure.
REKALL_LOG_LEVELNowarnLog level: debug, info, warn, error.

Example .env file:

.env
REKALL_API_KEY=rk_live_abc123def456ghi789
REKALL_BASE_URL=https://api.rekall.ai/v1
REKALL_TIMEOUT=30000
REKALL_MAX_RETRIES=3
REKALL_LOG_LEVEL=info

Do not commit .env files

Add .env to your .gitignore file. For production deployments, use your platform's secrets management (e.g., AWS Secrets Manager, Vault, or Vercel Environment Variables).

Health Check

The Rekall API exposes a health check endpoint that does not require authentication. Use it to verify connectivity and check the API version.

const health = await rekall.health();
console.log(health);
// => { status: 'ok', version: '1.4.2', uptime: 86400 }

A 200 OK response with "status": "ok" confirms the API is running and accessible. For self-hosted setups, this also verifies that the database and Redis connections are healthy.

Verification

Run this end-to-end verification script to confirm everything is configured correctly. It checks authentication, creates a test memory, searches for it, and cleans up.

import { RekallClient } from '@rekall/agent-sdk';
async function verify() {
const rekall = new RekallClient({
apiKey: process.env.REKALL_API_KEY,
});
// 1. Health check
const health = await rekall.health();
console.log('Health:', health.status); // => ok
// 2. Create a test memory
const memory = await rekall.memories.create({
type: 'episodic',
content: 'Rekall installation verification test.',
metadata: { test: true },
});
console.log('Created:', memory.id);
// 3. Search for it
const results = await rekall.memories.search({
query: 'installation verification',
limit: 1,
});
console.log('Found:', results.length, 'result(s)');
// 4. Clean up
await rekall.memories.delete(memory.id);
console.log('Deleted test memory.');
console.log('\nVerification complete! Rekall is ready to use.');
}
verify().catch(console.error);

Troubleshooting

If verification fails, check the following: (1) Your API key starts with rk_ and is not expired. (2) Your network can reach api.rekall.ai on port 443. (3) For self-hosted setups, ensure REKALL_BASE_URL points to the correct host and port.

Next Steps

Rekall
rekall