Short full-stack demo for showing how Redis-backed memory changes an LLM chat experience over time.
This repo runs as four services:
frontend: static React app served by Nginxbackend: FastAPI app that owns the HTTP API and Anthropic callsagent-memory-server: Redis Agent Memory Server (AMS)redis: Redis Open Source with search and JSON modules
Install these before you start:
- Docker Desktop
- An Anthropic API key
- A Hugging Face token for the default AMS embedding model
Verify Docker is running before you continue.
- Copy
.env.exampleto.env. - Open
.envand replace the placeholder secrets. - From the repo root, run:
docker compose up --buildIf you want the stack to keep running in the background, use:
docker compose up --build -dCompose keeps host-facing and container-facing addresses separate on purpose:
- your browser uses
localhost:* - containers talk to each other by service name such as
backend,agent-memory-server, andredis - the Compose file overrides internal URLs so you do not have to rewrite app config by hand
- host ports are assigned dynamically to avoid collisions across machines
After startup, ask Docker which host ports were assigned:
docker compose port frontend 80
docker compose port backend 8000
docker compose port agent-memory-server 8000
docker compose port redis 6379Then verify the frontend, backend, and AMS URLs using the returned ports.
You can also inspect the running services with:
docker compose psExpected services:
frontendbackendagent-memory-serverredis
Set these in .env before startup:
ANTHROPIC_API_KEYHF_TOKEN
The rest of the defaults in .env.example are already wired for local Docker Compose.
To stop the running services:
docker compose downTo stop services and also remove the Redis data volume:
docker compose down -vUse -v only if you want to wipe stored memory and start fresh.
If you are not sure which host port Docker picked, run:
docker compose psor query a specific service:
docker compose port frontend 80
docker compose port backend 8000
docker compose port agent-memory-server 8000Check:
- the backend health URL returned by
docker compose port backend 8000 - the AMS health URL returned by
docker compose port agent-memory-server 8000 docker compose logs --tail 100
If the backend is up but chat requests fail, the usual causes are:
- missing or invalid
ANTHROPIC_API_KEY - missing or invalid Hugging Face token for AMS embeddings
- one of the services exited during startup