Skip to content

The storage configuration defines how agent interactions, messages, and tool usage are logged. It's defined at the root level of the manifest.

Configuration Reference

SQLStorageConfig

SQL database storage configuration.

SQLStorageConfig (YAML)
1
2
3
4
5
6
7
8
9
- type: sql
  url: sqlite:////home/runner/.local/share/llmling-agent/history.db  # Database URL (e.g. sqlite:///history.db)
  pool_size: 5  # Connection pool size
  auto_migration: true  # Whether to automatically add missing columns
  log_messages: true  # Whether to log messages
  agents: null  # Optional set of agent names to include. If None, logs all agents.
  log_conversations: true  # Whether to log conversations
  log_commands: true  # Whether to log command executions
  log_context: true  # Whether to log context messages.

FileStorageConfig

File storage configuration.

FileStorageConfig (YAML)
1
2
3
4
5
6
7
8
9
- type: file
  path: /data/storage.json  # Path to storage file (extension determines format unless specified)
  format: auto  # Storage format (auto=detect from extension)
  encoding: utf-8  # File encoding of the storage file.
  log_messages: true  # Whether to log messages
  agents: null  # Optional set of agent names to include. If None, logs all agents.
  log_conversations: true  # Whether to log conversations
  log_commands: true  # Whether to log command executions
  log_context: true  # Whether to log context messages.

TextLogConfig

Text log configuration.

TextLogConfig (YAML)
- type: text_file
  path: /var/log/agent.log  # Path to log file
  format: chronological  # Log format template to use
  template: chronological  # Template to use: either predefined name or path to custom template
  encoding: utf-8  # File encoding
  log_messages: true  # Whether to log messages
  agents: null  # Optional set of agent names to include. If None, logs all agents.
  log_conversations: true  # Whether to log conversations
  log_commands: true  # Whether to log command executions
  log_context: true  # Whether to log context messages.

MemoryStorageConfig

In-memory storage configuration for testing.

MemoryStorageConfig (YAML)
1
2
3
4
5
6
- type: memory
  log_messages: true  # Whether to log messages
  agents: null  # Optional set of agent names to include. If None, logs all agents.
  log_conversations: true  # Whether to log conversations
  log_commands: true  # Whether to log command executions
  log_context: true  # Whether to log context messages.

Overview

Storage providers define how agent interactions, messages, and tool usage are persisted. The system supports multiple providers including SQL databases, file storage, text logs, and in-memory storage.

Key features:

  • Multiple Providers: Use multiple storage backends simultaneously
  • Agent Filtering: Control which agents are logged per provider
  • Flexible Logging: Configure what gets logged (messages, conversations, commands, context)
  • Provider Selection: Automatic or explicit provider selection for queries

Usage Example

agents.yml
# yaml-language-server: $schema=https://raw.githubusercontent.com/phil65/llmling-agent/refs/heads/main/schema/config-schema.json
storage:
  # Global settings
  agents: ["planner", "executor"]
  filter_mode: "and"
  log_messages: true
  log_conversations: true
  default_provider: "sql"

  providers:
    - type: "sql"
      url: "sqlite:///history.db"
      pool_size: 5
      auto_migration: true

    - type: "text_file"
      path: "logs/chat.log"
      format: "chronological"

Configuration Notes

  • Multiple providers can be used simultaneously
  • Agent filtering works at both global and provider levels
  • Provider flags are combined with global flags using AND logic
  • SQL provider is recommended for production use
  • Memory provider is useful for testing
  • Text logs support custom Jinja2 templates for flexible formatting