Skip to main content

Configuration

Agent Actions uses a configuration hierarchy with three levels. You set defaults one time and override them where necessary. Thus you do not repeat the same settings in dozens of actions. The more specific level wins. Action settings override workflow defaults, and workflow defaults override project defaults.

The hierarchy works like CSS specificity. Project settings are the base styles. Workflow defaults are class-level overrides. Action settings are inline styles that have priority.

The diagram shows how the configuration goes from the project level to each action:

The most specific level (the inline fields of the action) has the final decision. Thus you can set sensible defaults for the full project, and still customize an individual action when necessary.

Project Configuration​

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

yaml
YAML
# agent_actions.yml
default_agent_config:
api_key: OPENAI_API_KEY
model_name: gpt-6-luna
model_vendor: openai
chunk_config:
chunk_size: 4000
chunk_overlap: 500

schema_path: schema
tool_path: ["tools"]
seed_data_path: seed_data
seed_data_paths: [shared_seeds]
required_by_default: false

endpoints: # OpenAI-compatible servers an action selects with model_vendor
lab-vllm:
url: http://gpu-box:8000/v1
auth: none

prices: # per million tokens; `agac usage` estimates the cost from them
claude-haiku-5-5:
input: 0.10
output: 0.50
cache_read: 0.01
batch_discount: 0.5

knowledge: # reference text that context_scope.retrieve searches
help_center:
sources: [knowledge/help_center/**/*.md]
index: [keyword]

logging:
level: WARNING # console level; the run log keeps every level
module_levels:
httpx: INFO # re-open a logger the framework clamps to WARNING
file:
max_bytes: 52428800 # per run file, DEBUG rows stop past this; 0 = no cap
backup_count: 5 # earlier runs kept as events.1.json ... events.N.json
FieldDescription
default_agent_configThe default settings that all actions inherit, including chunk_config. See Chunking. Only the keys nested here reach an action. Nothing reads a chunk_config: at the top level of the file. This block takes the keys that a workflow defaults: block takes (see Defaults). The load refuses any other key. The error names the key, the valid key that it resembles, and all of the valid keys
schema_pathThe directory that contains the output schemas. Required: if it is not set, the load of a schema fails. agac init writes schema_path: schema
tool_pathThe directories to scan for custom tools
seed_data_pathThe directory for static reference data (default: seed_data)
seed_data_pathsShared seed folders, relative to the project root. Agent Actions searches them after the folder of the workflow and the folder of the project. See Seed Data
connectionsNamed databases that a workflow reads its input from or writes its results to. Each entry has a type (sqlite, duckdb, postgres, mysql, redshift, snowflake, bigquery or databricks) and the settings of that type. Write each credential as ${NAME}: the load refuses a credential that is written in the file. See Databases
endpointsOpenAI-compatible servers with structured output. Each server has a url, an auth source and optional headers. An action selects one with model_vendor: <name>. See Endpoints
knowledgeNamed knowledge bases that an action searches with context_scope.retrieve. Each base has sources (file globs, structured files with path:, or database queries with connection: and sql:), an optional index (keyword, fuzzy or both, default [keyword]) and an optional chunk_config (default split_method: markdown, chunk_size: 200, chunk_overlap: 0). A base does not inherit the chunk_config of default_agent_config. The indexes are built under .agac/knowledge/. See Knowledge Bases and Retrieval
pricesThe price of one million tokens for each model. input and output are required. cache_read, cache_write and batch_discount are optional. batch_discount is the part, from 0 to 1, that the provider removes from the price of a batch call. Agent Actions has no built-in prices. agac usage reads this block to estimate a cost. A run does not read it.
required_by_defaultWhen true, flat schema fields (fields: list) are required, unless they are marked optional: true. When false (default), they are optional, unless they are marked required: true. This applies to the full project. A schema that declares its own required_by_default overrides it.
loggingLogging for each command that runs in the project. level is the console level (DEBUG, INFO, WARNING, ERROR, CRITICAL, default INFO). module_levels maps Python logger names to levels. It is the only way to re-open a logger that the framework clamps (httpx, openai, ...), or to make another logger quiet. file.max_bytes and file.backup_count set the size and the rotation of the run log. The CLI loads this block when it boots, before any command runs. If an AGENT_ACTIONS_* variable is set, it overrides the matching key. --debug / --verbose / --quiet override both. A key under logging: that nothing reads (file.path, file.enabled, file.level, file.format and any other) configures nothing. The CLI reports such a key on stderr at boot. The run log always writes to agent_io/logs/events.json of the workflow. See Logging.

