Skip to content

Storage

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

Providers

type Name Description
sql SQL Storage SQL database storage configuration.
file File Storage File storage configuration.
memory Memory Storage In-memory storage configuration for testing.
claude Claude Storage Claude Code native storage format configuration.
zed Zed Storage Zed IDE native storage format configuration.
acp ACP Storage ACP server storage configuration.
codex Codex Storage Codex server storage configuration.
t3 T3 Code Storage T3 Code storage configuration.

Besides AgentPool's own SQL and file storage, providers read and write the native session stores of Claude Code, Codex, Zed, T3 Code and ACP agents, so their conversations show up as AgentPool sessions.

Configuration Reference

StorageConfig

Global storage configuration.

Docs: https://phil65.github.io/agentpool/configuration/storage/

StorageConfig (YAML)
storage:
  providers: null  # List of configured storage providers
  default_provider: null  # Name of default provider for history queries.
  agents: null  # Global agent filter. Can be overridden by provider-specific filters.
  filter_mode: and  # How to combine global and provider agent filters:
  log_messages: true  # Whether to log messages.
  log_sessions: true  # Whether to log conversations.
  log_commands: true  # Whether to log command executions.
  title_generation_model: google-gla:gemini-2.5-flash-lite,openrouter:deepseek/deepseek-r1-0528:free  # Model to use for generating conversation titles.
  title_generation_prompt: 'Generate metadata for this conversation request. Provide:  # Prompt template for generating conversation titles.

    - A short, descriptive title (3-7 words)

    - A single emoji that represents the topic

    - An iconify icon name (e.g., ''mdi:code-braces'', ''mdi:database'', ''mdi:bug'')'

SQL Storage

SQL database storage configuration.

SQL Storage (YAML)
1
2
3
4
5
6
7
8
9
providers:
- type: sql
  url: sqlite:////home/runner/.local/share/agentpool/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_sessions: true  # Whether to log conversations
  log_commands: true  # Whether to log command executions

File Storage

File storage configuration.

File Storage (YAML)
1
2
3
4
5
6
7
8
9
providers:
- 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_sessions: true  # Whether to log conversations
  log_commands: true  # Whether to log command executions

Memory Storage

In-memory storage configuration for testing.

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

Claude Storage

Claude Code native storage format configuration.

Reads/writes to Claude Code's native JSONL format in ~/.claude/projects/. Useful for sharing conversation history between agentpool and Claude Code CLI.

The transcripts belong to Claude Code: reset never deletes them (it reports 0 deleted), and the storage manager doesn't send resets to this provider. Session ids must be plain file stems (no path separators or ..).

Claude Storage (YAML)
1
2
3
4
5
6
7
providers:
- type: claude
  path: ~/.claude  # Path to Claude data directory (default: ~/.claude)
  log_messages: true  # Whether to log messages
  agents: null  # Optional set of agent names to include. If None, logs all agents.
  log_sessions: true  # Whether to log conversations
  log_commands: true  # Whether to log command executions

Zed Storage

Zed IDE native storage format configuration.

Reads from Zed's native SQLite + zstd-compressed JSON format. Useful for importing conversation history from Zed's AI assistant.

This is a READ-ONLY provider - it cannot write back to Zed's format.

Zed Storage (YAML)
1
2
3
4
5
6
7
providers:
- type: zed
  path: ~/.local/share/zed/threads/threads.db  # Path to Zed threads database (or parent directory).
  log_messages: true  # Whether to log messages
  agents: null  # Optional set of agent names to include. If None, logs all agents.
  log_sessions: true  # Whether to log conversations
  log_commands: true  # Whether to log command executions

ACP Storage

ACP server storage configuration.

Read-only provider that queries a connected ACP server for session history. The connection is established at runtime by the agent, not from config.

ACP Storage (YAML)
1
2
3
4
5
6
providers:
- type: acp
  log_messages: true  # Whether to log messages
  agents: null  # Optional set of agent names to include. If None, logs all agents.
  log_sessions: true  # Whether to log conversations
  log_commands: true  # Whether to log command executions

Codex Storage

Codex server storage configuration.

Read-only provider that queries a connected Codex server for session history. The connection is established at runtime by the agent, not from config.

Codex Storage (YAML)
1
2
3
4
5
6
providers:
- type: codex
  log_messages: true  # Whether to log messages
  agents: null  # Optional set of agent names to include. If None, logs all agents.
  log_sessions: true  # Whether to log conversations
  log_commands: true  # Whether to log command executions

T3 Code Storage

T3 Code storage configuration.

Read-only provider for the threads of a T3 Code environment, read over its MCP endpoint (t3_thread_list / t3_thread_read), so the server must be running. Signs in like a T3 agent: url with token, else a sign-in saved with pyt3 login (login picks one).

T3 Code Storage (YAML)
providers:
- type: t3
  login: null  # The pyt3 login sign-in to use (the only or default one when unset).
  url: null  # The environment's URL (with token, instead of a saved sign-in).
  token: '!ENV ENV_VAR_NAME'  # An access token for url.
  project: null  # The project whose threads to read (an id, or its folder on the T3 host); all when unset.
  agent_name: t3  # The agent the threads are listed under.
  log_messages: true  # Whether to log messages
  agents: null  # Optional set of agent names to include. If None, logs all agents.
  log_sessions: true  # Whether to log conversations
  log_commands: true  # Whether to log command executions

Overview

Storage providers define how agent interactions, messages, and tool usage are persisted. The system supports multiple providers, from SQL databases and structured files to the session stores of other agents.

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/agentpool/refs/heads/main/schema/config-schema.json
storage:
  # Global settings
  agents: ["planner", "executor"]
  filter_mode: "and"
  log_messages: true
  log_sessions: true
  default_provider: "sql"

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

    - type: "file"
      path: "logs/chat.json"
      format: "json"

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
  • File storage writes YAML, JSON, TOML, INI or TOON (format from the file extension)