YAML Schema

Complete configuration reference for fleet YAML files. Every field, every option, every constraint.

Root Level

The top-level keys in your fleet.yaml file:

FieldTypeDescription
agents requiredAgentConfig[]Array of agent definitions. Must have at least one.
shared_blocks optionalSharedBlock[]Memory blocks shared across multiple agents.
shared_folders optionalSharedFolder[]Folders (file collections) shared across agents.
mcp_servers optionalMcpServer[]Model Context Protocol server definitions.
root_path optionalstringBase directory for resolving relative file paths. Defaults to the config file's directory.
Root structure
root_path: ./my-fleet
shared_blocks:
  - name: company_guidelines
    description: "Shared operational guidelines"
    limit: 5000
    from_file: "guidelines.md"

shared_folders:
  - name: brand_docs
    files:
      - "docs/*.md"

mcp_servers:
  - name: firecrawl
    type: sse
    server_url: "https://sse.firecrawl.dev"

agents:
  - name: my-agent
    # ... (see AgentConfig below)

AgentConfig

Each agent is a stateful Letta AI agent with its own memory, tools, and configuration.

Required Fields

FieldTypeDescription
namestringUnique agent identifier. Must match ^[a-zA-Z0-9_-]+$. Cannot use reserved words: agents, blocks, archives, tools, folders, files, mcp-servers, archival.
descriptionstringHuman-readable description of the agent's purpose.
llm_configLLMConfigModel and context window settings.
system_promptPromptConfigThe agent's system instructions.

Optional Fields

FieldTypeDefaultDescription
embeddingstringopenai/text-embedding-3-smallEmbedding model for vector operations.
embedding_configobjectAdditional embedding model settings.
reasoningbooleantrueEnable reasoning/chain-of-thought.
first_messagestringMessage sent on first creation for calibration.
tools(string | ToolObject)[]Tool names, configs, or glob patterns.
mcp_toolsMcpToolSelection[]Tools provided by MCP servers.
memory_blocksMemoryBlock[]Agent-specific memory blocks.
archivesArchiveConfig[]Archival memory storage. Max 1 per agent.
foldersFolderConfig[]Agent-specific file folders for RAG.
shared_blocksstring[]Names of shared blocks to attach.
shared_foldersstring[]Names of shared folders to attach.
tagsstring[]Tags for multi-tenancy and filtering. Format: key:value.

LLMConfig

FieldTypeDescription
model requiredstringModel identifier in provider/model-name format.
context_window requiredintegerContext window size in tokens. Must be between 1,000 and 200,000.
LLMConfig example
llm_config:
  model: "google_ai/gemini-2.5-pro"
  context_window: 128000
Common models: google_ai/gemini-2.5-pro, google_ai/gemini-2.0-flash-lite, openai/gpt-4o, openai/gpt-4o-mini

PromptConfig

The agent's system instructions. Provide content via exactly one source:

FieldTypeDescription
valuestringInline prompt text.
from_filestringPath to a prompt file (relative to root_path).
from_bucketFromBucketLoad from cloud storage.
disable_base_promptbooleanSkip Letta base instructions. Default: false.
Must provide exactly one of value, from_file, or from_bucket. If none specified, falls back to config/base-letta-system.md.
PromptConfig examples
# Inline
system_prompt:
  value: "You are a helpful assistant."

# From file
system_prompt:
  from_file: "prompts/system.md"

# From cloud storage
system_prompt:
  from_bucket:
    provider: supabase
    bucket: my-bucket
    path: "prompts/system.md"

# Skip Letta base instructions
system_prompt:
  from_file: "prompts/custom.md"
  disable_base_prompt: true

MemoryBlock

Memory blocks give agents persistent, structured memory. Each block is a named text buffer the agent can read and (if agent_owned) write to.

FieldTypeDescription
name requiredstringUnique name within the agent.
description requiredstringHuman-readable description.
limit requiredintegerMax character limit. Must be a positive integer.
agent_owned requiredbooleantrue: agent can modify this block, YAML won't overwrite it on apply. false: YAML syncs content on every apply.
value / from_file / from_bucketstring / string / FromBucketContent source. Exactly one required. Falls back to memory-blocks/{name}.md.
version optionalstringUser-defined version tag (e.g., "1.0.0").
MemoryBlock examples
memory_blocks:
  # Agent can modify this block — YAML won't overwrite
  - name: user_preferences
    description: "What I know about the user"
    limit: 5000
    value: "No preferences yet."
    agent_owned: true

  # YAML controls this block — syncs on every apply
  - name: brand_guidelines
    description: "Brand voice and visual identity"
    limit: 3000
    from_file: "brand/guidelines.md"
    agent_owned: false
    version: "2.1.0"