Workflow Configuration​

Each workflow YAML file defines defaults and actions. This example shows how a workflow contains model settings, execution modes and action definitions:

yaml
YAML
# agent_config/my_workflow.yml
name: my_workflow
description: "Extract and validate facts"
# version: "1.0.0" # Optional — for your own bookkeeping

defaults:
model_vendor: openai
model_name: gpt-6-luna
json_mode: true
granularity: record
run_mode: batch

actions:
- name: extract_facts
intent: "Extract key facts from content"
prompt: $prompts.extract_facts
schema: facts_schema
context_scope:
observe: [source.*]

The top level accepts only these keys, and refuses all other keys. Without this check, a misspelled defaults: would be dropped silently, together with each setting in the block:

KeyMeaning
nameThe workflow name (required). It must match the file name without .yml
descriptionThe workflow description (required)
versionOptional. For your own bookkeeping
defaultsThe settings that each action inherits
actionsThe actions (required)
tool_pathThe location of the tools of this workflow. It has priority over the default config and over tool_path in agent_actions.yml
batch_preparation_concurrencyOptional. The maximum number of batch actions of one step that prepare at the same time (1-50). If you omit it, only --concurrency-limit applies. See Batch preparation concurrency
outputsOptional. The database tables that the records of an action are written to when agac run or agac retry finishes with each action complete. Each entry has an action, a connection and a table, and optionally a mode (merge, append or replace), a key and a carry list. See Databases
storageMaintenance settings: prompt_trace_retention_runs and source_data_ttl_days. The unit of the first setting is calendar days, not runs, although its name says runs. 0 means never prune. If you omit a key, the framework default applies. For traces, the framework default is 10 days, and it does prune

Model settings, for example model_vendor, go under defaults:, not at the top level.

Batch preparation concurrency​

batch_preparation_concurrency sets the maximum number of batch actions of one step that prepare their requests at the same time. Each batch action holds the records of one input file while it prepares. Thus two batch actions of one step hold two files. Use this key when the records of a step are large and the memory of the machine is small:

yaml
YAML
name: my_workflow
description: "Extract and validate facts"
batch_preparation_concurrency: 1 # one batch action of a step prepares at a time
  • The value is a whole number from 1 to 50. The load refuses other values, for example 0 or "1".
  • It limits only the batch actions that prepare and send their requests. An online, tool or hitl action of the step continues to run beside them. A batch action that collects its results is not limited.
  • A batch action gives its place back when it has sent its batch. It does not keep the place while the provider runs the batch: a later run, or --wait, collects the results.
  • --concurrency-limit continues to limit all of the actions of the run. A batch action that waits for its turn does not use one of those places.
  • --concurrency-limit 1 and --execution-mode sequential also run one batch action at a time. But they also make an online action wait, or make the batch actions wait for the online action.
  • It does not change any answer.

See Memory while a batch step prepares.

See Defaults for the complete inheritance system.

Action Configuration​

Each action can override any default. If one action must use a different model or run in a different mode, specify those fields on the action:

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

# Model
model_vendor: openai
model_name: gpt-6-luna

# Prompt & Schema
prompt: $prompts.extract_facts
schema: facts_schema
json_mode: true
context_scope:
observe: [source.*]

# Execution
run_mode: batch
granularity: record

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

Core Action Fields​

FieldTypeDescription
namestringA unique action identifier
intentstringA human-readable description (required)
kindstringllm (default), tool, hitl or mcp (a tool of an MCP server, see MCP Servers)
dependencieslistThe upstream actions to wait for
promptstringAn inline prompt or a $store.template reference
schemastringThe output validation schema
context_scopeobjectControls data visibility: observe, drop, passthrough, seed, retrieve. Each action must declare one. See Context Scope
context_blockstringWhich observed fields the request sends in its context block. auto (default) leaves out a field that the prompt prints. all sends every field. none sends none. See The context block

