Skip to main content
Version: 0.2.8

Session Management

How Agent Kernel manages conversation state across interactions.

Session Architecture

Storage Options

In-Memory (Development)

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

Redis (Production)

export AK_SESSION__TYPE=redis
export AK_SESSION__REDIS__URL=redis://localhost:6379
  • Persistent
  • Multi-process/distributed
  • Configurable TTL

DynamoDB (AWS Serverless)

export AK_SESSION__TYPE=dynamodb
export AK_SESSION__DYNAMODB__TABLE_NAME=agent-kernel-sessions
  • Serverless, fully managed
  • Auto-scaling
  • AWS-native integration
  • Configurable TTL

Session Lifecycle

Best Practices

  • Use unique session IDs per user conversation
  • Configure appropriate TTL in production
  • Use Redis for distributed/containerized deployments
  • Use DynamoDB for AWS serverless deployments
  • Monitor session storage size
💬 Ask AI Assistant

Get instant help with Agent Kernel documentation, examples, and more

AI Assistant