ArchiveConfig

Archives provide vector-searchable long-term memory. Max one per agent.

FieldTypeDescription
name requiredstringUnique name within the agent.
description optionalstringHuman-readable description.
embedding optionalstringEmbedding model. Inherits from agent if not set.
embedding_config optionalobjectAdditional embedding settings.
ArchiveConfig example
archives:
  - name: knowledge_base
    description: "Long-term knowledge storage"
    embedding: "openai/text-embedding-3-small"

Tools

Tools extend what an agent can do. Reference built-in tools by name, custom tools by path, or auto-discover from a directory.

Tools examples
tools:
  # Built-in tool by name
  - archival_memory_insert
  - archival_memory_search

  # Custom tool from cloud storage
  - name: "web_search"
    from_bucket:
      provider: supabase
      bucket: tools
      path: "web_search.py"

  # Auto-discover all .py files in tools/ directory
  - "tools/*"

McpServer

Model Context Protocol servers provide tools to agents via external services.

FieldTypeDescription
name requiredstringUnique server identifier.
type requiredstringsse, stdio, or streamable_http.

SSE / Streamable HTTP

FieldTypeDescription
server_urlstringServer endpoint URL.
auth_headerstringCustom auth header name.
auth_tokenstringAuth token value. Supports ${ENV_VAR} expansion.
custom_headersRecord<string, string>Additional headers.

Stdio

FieldTypeDescription
commandstringCommand to execute.
argsstring[]Command arguments.
envRecord<string, string>Environment variables.
McpServer examples
mcp_servers:
  # SSE server
  - name: firecrawl
    type: sse
    server_url: "https://sse.firecrawl.dev"
    auth_header: "Authorization"
    auth_token: "Bearer ${FIRECRAWL_API_KEY}"

  # Stdio server
  - name: filesystem
    type: stdio
    command: "npx"
    args: ["-y", "@anthropic/mcp-server-filesystem", "/tmp"]

  # Streamable HTTP
  - name: custom-api
    type: streamable_http
    server_url: "https://api.example.com/mcp"
    custom_headers:
      X-Api-Version: "2"

McpToolSelection

Select which tools from an MCP server an agent can use.

McpToolSelection examples
mcp_tools:
  # Specific tools only
  - server: firecrawl
    tools: ["scrape", "crawl"]

  # All tools from this server (default)
  - server: filesystem

Folders

Folders attach file collections to agents for RAG and context. Files can be local paths, glob patterns, or cloud storage references.

Folders examples
folders:
  - name: documentation
    files:
      # Local file
      - "docs/guide.md"

      # Glob pattern
      - "docs/*.txt"

      # Recursive glob
      - "knowledge/**/*.md"

      # Cloud storage
      - from_bucket:
          provider: supabase
          bucket: my-bucket
          path: "docs/important.pdf"

      # Cloud storage with glob
      - from_bucket:
          provider: supabase
          bucket: my-bucket
          path: "*.txt"

SharedBlock

Shared blocks are memory blocks that multiple agents can reference. Define them at the root level, then attach by name.

SharedBlock usage
# Define at root level
shared_blocks:
  - name: company_policies
    description: "Company-wide policies all agents must follow"
    limit: 5000
    from_file: "policies.md"

  - name: safety_guidelines
    description: "Safety and compliance rules"
    limit: 3000
    value: "Never generate fake testimonials..."

agents:
  - name: agent-a
    # ... config ...
    shared_blocks:
      - company_policies
      - safety_guidelines

  - name: agent-b
    # ... config ...
    shared_blocks:
      - company_policies

SharedFolder

Like shared blocks, but for file collections.

SharedFolder usage
shared_folders:
  - name: brand_assets
    files:
      - "brand/*.md"
      - from_bucket:
          provider: supabase
          bucket: assets
          path: "brand/*.pdf"

agents:
  - name: agent-a
    shared_folders:
      - brand_assets

FromBucket

Cloud storage reference used by prompts, memory blocks, folders, and tools.

FieldTypeDescription
provider requiredstringStorage provider. Currently only supabase.
bucket requiredstringBucket name.
path requiredstringFile path or glob pattern.

