Supyagent
Building Agents

Configuration Reference

Complete YAML schema reference for supyagent agent configuration files.

Configuration Reference

Every agent is defined by a YAML file in the agents/ directory. This page documents every field, its type, default value, and behavior.

Complete Annotated Example

agents/myagent.yaml
# Required fields
name: myagent                    # string (1-50 chars), must be unique
description: A helpful assistant # string, shown in delegation tool descriptions
version: "1.0"                   # string, for your own tracking
type: interactive                # "interactive" | "execution" | "daemon"

# LLM model settings
model:
  provider: anthropic/claude-sonnet-4-5-20250929  # LiteLLM model identifier (required)
  temperature: 0.7               # float 0-2 (default: 0.7)
  max_tokens: 8192               # int or null (default: null = provider max)
  max_retries: 3                 # int >= 0 (default: 3)
  retry_delay: 1.0               # float > 0, initial retry delay in seconds
  retry_backoff: 2.0             # float > 1, exponential backoff multiplier
  fallback:                      # list of fallback model identifiers
    - openai/gpt-4o
    - google/gemini-2.5-flash
  cache: true                    # enable prompt caching (default: true)

# System prompt (required, min 1 char)
system_prompt: |
  You are a helpful AI assistant with access to tools.
  Use your tools to help the user accomplish their tasks.

# Tool permissions
tools:
  allow:
    - "*"                        # glob patterns for allowed tools
  deny:
    - "shell:*"                  # glob patterns for denied tools

# Agents this agent can delegate to
delegates:
  - planner
  - coder

# Whether to inject tool-creation instructions into the system prompt
will_create_tools: false

# Credential specifications
credentials:
  - name: GITHUB_TOKEN
    description: GitHub personal access token for API calls
    required: true
  - name: SLACK_WEBHOOK
    description: Slack webhook URL for notifications
    required: false

# Execution limits
limits:
  max_tool_calls_per_turn: 50
  max_total_tool_calls: 200
  circuit_breaker_threshold: 3   # consecutive failures before blocking a tool
  repetition_threshold: 4        # identical calls before blocking

# Context window management
context:
  auto_summarize: true
  max_messages_before_summary: 30
  max_tokens_before_summary: 128000
  min_recent_messages: 6
  response_reserve: 4096

# Process supervisor settings
supervisor:
  default_timeout: 60
  on_timeout: background         # "background" | "kill" | "wait"
  max_background_processes: 10
  force_background_patterns:
    - "*__start_server*"
    - "*__run_server*"
    - "*__serve*"
  force_sync_patterns:
    - "*__read_*"
    - "*__list_*"
    - "*__get_*"
  tool_settings:
    "web__scrape_page":
      timeout: 120
      mode: sync                 # "sync" | "background" | "auto"
  default_delegation_mode: subprocess
  delegation_timeout: 600

# Delegation behavior
delegation:
  share_credentials: true
  share_summary: true
  default_mode: subprocess       # "subprocess" | "in_process"
  default_timeout: 300

# Long-term memory
memory:
  enabled: true
  extraction_threshold: 5
  retrieval_limit: 10
  auto_extract: true

# Workspace directory
workspace: /path/to/project

# Container sandbox
sandbox:
  enabled: false
  image: python:3.12-slim
  runtime: auto                  # "auto" | "podman" | "docker"
  network: bridge                # "none" | "host" | "bridge"
  memory_limit: 2g
  allow_shell: true
  setup_commands:
    - pip install pandas
  extra_mounts:
    - host_path: /data/datasets
      container_path: /mnt/data
      readonly: true
  env:
    MY_VAR: value

# Service integration (supyagent cloud)
service:
  enabled: true
  url: https://app.supyagent.com

# Daemon schedule (only used when type=daemon)
schedule:
  interval: 5m                   # "30s", "5m", "1h"
  max_events_per_cycle: 10
  prompt: null                   # optional task to run each cycle

Field Reference

Top-Level Fields

FieldTypeDefaultDescription
namestringrequiredAgent name, 1-50 characters. Must match the filename (e.g., agents/coder.yaml has name: coder).
descriptionstring""Human-readable description. Shown in delegation tool descriptions when other agents delegate to this one.
versionstring"1.0"Version string for your own tracking.
typestring"interactive"Agent execution type. One of interactive, execution, or daemon.
system_promptstringrequiredThe system prompt sent to the LLM. Use YAML | for multi-line.
will_create_toolsboolfalseWhen true, appends tool-creation instructions to the system prompt so the agent can write new supypowers scripts at runtime.
delegateslist[string][]Names of agents this agent can delegate to. Each name must match a YAML file in agents/.
workspacestring | nullnullWorking directory for tool execution. Tools run relative to this path.

Agent Types

TypeCommandBehavior
interactivesupyagent chatStateful chat with session persistence, streaming, credential prompting.
executionsupyagent runStateless input-to-output pipeline. No session storage, no credential prompting.
daemonsupyagent daemonEvent-driven polling loop. Reads from AI inbox, processes events, archives them.

model

Controls the LLM provider and generation parameters.

FieldTypeDefaultDescription
providerstringrequiredLiteLLM model identifier (e.g., anthropic/claude-sonnet-4-5-20250929). See Models for all providers.
temperaturefloat0.7Sampling temperature, 0-2. Lower values are more deterministic.
max_tokensint | nullnullMaximum response tokens. null uses the provider default (usually the model maximum).
max_retriesint3Maximum retries on transient LLM errors (rate limits, service unavailable).
retry_delayfloat1.0Initial delay in seconds between retries.
retry_backofffloat2.0Exponential backoff multiplier applied to retry delay.
fallbacklist[string][]Fallback model identifiers tried in order when the primary model exhausts retries on transient errors. Non-transient errors (auth, not found) raise immediately without fallback.
cachebooltrueEnable prompt caching when supported by the provider. Currently activates Anthropic's prompt caching beta header.

