Agents Documentation

December 17, 2025 · View on GitHub

This module covers agent configuration, model selection, provider setup, and credential management for running agents with slop-code run.

Quick Start

New to running agents? Start here:

  1. Run Configuration - CLI usage and config files
  2. Agent Configuration - Configure agent behavior and limits
  3. Providers - Set up API credentials
  4. Models - Understand the model catalog
  5. Credentials - How API keys are resolved

Implementing a new agent? See:

Documentation Index

DocumentDescription
Run ConfigurationCLI commands, config files, output paths
Agent ConfigurationAgentConfigBase, cost limits, registry
Agent Class GuideAgent lifecycle, abstract methods, implementation
ProvidersProvider definitions and credential sources
ModelsModel catalog, pricing, agent-specific settings
CredentialsCredential resolution and troubleshooting

Agent Types

AgentDescription
Claude CodeAnthropic's Claude Code CLI agent
CodexOpenAI's Codex CLI agent
MiniSWELightweight bash-based agent
OpenCodeOpenCode CLI agent
GeminiGoogle's Gemini CLI agent
OpenHandsOpenHands framework agent

Core Concepts

ConceptDescriptionConfiguration
ProviderDefines where credentials come fromconfigs/providers.yaml
ModelAPI endpoint, pricing, agent-specific settingsconfigs/models/*.yaml
CredentialResolved API key or auth fileEnvironment variables or files
Agent ConfigAgent type, cost limits, Docker templateconfigs/agents/*.yaml
Agent ClassAgent implementation and lifecycleSource code

Configuration Flow

RunConfig (YAML or CLI)

    ├─ model.provider ──► ProviderCatalog ──► ProviderDefinition
    │                                              │
    │                                              ▼
    │                                         APIKeyStore
    │                                              │
    ├─ model.name ─────► ModelCatalog ──────► ModelDefinition
    │                                              │
    │                                              ▼
    └─ agent ──────────► AgentConfigBase ◄── ProviderCredential


                            Agent.from_config()

Common Workflows

Running an Agent

# Minimal - uses defaults
slop-code run --model anthropic/sonnet-4.5 --problem file_backup

# With config file
slop-code run --config my_run.yaml --problem file_backup

# Override thinking budget
slop-code run --model anthropic/opus-4.5 thinking=high --problem file_backup

Setting Up Credentials

# Environment variable (most providers)
export ANTHROPIC_API_KEY=sk-...

# Or use a different env var
slop-code run --model anthropic/sonnet-4.5 --provider-api-key-env MY_KEY

Adding a New Model

  1. Create configs/models/my-model.yaml
  2. Specify provider, internal_name, pricing
  3. Add agent_specific settings if needed

See Models Guide for details.

Adding a New Provider

  1. Add entry to configs/providers.yaml
  2. Set up the credential (env var or file)
  3. Reference provider in model configs

See Providers Guide for details.