Skip to main content
Version: 0.2.5

Session Management

How Agent Kernel manages conversation state across interactions.

Session Architecture

Storage Options

In-Memory (Development)

export AK_SESSION_STORAGE=in_memory
  • Fast, no setup required
  • Data lost on restart
  • Single-process only

Redis (Production)

export AK_SESSION_STORAGE=redis
export AK_REDIS_URL=redis://localhost:6379
  • Persistent
  • Multi-process/distributed
  • Configurable TTL

Session Lifecycle

Best Practices

  • Use unique session IDs per user conversation
  • Configure appropriate TTL in production
  • Use Redis for distributed deployments
  • Monitor session storage size

Ready to Ship Your
First Agent?

Free, open-source, Apache 2.0. No licensing costs, no vendor lock-in. Join hundreds of developers building production AI agents with Agent Kernel.

Agent Kernel
Ask AI