Model Fields​

FieldTypeDescription
model_vendorstringProvider: openai, anthropic, gemini, groq, cohere, ollama_local, ollama_cloud, llamafile, agac-provider
model_namestringThe model identifier (for example, gpt-6-luna)
api_keystringThe name of the environment variable for the API key. Not necessary for agac-provider, ollama_local, llamafile or a declared endpoint. An action on one of them expands and inspects with no api_key at any level
base_urlstringThe server URL for openai, llamafile, ollama_local and ollama_cloud. For openai, it can be any server that speaks the OpenAI chat API, for example http://localhost:8080/v1. Preflight refuses it on anthropic, gemini, groq and cohere actions
temperaturefloatThe LLM temperature (0.0-2.0)
max_tokensintegerThe maximum number of response tokens
top_pfloatTop-p (nucleus) sampling (0.0-1.0)
stopstring/listThe stop sequence or sequences that end the generation
vendor_paramsobjectOther request parameters of the vendor SDK, passed through as written. See Vendor parameters
Vendor-Specific Parameter Mapping

Agent Actions automatically maps the generation parameters (temperature, max_tokens, top_p, stop) to the API keys of each vendor:

  • OpenAI / Groq: The parameters go to the API unchanged. OpenAI and Groq also support frequency_penalty and presence_penalty. OpenAI gets max_tokens as max_completion_tokens, online and in batch, because OpenAI refuses max_tokens on its reasoning models (the o-series and gpt-5). An openai action with base_url, a llamafile action and a declared endpoint still send max_tokens. An OpenAI reasoning model takes only the default temperature, so preflight refuses a temperature other than 1 on it: Action '<a>': model 'o3-mini' is a reasoning model and takes only the default temperature (1), not 0.2. gpt-5.1 and later reason only when vendor_params.reasoning_effort is set to a value other than none, so preflight refuses their temperature only then.
  • Anthropic: stop → stop_sequences (a string value is wrapped in a list)
  • Gemini: max_tokens → max_output_tokens, stop → stop_sequences
  • Cohere: top_p → p, stop → stop_sequences
  • Ollama: max_tokens → num_predict. The parameters go in the options dict. stop strings are wrapped in a list.

Vendor parameters​

vendor_params passes any other request parameter of the vendor SDK to the vendor, under the name that the SDK uses. Use it for parameters such as thinking budgets, reasoning effort, seed or top_k.

yaml
YAML
defaults:
model_vendor: anthropic
model_name: claude-haiku-5-5
max_tokens: 16000
vendor_params:
thinking: {type: disabled}

actions:
- name: write_quiz
vendor_params:
top_k: 40

The rules:

  • The keys are the SDK's own. A key is a keyword argument of the request that the SDK sends. For Gemini, a key is a field of GenerateContentConfig. For Ollama, a key is an argument of chat(). The value goes to the vendor unchanged.
  • Preflight checks each key. agac inspect and agac run refuse a key that the request does not take. The error names the action, the key and the valid keys. An unknown key never passes silently.
  • agac sets some keys itself. Preflight refuses model, messages, tools, system, stream and timeout on every vendor. It also refuses stream_options on OpenAI, request_options on Cohere and http_options on Gemini. Set the timeout with request_timeout.
  • Preflight checks Anthropic thinking. With vendor_params.thinking on (enabled or adaptive), the Anthropic API takes temperature 1 only, top_p of 0.95 or more, no top_k and no forced tool_choice. Preflight refuses an action that sets one of these otherwise, in its own settings or in vendor_params. With type: enabled, budget_tokens must be below max_tokens, which is 4096 when the action sets none; preflight refuses a larger budget unless extra_headers sends the interleaved-thinking beta.
  • A vendor parameter wins. A key that agac also sets, for example temperature or the default tool_choice, takes the value from vendor_params.
  • Blocks merge key by key. An action's vendor_params merge over the vendor_params in defaults:. Those merge over the vendor_params in the default_agent_config: of the project. A key at a lower level replaces the same key above it. The other keys above it stay.
  • Some dicts merge too. Ollama options merge into the options that agac sets, so num_ctx keeps the num_predict that comes from max_tokens. extra_headers, extra_query and extra_body merge the same way.
  • A newer parameter goes in extra_body. If the installed SDK does not know a parameter yet, put it under extra_body (Anthropic, OpenAI, Groq). The SDK sends extra_body as part of the request body.
  • The installed SDK decides the keys. The valid keys are the ones the installed SDK's request takes. Anthropic SDK 1.0 and later take no temperature, top_p or top_k. agac then sends the temperature and top_p that you set in extra_body, and the API accepts or refuses them.
  • Batch requests carry the same keys. In a batch file, extra_body joins the request body. extra_headers and extra_query do not apply. Gemini batch requests put safety_settings, system_instruction, tool_config, cached_content and labels beside generation_config, and every other key in it.
  • An agac-provider action ignores the block. It accepts any key, so a workflow that you switch to the mock provider keeps its vendor_params. Tool and hitl actions send no request, and they ignore an inherited block.
  • An edit counts as a config change. vendor_params is a generation setting, like temperature. An edit makes the next run answer the action again.

