Skip to main content

Persistence

CAIPE stores chat history and dynamic-agent runtime state in MongoDB.

What Persists

DataOwnerStorage
Conversation list and metadataUI/BFFMongoDB conversations collection
Dynamic-agent checkpointsDynamic AgentsMongoDB checkpoints_conversation collection
Dynamic-agent checkpoint writesDynamic AgentsMongoDB checkpoint_writes_conversation collection
Dynamic-agent file stateDynamic AgentsMongoDB GridFS
UI configuration and admin dataUI/BFFMongoDB collections

Dynamic Agents use LangGraph's MongoDB checkpointer internally, but operators configure it with the shared MONGODB_URI and MONGODB_DATABASE settings.

Docker Compose

The default compose files include MongoDB. Set MONGODB_URI only when pointing the stack at an external MongoDB or DocumentDB instance.

MONGODB_URI=mongodb://admin:changeme@caipe-mongodb:27017/caipe?authSource=admin
MONGODB_DATABASE=caipe

For local development:

COMPOSE_PROFILES=caipe-ui,dynamic-agents,caipe-mongodb docker compose -f docker-compose.dev.yaml up

Helm

The umbrella chart can deploy the bundled MongoDB subchart for the UI and dynamic-agent runtime:

tags:
caipe-ui: true
dynamic-agents: true

caipe-ui:
mongodb:
enabled: true

dynamic-agents:
config:
MONGODB_DATABASE: caipe

For an external MongoDB, provide the connection string through a Secret or ExternalSecret that is mounted into both caipe-ui and dynamic-agents as MONGODB_URI.

caipe-ui:
existingSecret: caipe-runtime-secrets

dynamic-agents:
existingSecret: caipe-runtime-secrets
config:
MONGODB_DATABASE: caipe

Runtime Notes

  • Browser chat uses persistent dynamic-agent sessions.
  • POST /invoke is stateless by default to avoid surprise MongoDB writes.
  • Set dynamic-agents.config.INVOKE_PERSIST_HISTORY=true only for callers that reuse conversation_id and need /invoke history.