Skip to main content

Configuration

How do you configure an agentic workflow without repeating yourself across dozens of actions? Agent Actions uses a three-level configuration hierarchy that lets you set defaults once and override them where needed. Higher specificity wins—action settings override agentic workflow defaults, which override project defaults.

Think of it like CSS specificity: project settings are the base styles, agentic workflow defaults are class-level overrides, and action-specific settings are inline styles that take precedence.

The diagram below shows how configuration cascades from project-level down to individual actions:

Notice that the most specific level (action inline fields) has final say. This means you can establish sensible defaults project-wide but still customize individual actions when needed.

Project Configuration

The agent_actions.yml file in your project root defines global settings:

# agent_actions.yml
default_agent_config:
api_key: OPENAI_API_KEY
model_name: gpt-4o-mini
model_vendor: openai

schema_path: schema
tool_path: ["tools"]

chunk_config:
chunk_size: 4000
overlap: 500

output_storage:
backend: sqlite
db_path: ./agent_io/outputs.db
FieldDescription
default_agent_configDefault settings inherited by all actions
schema_pathDirectory containing output schemas (default: schema)
tool_pathDirectories to scan for custom tools
chunk_configText chunking for large inputs
output_storageStorage backend config: backend (sqlite), db_path (database file location)

Agentic Workflow Configuration

Each agentic workflow YAML file defines defaults and actions. Let's explore how an agentic workflow brings together model settings, execution modes, and action definitions:

# agent_config/my_workflow.yml
name: my_workflow
description: "Extract and validate facts"
version: "1.0.0"

defaults:
model_vendor: openai
model_name: gpt-4o-mini
json_mode: true
granularity: Record
run_mode: batch

actions:
- name: extract_facts
prompt: $prompts.extract_facts
schema: facts_schema

See Defaults for the complete inheritance system.

Action Configuration

Each action can override any default. Consider what happens when you need one action to use a different model or run in a different mode—you simply specify those fields on the action itself:

actions:
- name: extract_facts
intent: "Extract key facts from content"
dependencies: prior_action # Input source

# Model
model_vendor: openai
model_name: gpt-4o-mini

# Prompt & Schema
prompt: $prompts.extract_facts
schema: facts_schema
json_mode: true

# Execution
run_mode: batch
granularity: Record

# Conditional
guard:
condition: "source.content != ''"
on_false: filter

Core Action Fields

FieldTypeDescription
namestringUnique action identifier
intentstringHuman-readable description
kindstringllm (default) or tool
dependencieslistUpstream actions to wait for
promptstringInline prompt or $store.template reference
schemastringOutput validation schema
context_scopeobjectControl data visibility: observe, drop, passthrough, seed_path — see Context Scope
data_sourceobject/stringOptional input source configuration for start-node actions (defaults to staging/)

Model Fields

FieldTypeDescription
model_vendorstringProvider: openai, anthropic, google, groq, mistral, cohere, ollama
model_namestringModel identifier (e.g., gpt-4o-mini)
api_keystringEnvironment variable name for API key
temperaturefloatLLM temperature (0.0-2.0)
max_tokensintegerMaximum response tokens
top_pfloatTop-p (nucleus) sampling (0.0-1.0)
stopstring/listStop sequence(s) to end generation
Vendor-Specific Parameter Mapping

Generation parameters (temperature, max_tokens, top_p, stop) are mapped to vendor-specific API keys automatically:

  • OpenAI / Groq / Mistral: Parameters passed through as-is. OpenAI and Groq also support frequency_penalty and presence_penalty.
  • Anthropic: stopstop_sequences (string values are wrapped in a list)
  • Gemini: max_tokensmax_output_tokens, stopstop_sequences
  • Cohere: top_pp, stopstop_sequences
  • Ollama: max_tokensnum_predict, parameters placed in options dict. stop strings are wrapped in a list.

Execution Fields

FieldTypeDescription
run_modestringonline or batch — see Run Modes
granularitystringrecord or file — see Granularity
guardobjectConditional execution — see Guards
is_operationalbooleanEnable/disable action (default: true)
policystringExecution policy
idempotency_keystringTemplate for idempotency key
retryobjectRetry configuration for transport-layer failures
Granularity Constraints
  • File granularity is only supported for tool actions (kind: tool)
  • Guards are not supported with File granularity

Input Source

Start-node actions can override the default staging/ input with a local folder and optional file-type filter:

actions:
- name: extract_facts
data_source:
type: local
folder: ./data
file_type: json

Validation Fields

FieldTypeDescription
json_modebooleanEnable structured JSON output
repromptobject/falseReprompt configuration for validation failures (see Reprompting)

Tool Action Fields

FieldTypeDescription
implstringPython function name (required for kind: tool)

Tool actions support both Record and File granularity. File granularity allows the tool to process all records at once, enabling operations like deduplication, aggregation, and batch exports.

Vendor Support

Vendormodel_vendorBatch APIExample Models
OpenAIopenaigpt-4o, gpt-4o-mini
Anthropicanthropicclaude-sonnet-4-20250514
Googlegooglegemini-2.0-flash
Groqgroqllama-3.3-70b-versatile
Mistralmistralmistral-large-latest
Coherecoherecommand-r-plus
Ollamaollamallama3, mistral

Environment Variables

You might wonder why API keys are specified as variable names rather than values. Agent Actions references environment variables by name, keeping secrets out of your configuration files:

api_key: OPENAI_API_KEY  # Uses $OPENAI_API_KEY from environment

API Keys

VariableProvider
OPENAI_API_KEYOpenAI
ANTHROPIC_API_KEYAnthropic
GOOGLE_API_KEYGoogle Gemini
GROQ_API_KEYGroq
MISTRAL_API_KEYMistral
OLLAMA_HOSTOllama (default: http://localhost:11434)

Runtime Variables

VariableDefaultDescription
AGENT_ACTIONS_LOG_LEVELINFOLog level (DEBUG, INFO, WARNING, ERROR)
AGENT_ACTIONS_DEBUG0Enable debug mode

Directory Structure

Here's where it gets interesting: Agent Actions uses a two-level structure—project-level assets shared across workflows, and workflow-level assets specific to each domain:

project/
├── agent_actions.yml # Project config

├── # ════════════════════════════════════════════════════════
├── # PROJECT-LEVEL (shared across all workflows)
├── # ════════════════════════════════════════════════════════
├── schema/ # Output schemas (project-level only)
├── tools/ # Custom tools (shared)
├── prompt_store/ # Shared prompt templates (optional)

├── # ════════════════════════════════════════════════════════
├── # WORKFLOW-LEVEL (domain-specific)
├── # ════════════════════════════════════════════════════════
└── agent_workflow/
└── my_workflow/
├── agent_config/
│ └── my_workflow.yml # Agentic workflow definition
├── agent_io/
│ ├── staging/ # Input data (starting point)
│ ├── source/ # Metadata tracking
│ └── target/ # Output data
├── seed_data/ # Static reference data (workflow-level)
└── prompt_store/ # Domain-specific prompts (optional)

Asset Location Summary

AssetProject LevelWorkflow LevelNotes
Schemasschema/Always project-level; shared across workflows
Toolstools/Always project-level; shared across workflows
Promptsprompt_store/workflow/prompt_store/Either or both; searched recursively
Seed Dataworkflow/seed_data/Always workflow-level; domain-specific
Input/Outputworkflow/agent_io/Always workflow-level

This structure keeps your agentic workflows organized while enabling reuse. Shared schemas ensure consistent data contracts; workflow-level seed data enables domain customization without touching shared assets.

See Also