Tags

Tags enable multi-tenancy and agent filtering. Use key:value format.

Tags example
agents:
  - name: support-agent
    tags:
      - "tenant:acme-corp"
      - "role:support"
      - "env:production"
Filter by tags
# Filter by tag
lettactl get agents --tags "tenant:acme-corp"
lettactl get agents --tags "role:support,env:production"

Defaults

FieldDefault Value
embeddingopenai/text-embedding-3-small
reasoningtrue
disable_base_promptfalse
context_window28000
modelgoogle_ai/gemini-2.5-pro

Complete Example

A fleet config using every available feature:

fleet.yaml — complete example
root_path: ./fleet

# ── Shared Resources ──────────────────────────

shared_blocks:
  - name: company_policies
    description: "Company-wide operational policies"
    limit: 5000
    from_file: "policies/company.md"
    version: "2.0.0"

  - name: safety_guidelines
    description: "AI safety and compliance rules"
    limit: 3000
    value: |
      Never generate fake testimonials.
      Never impersonate real people.
      Always disclose AI-generated content.

shared_folders:
  - name: brand_intelligence
    files:
      - "brand/*.md"
      - from_bucket:
          provider: supabase
          bucket: docs
          path: "brand/*.pdf"

# ── MCP Servers ───────────────────────────────

mcp_servers:
  - name: firecrawl
    type: sse
    server_url: "https://sse.firecrawl.dev"
    auth_header: "Authorization"
    auth_token: "Bearer ${FIRECRAWL_API_KEY}"

  - name: filesystem
    type: stdio
    command: "npx"
    args: ["-y", "@anthropic/mcp-server-filesystem", "/tmp"]

# ── Agents ────────────────────────────────────

agents:
  - name: brand-researcher
    description: "Researches brands and builds customer profiles"
    tags:
      - "tenant:agency-123"
      - "role:research"

    llm_config:
      model: "google_ai/gemini-2.5-pro"
      context_window: 128000

    embedding: "openai/text-embedding-3-small"
    reasoning: true

    system_prompt:
      from_file: "prompts/researcher.md"
      disable_base_prompt: false

    first_message: "Initialize and confirm readiness."

    memory_blocks:
      - name: current_research
        description: "Active research findings"
        limit: 10000
        value: "No active research."
        agent_owned: true

      - name: research_methodology
        description: "How to conduct brand research"
        limit: 3000
        from_file: "docs/methodology.md"
        agent_owned: false
        version: "1.2.0"

    archives:
      - name: research_history
        description: "Past research findings"
        embedding: "openai/text-embedding-3-small"

    folders:
      - name: reference_docs
        files:
          - "reference/*.md"
          - "reference/**/*.txt"

    shared_blocks:
      - company_policies
      - safety_guidelines

    shared_folders:
      - brand_intelligence

    tools:
      - archival_memory_insert
      - archival_memory_search
      - "tools/*"

    mcp_tools:
      - server: firecrawl
        tools: ["scrape", "crawl"]

  - name: creative-director
    description: "Generates creative concepts and ad directions"
    tags:
      - "tenant:agency-123"
      - "role:creative"

    llm_config:
      model: "openai/gpt-4o"
      context_window: 128000

    system_prompt:
      from_file: "prompts/creative.md"

    memory_blocks:
      - name: brand_context
        description: "Current brand context and guidelines"
        limit: 8000
        value: "Awaiting brand assignment."
        agent_owned: true

      - name: creative_principles
        description: "Creative direction principles"
        limit: 2000
        from_file: "docs/creative-principles.md"
        agent_owned: false

    shared_blocks:
      - company_policies

    tools:
      - archival_memory_insert
      - archival_memory_search

Validation Rules

lettactl validates your config before applying. Here are the rules:

RuleDescription
Unique agent namesNo two agents can share a name.
Unique block namesMemory block names must be unique within an agent.
Max 1 archiveEach agent can have at most one archive.
Single content sourcePrompts and blocks must use exactly one of value, from_file, or from_bucket.
Context window rangeMust be between 1,000 and 200,000 tokens.
No unknown fieldsStrict validation — typos and unknown keys are rejected.
No reserved namesAgent names cannot be: agents, blocks, archives, tools, folders, files, mcp-servers, archival.
Tags formatTags cannot contain commas. Non-empty strings.
Validate your config
# Always preview before applying
lettactl apply -f fleet.yaml --dry-run