tools

Controls which tools the agent can access. See Tool Permissions for details.

FieldTypeDefaultDescription
allowlist[string][]Glob patterns for allowed tools.
denylist[string][]Glob patterns for denied tools. Deny takes precedence over allow.

credentials

Declare credentials the agent needs. These are prompted from the user at runtime via the request_credential tool and stored encrypted on disk.

FieldTypeDefaultDescription
namestringrequiredEnvironment variable name (e.g., GITHUB_TOKEN).
descriptionstring""Explains what this credential is for. Shown to the user when prompted.
requiredboolfalseWhether this credential is required for the agent to function.

limits

Execution limits as a flat dictionary.

KeyTypeDefaultDescription
max_tool_calls_per_turnint100Maximum tool call iterations per user message before stopping.
max_total_tool_callsintnoneOptional cap on total tool calls across the session.
circuit_breaker_thresholdint3Consecutive failures of the same tool before it is blocked for the turn.
repetition_thresholdint4Identical tool calls (same name and arguments) before blocking.

context

Controls how long conversations are managed within token limits. See Sessions for usage details.

FieldTypeDefaultDescription
auto_summarizebooltrueAutomatically summarize when trigger thresholds are reached.
max_messages_before_summaryint30Trigger summarization after this many messages since the last summary.
max_tokens_before_summaryint128000Trigger summarization when total tokens exceed this threshold.
min_recent_messagesint6Minimum recent messages to always include in context (never summarized away).
response_reserveint4096Tokens reserved for the LLM's response.

supervisor

Controls how tool and agent execution is managed by the ProcessSupervisor.

FieldTypeDefaultDescription
default_timeoutfloat60Seconds to wait before auto-backgrounding a tool.
on_timeoutstring"background"Action when timeout is reached: background (keep running), kill (terminate), wait (block forever).
max_background_processesint10Maximum concurrent background processes.
force_background_patternslist[string]["*__start_server*", ...]Glob patterns for tools that always run in background.
force_sync_patternslist[string]["*__read_*", ...]Glob patterns for tools that always run synchronously.
tool_settingsdict{}Per-tool execution settings, keyed by tool name pattern. Each value has timeout (float) and mode (sync, background, auto).
default_delegation_modestring"subprocess"Default execution mode for delegated agents.
delegation_timeoutfloat600Default timeout for delegated agent tasks in seconds.

delegation

Controls how this agent delegates to other agents. See Delegation for details.

FieldTypeDefaultDescription
share_credentialsbooltrueShare stored credentials with delegated agents.
share_summarybooltruePass conversation summary to delegated agents for context.
default_modestring"subprocess"Default execution mode: subprocess (isolated) or in_process (faster, shared memory).
default_timeoutint300Default timeout in seconds for delegated agent tasks.

memory

Controls the long-term entity-graph memory system.

FieldTypeDefaultDescription
enabledbooltrueEnable entity-graph memory across sessions.
extraction_thresholdint5Extract memories every N signal-flagged exchanges.
retrieval_limitint10Maximum memories injected into context per turn.
auto_extractbooltrueAutomatically extract memories from conversation.

sandbox

Container sandbox for isolated tool execution. Requires podman or docker.

FieldTypeDefaultDescription
enabledboolfalseRun tools inside a container.
imagestring"python:3.12-slim"Container image to use.
runtimestring"auto"Container runtime: auto, podman, or docker.
networkstring"bridge"Container network mode: none, host, or bridge.
memory_limitstring"2g"Container memory limit (e.g., 2g, 512m).
allow_shellbooltrueAllow shell/exec tool execution inside sandbox.
setup_commandslist[string][]Commands to run inside container after creation.
extra_mountslist[MountConfig][]Additional bind mounts into the container.
envdict{}Extra environment variables inside the container.

service

Integration with supyagent cloud for third-party tools (Gmail, Slack, GitHub, etc.). See Cloud Integrations for setup.

FieldTypeDefaultDescription
enabledbooltrueUse service tools when connected. Auto-uses if an API key exists.
urlstring"https://app.supyagent.com"Service base URL.

schedule

Daemon schedule settings. Only used when type: daemon. See Daemon Mode.

FieldTypeDefaultDescription
intervalstring"5m"Poll interval. Supports s (seconds), m (minutes), h (hours).
max_events_per_cycleint10Maximum inbox events to process per cycle (minimum: 1).
promptstring | nullnullOptional scheduled task to run each cycle even with no events.

Validation

When loading a config, supyagent performs two layers of validation:

  1. Pydantic type checks -- enforces types, ranges, and required fields with clear error messages.
  2. Semantic validation -- checks that the model provider is recognized by LiteLLM, delegate names reference existing agent files, and tool patterns are valid strings.
# See validation errors
supyagent chat badagent
# Error: Invalid configuration for agent 'badagent':
#   - model.provider is required (e.g., 'anthropic/claude-sonnet-4-5-20250929')
#   - system_prompt is required (multi-line string starting with '|' in YAML)

Minimal Config

The smallest valid configuration:

agents/minimal.yaml
name: minimal
model:
  provider: anthropic/claude-sonnet-4-5-20250929
system_prompt: |
  You are a helpful assistant.

Everything else uses sensible defaults.