One example for each vendor:

VendorExample
anthropicvendor_params: {thinking: {type: enabled, budget_tokens: 2048}, service_tier: auto}
openaivendor_params: {reasoning_effort: low, seed: 7}
groqvendor_params: {reasoning_effort: default, reasoning_format: parsed}
geminivendor_params: {thinking_config: {thinking_budget: 0}, top_k: 40}
coherevendor_params: {k: 40, seed: 7, safety_mode: CONTEXTUAL}
ollama_local, ollama_cloudvendor_params: {think: false, keep_alive: 10m, options: {num_ctx: 8192, repeat_penalty: 1.1}}
llamafile and other OpenAI-compatible serversvendor_params: {seed: 7}
Anthropic: the schema tool, and long answers

In JSON mode, an online Anthropic request offers the schema tool but does not force it. When the tool is forced, some models (for example claude-haiku-5-5) return a nested array as one JSON string, and the repair loop cannot fix that. The model can sometimes answer in text instead of the tool, often in a ```json block. agac reads JSON from a finished text answer, as it does for the other vendors. Text that is not JSON fails the schema check, and expect: {repair: auto} regenerates it. To force the tool, set vendor_params: {tool_choice: {type: tool, name: <schema>}}. A batch request sends the same tool in the same way: offered, not forced, unless vendor_params.tool_choice forces it. A request with a max_tokens above 21,333 streams, because the SDK refuses a request that it expects to take longer than 10 minutes.

An answer that the output budget cuts off

A model that thinks first can spend all of max_tokens before it writes an answer. The error then names the stop reason, for example Empty response content from Anthropic API (stop_reason=max_tokens). The error is a ResponseTruncatedError, which retry retries. Every vendor reports it the same way. In a batch, the record fails with the same message, and retry sends it again. In JSON mode, the record fails with a parse error that names the stop reason, and expect: {repair: auto} can regenerate it. A JSON answer that the limit cuts off partway through its text is never completed by guessing the rest. For every vendor, online and in batch, the record fails with a parse error that names the stop reason, for example The answer was cut off at the output limit (stop_reason=length); raise max_tokens. A JSON answer that the provider stops partway is also a parse error that names the stop reason, online and in batch. The stop can be a content filter, a Gemini SAFETY or RECITATION block, or an Anthropic refusal. An example is The provider stopped the answer before its end (stop_reason=content_filter); the answer is not complete. In text mode, the cut-off or stopped text is stored as the model wrote it. To fix the cause, raise max_tokens, or lower the thinking budget in vendor_params.

An answer that holds no content

A response can come back with no answer in it. The record ends in the same way online and in batch:

  • A refusal (OpenAI). The error quotes the reason, for example The model refused to answer: I can't help with that.
  • A blocked prompt (Gemini). The error names the block reason: Gemini blocked the prompt (blockReason=SAFETY).
  • A stop that is not the model's own. Examples are a Gemini SAFETY stop before any text, and an Anthropic message that holds only a thinking block. The error names the stop reason.

In text mode, the record fails with that error, and retry does not send it again. In JSON mode, Agent Actions stores the record with a parse error that holds the same reason, and expect: {repair: auto} can regenerate it.

An Anthropic or Gemini answer that the model ended itself with no text in it is an empty answer. In text mode, on_empty decides its result. In JSON mode, it is a parse error.

Execution Fields​

FieldTypeDescription
run_modestringonline (default) or batch. See Run Modes
granularitystringrecord (default) or file. See Granularity
guardobjectConditional execution. See Guards
is_operationalbooleanEnables or disables the action (default: true)
on_emptystringThe result of an empty answer. warn (default) fails the record, and the run continues. error fails the action. skip passes the record through as a tombstone
retryobjectThe retry configuration for transport-layer failures
record_concurrencyintegerThe number of records of an online LLM action that are sent at the same time (1-32, default 1: one at a time). You can also set it in defaults: or in the default_agent_config: of the project. See Record concurrency
batch_max_workersintegerThe number of records that an Ollama action in run_mode: batch sends at the same time (1-32, default 1). No other action reads it. You can also set it in defaults:. See Ollama batch
request_timeoutnumberThe number of seconds that one LLM request may take, greater than 0. If a request has no answer after that time, that attempt fails as a network error. retry retries it like any other network error. When no attempts remain, the record fails and the run names the timeout. If unset (the default), each provider SDK keeps its own timeout. You can also set it in defaults: or in the default_agent_config: of the project. See Request timeout
context_windowintegerThe number of tokens of prompt that the model reads, greater than 0. A prompt that is estimated as larger fails its record, and Agent Actions does not send it. If unset (the default), Agent Actions uses the window that it knows for the model, or 128,000 tokens for a model that it does not know. You can also set it in defaults: or in the default_agent_config: of the project. See Context window

Request timeout​

request_timeout limits each online request to the model. Thus a request that stops answering fails, and does not hold the run indefinitely. Agent Actions passes the value to each provider SDK as the per-request timeout of that SDK:

  • timeout for each call, for OpenAI, llamafile, declared endpoints, Groq and Anthropic
  • the timeout of the client, for Cohere and Ollama
  • http_options.timeout (in milliseconds), for Gemini

The value does not change any answer. Thus a change to the value is not a config edit, and the action keeps the answers that it holds.

yaml
YAML
defaults:
request_timeout: 120 # every action
retry: { max_attempts: 3 }

actions:
- name: long_summary
request_timeout: 600 # this action may take longer
  • The OpenAI, Groq and Anthropic SDKs retry a timed-out request two times on their own before they report it. Thus, with those vendors, one attempt can last up to three times request_timeout, plus their short backoff.
  • On a declared endpoint, the request_timeout of an action has priority over the timeout_seconds of the endpoint. If the action value is unset, timeout_seconds applies.
  • The value applies to online requests only. In run_mode: batch, the provider runs the batch on its side, and request_timeout does not apply. The in-process batch for ollama_local and ollama_cloud is the exception: each of its requests waits request_timeout, or 600 seconds if the value is unset. See Ollama batch.

Context window​

Before Agent Actions sends a prompt, it estimates the size of the prompt as the number of characters divided by 4. If the estimate is larger than the context window of the model, the record fails, and Agent Actions does not send the prompt. Agent Actions knows the window of many models. For example, the current Claude models (Claude Fable 5.2, Opus 5.5, Sonnet 5.5 and Haiku 5.5) read 1,000,000 tokens, and Claude Haiku 4.5 reads 200,000. For a model that it does not know, Agent Actions uses 128,000 tokens.

context_window sets the window, in tokens. It has priority over the window that Agent Actions knows for the model:

yaml
YAML
defaults:
context_window: 200000 # every action
actions:
- name: assess_scope
context_window: 400000 # this action
  • The value is a whole number greater than 0.
  • It applies online and in run_mode: batch, and to the judge calls of the action.
  • It changes only this check. Agent Actions does not send the value to the provider. A prompt that is larger than the real window of the model fails at the provider.
  • It does not change any answer. Thus a change to it keeps the answers that an action holds.
  • To send a record that is too large for the window, split its longest field into parts with chunk_config.field.

Record concurrency​

record_concurrency lets an online LLM action send up to that number of records at the same time. The action does not wait for each answer before it sends the next record. Each record gets a checkpoint as soon as its answer arrives. The output of the action keeps the input order.

In a sequential run, Ctrl-C stops all new requests. The run waits for the records that it already sent, keeps their answers and then stops. Thus a resumed run sends only the records that have no answer. In a parallel run (--execution-mode parallel, or chosen automatically), Ctrl-C does not reach an action that is running, with or without this key. The action continues to send its records, up to record_concurrency at a time, until it ends.

yaml
YAML
defaults:
record_concurrency: 4 # every online LLM action
  • The maximum number of requests in flight is --concurrency-limit (actions at the same time) times record_concurrency, times votes for an llm_judge that sets it. Choose the value to suit the rate limit of your provider. If one record gets a 429, only that record retries, and the other records continue to send.
  • The load refuses it on a tool or hitl action, and on an action that runs in run_mode: batch. If one of those actions inherits it from defaults:, the action ignores it.
  • An Ollama action in run_mode: batch sends its records from the Agent Actions process, and does not read record_concurrency either. Its setting is batch_max_workers. See Ollama batch.
  • It does not change any answer. Thus a change to it keeps the answers that an action holds.
  • Above 1, a judge_budget can be spent two times on one value, when two records judge that value at the same moment.
Granularity Constraints
  • File granularity is supported for tool and HITL actions (kind: tool, kind: hitl)
  • Guards are supported with File granularity. The guard is evaluated for each record before the action receives the file. The guard uses the record as stored, not the view that context_scope shapes. Thus a field that the action drops can still answer a clause. See Guards.

Input Source​

A workflow can replace the default staging/ input with a local folder and an optional file-type filter. data_source goes under defaults:, where the first actions of the workflow read it. The loader refuses it on an action:

yaml
YAML
defaults:
data_source:
type: local
folder: ./data
file_type: [json]

Validation Fields​

FieldTypeDescription
json_modebooleanEnables structured JSON output
expectobjectThe output expectations and their enforcement policy (see AI Expectations)

Tool Action Fields​

FieldTypeDescription
implstringThe Python function name (required for kind: tool)

Tool actions support Record and File granularity. With File granularity, the tool can process all records at the same time. This permits operations such as deduplication, aggregation and batch exports.

To call a tool of an MCP server in place of a Python function, use kind: mcp. See MCP Servers.

Vendor Support​

The vendor name for Gemini is gemini. The name google is an alias for it.

Vendormodel_vendorBatch APIExample Models
OpenAIopenai✅gpt-6.2-sol, gpt-6-luna
Anthropicanthropic✅claude-sonnet-5-5, claude-haiku-5-5
Geminigemini✅gemini-3.8-flash, gemini-3.5-flash-lite
Groqgroq✅openai/gpt-oss-120b
Coherecohere❌command-a-plus-05-2026
Ollama (local)ollama_local✅qwen3:8b
Ollama (cloud)ollama_cloud✅gpt-oss:120b-cloud
llamafilellamafile❌any GGUF model that the server loads
Mock (no network, no key)agac-provider✅any name. The answers come from the schema and the expectation rules of the action. See Testing rules with the mock provider

Named local runtimes​

model_vendor: llamafile sends the action to a llamafile server at http://localhost:8080/v1 with no API key. To use another address, set base_url on the action. A llamafile action and an openai action can run in the same workflow. Each one reaches its own server.

yaml
YAML
actions:
- name: classify_local
model_vendor: llamafile
model_name: local
- name: summarize_cloud
model_vendor: openai
model_name: gpt-6-luna

A llamafile action sends no key, even when the project defaults set api_key. To reach a server started with --api-key, use model_vendor: openai with base_url (see below).

Preflight checks what the runtime can run. Preflight refuses batch mode:

text
TXT
Action 'classify_local': vendor 'llamafile' does not support run_mode: batch.
Set run_mode: online.

A JSON action with no schema gets a warning, because llamafile does not enforce json_object output. The run continues:

text
TXT
Action 'classify_local': vendor 'llamafile' does not enforce json_object output.
Add a schema to this action.

The llamafile values were measured on llamafile 0.10.6.

OpenAI-compatible servers​

To send an openai action to a server that speaks the OpenAI chat API, set base_url on the action. Examples of such servers are llamafile, LM Studio and vLLM. Each action uses its own base_url. An action with no base_url of its own inherits the value in the workflow defaults: block, if there is one, like each other model field. An action with neither continues to use the OpenAI endpoint. Thus one run can mix a local server and OpenAI:

yaml
YAML
actions:
- name: classify_local
model_vendor: openai
model_name: local
base_url: http://localhost:8080/v1
api_key: LOCAL_KEY # the server may ignore it, but the env var must be set
- name: summarize_cloud
model_vendor: openai
model_name: gpt-6-luna
CAUTION

An openai action with base_url must use run_mode: online. Only OpenAI serves the Batch API. The local servers return HTTP 404 for /v1/batches. Preflight refuses the combination:

text
TXT
Action 'classify_local': vendor 'openai' with base_url does not support run_mode: batch.
Set run_mode: online.
CAUTION

The anthropic, gemini, groq and cohere clients always call the endpoint of their own vendor. Preflight refuses base_url on those actions:

text
TXT
Action 'summarize': vendor 'anthropic' does not send requests to base_url.
Remove base_url, or set model_vendor: openai for an OpenAI-compatible server.

Tool and hitl actions send no request. Thus a base_url that they inherit from defaults: is permitted.

note

Without a schema, the client asks for response_format: json_object. Some local servers do not enforce that format, and return prose or values of the wrong type. Schema output uses the json_schema format. llamafile 0.10.6 enforced this format in each measured run.

For an action on such a server, give the action a schema.

Environment Variables​

You give an API key as the name of a variable, not as the value. Agent Actions references environment variables by name. This keeps secrets out of your configuration files:

yaml
YAML
api_key: OPENAI_API_KEY # Uses $OPENAI_API_KEY from environment

API Keys​

VariableProvider
OPENAI_API_KEYOpenAI
ANTHROPIC_API_KEYAnthropic
GEMINI_API_KEYGoogle Gemini
COHERE_API_KEYCohere
OLLAMA_API_KEYOllama Cloud
GROQ_API_KEYGroq
OLLAMA_HOSTOllama local server (default: http://localhost:11434)

agac-provider, ollama_local and llamafile take no key. If an action on another vendor has no api_key, the error names the variable of that vendor in the table.

Runtime Variables​

VariableDefaultDescription
AGENT_ACTIONS_LOG_LEVELINFOThe console log level (DEBUG, INFO, WARNING, ERROR, CRITICAL). When set, it overrides logging.level in agent_actions.yml.
AGENT_ACTIONS_DEBUG0Set to 1 to run the console at DEBUG level
AGENT_ACTIONS_LOG_MAX_BYTES52428800The limit for the DEBUG rows written to each run log file. Past this limit, the DEBUG rows stop. 0 means no cap. Overrides logging.file.max_bytes.
AGENT_ACTIONS_LOG_RETAIN_RUNS5The number of earlier run logs that are kept. Overrides logging.file.backup_count.
AGENT_ACTIONS_BATCH_MAX_REQUESTSthe limit of the providerThe maximum number of requests in one judge batch. It replaces the limit of each provider: 100,000 for Anthropic, 50,000 for OpenAI, Groq and each provider that states no limit. Only judge batches read it. A main batch does not. A value below 1, or a value that is not an integer, stops the run. This occurs when Agent Actions assembles the workflow, before it sends a batch.
AGAC_RECORD_LIMITunsetLimits each action to this number of records for each input file. It overrides a larger record_limit, and it applies to actions that set none. If both are set, --record-limit has priority, and it can raise this value as well as lower it. It is for a cheap run of a project from outside the project, for example a smoke check or a quick sanity pass. On a workflow that you already ran, it is not read-only. A limit smaller than the number of records that a completed action already processed differs from the limit that the action stored. So the action runs again under this limit, and its output is rewritten to the smaller set. A value at or above the number that an untruncated run processed cannot cut anything, and does not change the action. That needs a run that can say what it processed. A run that lost an input file to an error keeps the coarse rule. Such a run runs again on any change. When the stored output matters, unset the variable or use a scratch project. An action that actually drops records logs a warning that names this variable, because a truncated run otherwise looks complete. An action that had nothing to drop logs no warning. A value below 1, or a value that is not an integer, fails. It is not ignored. The check occurs while the workflow is assembled. Thus it stops any command that loads the workflow, including read-only commands such as agac inspect. An empty or blank value reads as unset, because that is what a shell means by AGAC_RECORD_LIMIT=. It never excludes a record that agac retry runs again, because retry selects by id.
AGAC_FILE_LIMITunsetStops each action after this number of input files. It overrides a larger file_limit, and it applies to actions that set none. It counts the files that the action processed. Thus a file that fails does not use the budget. If both are set, --file-limit has priority, and it can raise this value as well as lower it. It is the other axis of the same job. AGAC_RECORD_LIMIT makes each file smaller, and this variable reduces the number of files that are read. A run is proportional to both. On a workflow that you already ran, it is not read-only, for the same reason. The limit that it applies differs from the limit that the completed actions stored, so they run again under it. The files that the shorter walk does not reach keep the output that the earlier run wrote there. Thus the result is the old output with the walked files replaced, not a smaller fresh copy. An action whose walk actually stops early logs a warning that names this variable. An action that reached each file logs no warning. A value below 1, or a value that is not an integer, fails. It is not ignored, and it fails before any action starts. The walk does not read a file limit until a file is processed. So the check occurs while the workflow is assembled, and it also stops read-only commands such as agac inspect. An empty or blank value reads as unset. It never restricts agac retry, which walks each file that holds a record that it named.

Directory Structure​

Agent Actions uses a structure with two levels: project-level assets that all workflows share, and workflow-level assets that are specific to each domain:

text
TXT
project/
├── agent_actions.yml # Project config
├── .agac/knowledge/ # Built knowledge indexes (generated, keep .agac/ out of git)
│
├── # ════════════════════════════════════════════════════════
├── # PROJECT-LEVEL (shared across all workflows)
├── # ════════════════════════════════════════════════════════
├── schema/ # Output schemas (folder named by schema_path)
├── tools/ # Custom tools (shared)
├── prompt_store/ # Shared prompt templates (optional)
├── knowledge/ # Source files of the knowledge bases (optional)
│
├── # ════════════════════════════════════════════════════════
├── # WORKFLOW-LEVEL (domain-specific)
├── # ════════════════════════════════════════════════════════
└── agent_workflow/
└── my_workflow/
├── agent_config/
│ └── my_workflow.yml # Agentic workflow definition
├── agent_io/
│ ├── staging/ # Input data (starting point)
│ ├── store/ # SQLite database holding every action's output
│ ├── retrieve/ # Indexes of the action records that a retrieve entry searches (generated)
│ └── logs/ # events.json, run_results.json
├── schema/ # Workflow-level schemas (optional)
├── seed_data/ # This workflow's own reference data
└── prompt_store/ # Domain-specific prompts (optional)

Asset Location Summary​

AssetProject LevelWorkflow LevelNotes
Schemasschema/workflow/schema/Either or both. A schema name must be unique across all of them
Toolstools/ and the other folders in tool_path—Found through tool_path. The tool_path of a workflow has priority
Promptsprompt_store/workflow/prompt_store/Either or both. Searched recursively
Seed Dataseed_data/ and the folders of seed_data_pathsworkflow/seed_data/Searched in that order, workflow first. A shared file exists one time. See Seed Data
Input/Output—workflow/agent_io/Always workflow-level. agent_io/retrieve/ holds the indexes of the records of an earlier action that a retrieve entry searches
Knowledge basesknowledge/<base>/ by convention, and the paths that knowledge: names—Declared in agent_actions.yml. Indexes are built in .agac/knowledge/<base>/. See Knowledge Bases and Retrieval

This structure keeps your workflows organized and permits reuse. Shared schemas make sure that data contracts are consistent. The seed folder of a workflow customizes that workflow. A shared seed folder holds what each workflow reads.

See Also​