Agent Workers

Connect Agent Steps to your model providers and MCP tools, and choose the models, rates, and tools each worker offers.

Connect a Worker

Run an agent worker to connect Argyll to your model providers and MCP tools. Configure credentials on the worker using the provider setup below, then select a provider, model, and tools for each Agent Step.

AGENT_WORKERS assigns workers to providers as comma-separated provider=url pairs. Use * for the default worker:

AGENT_WORKERS="anthropic=http://argyll-agent-anthropic:8070,gemini=http://argyll-agent-gemini:8070,bedrock=http://argyll-agent-bedrock:8070,*=http://argyll-agent-openai:8070"

Assign a worker to each provider you plan to use before registering its Steps. When running several locally, set a different PORT for each process and assign their URLs in AGENT_WORKERS. The default port is 8070.

Docker Compose starts all four workers with the engine. Use the optional .env.d/agent.env for settings all workers share. Put credentials and custom PROVIDER_URLS in the worker-specific files described below. Worker-specific values take precedence. Recreate the affected worker after changing its environment.

For JSON overrides in Docker Compose, mount the file into the worker and set the environment variable to the path inside the container. Restart the worker after editing an override.

Configure Providers

Use Anthropic

Set ANTHROPIC_API_KEY in .env.d/agent-anthropic.env, then run docker compose up -d argyll-agent-anthropic. For a gateway that expects a bearer token, set ANTHROPIC_AUTH_TOKEN instead. The API key wins when both are set.

To run the worker outside Docker:

go run ./workers/agent/cmd/argyll-agent-anthropic

The worker uses the effort options reported by Anthropic. An effort setting alone does not enable Claude’s optional thinking mode.

To override the minimum cacheable prefix length for a model, set PREFIX_THRESHOLDS to a JSON file such as {"anthropic/claude-haiku-5-5": 512}. The worker uses these lengths to choose how much built-in guidance to send.

To refresh prices and cache thresholds, run from workers/agent:

GOWORK=off go run ./cmd/argyll-agent-anthropic/internal/refresh -dir /path/to/defaults

The command writes model-prices.json and prefix-thresholds.json.

Use OpenAI

Set OPENAI_API_KEY in .env.d/agent-openai.env, then run docker compose up -d argyll-agent-openai. This worker also serves providers offering an OpenAI-compatible API. Set their PROVIDER_URLS in the same environment file.

To run the worker outside Docker:

go run ./workers/agent/cmd/argyll-agent-openai

The worker includes documented effort options for supported models. It leaves out audio, image, and embedding models, along with models listed under ChatGPT models. To choose a model’s API endpoint or effort options, use MODEL_CAPABILITIES:

{
  "openai/gpt-5.6-luna": {
    "endpoint": "responses",
    "efforts": ["none", "low", "medium", "high", "xhigh", "max"]
  }
}

Each entry replaces the model’s defaults. Choose responses or chat_completions according to the API the model supports for tool use. The endpoint defaults to chat_completions. List the effort settings that endpoint accepts for the model.

Models from an OpenAI-compatible provider appear without any entry. Set hidden to true to leave a model out, or false to show a model the bundled exclusions hide.

To refresh prices and model capabilities, run from workers/agent:

GOWORK=off go run ./cmd/argyll-agent-openai/internal/refresh -dir /path/to/defaults

The command writes model-prices.json and model-capabilities.json.

Use Gemini

Set GEMINI_API_KEY in .env.d/agent-gemini.env, then run docker compose up -d argyll-agent-gemini. The worker reaches Gemini through the Interactions API and keeps each conversation on the worker, so Google stores no interaction history.

To run the worker outside Docker:

go run ./workers/agent/cmd/argyll-agent-gemini

The worker lists every Gemini model that generates content and leaves out deprecated models and models that produce audio, images, video, or music. New text models are available without a refresh. Effort settings select the model’s thinking level, using the levels documented for each model. Longer prompts reuse cached instructions automatically, and the cached tokens are billed at the model’s caching rate.

To refresh prices and model capabilities, run from workers/agent:

GOWORK=off go run ./cmd/argyll-agent-gemini/internal/refresh -dir /path/to/defaults

The command writes model-prices.json and model-capabilities.json. Gemini prices change on published dates, and the command records the rates in effect on the day it runs.

Use Amazon Bedrock

Set AWS_REGION and AWS credentials in .env.d/agent-bedrock.env, then run docker compose up -d argyll-agent-bedrock. The worker also accepts credentials from standard AWS sources, including shared profiles, attached roles, and a Bedrock API key in AWS_BEARER_TOKEN_BEDROCK. Bedrock appears in the provider list once a region is set.

To run the worker outside Docker:

go run ./workers/agent/cmd/argyll-agent-bedrock

The AWS role needs bedrock:InvokeModel to run tasks, plus bedrock:ListFoundationModels and bedrock:ListInferenceProfiles to discover models and active inference profiles. Inference profile IDs keep working when a later discovery fails.

To use a host AWS profile in Docker, set AWS_PROFILE in .env.d/agent-bedrock.env and mount the credentials file read-only in a local docker-compose.override.yml:

services:
  argyll-agent-bedrock:
    volumes:
      - "${HOME}/.aws/credentials:/root/.aws/credentials:ro"

For an aws login profile, mount the shared config read-only and the login cache writable instead of the credentials file. The SDK uses the cache to refresh the session:

services:
  argyll-agent-bedrock:
    volumes:
      - "${HOME}/.aws/config:/root/.aws/config:ro"
      - "${HOME}/.aws/login/cache:/root/.aws/login/cache"

Recreate the worker after configuring its region and credentials. If it has no models, inspect the discovery error in the Step editor or docker compose logs argyll-agent-bedrock. An AWS UnrecognizedClientException means the credentials were rejected. Refresh the profile and recreate the worker. An AccessDeniedException points to missing permissions to list models or inference profiles.

The worker lists every text model in the region and leaves out models that generate audio, images, video, speech, or embeddings. New text models are available without a refresh. It includes documented effort options for supported models. An effort setting alone does not enable Claude’s optional thinking mode.

To refresh prices and model capabilities for your region, run from workers/agent:

GOWORK=off go run ./cmd/argyll-agent-bedrock/internal/refresh -dir /path/to/defaults -region eu-north-1

The command writes model-prices.json and model-capabilities.json. Bundled rates and the refresh command’s default region are us-east-1. Supply the generated files through MODEL_PRICES and MODEL_CAPABILITIES. Set explicit rates for application inference profiles when their IDs differ from the bundled model IDs.

Choose Model Capabilities

To override a model’s effort options, set MODEL_CAPABILITIES to a JSON file keyed by provider/model, with an efforts list for each model. Each entry replaces that model’s defaults. List only effort settings the model accepts.

The Gemini, Bedrock, and OpenAI workers list every text model their provider offers, so new models appear without any setup. Models that generate audio, images, video, speech, or embeddings are left out. Models that accept image input are included. Set hidden to true in a model’s MODEL_CAPABILITIES entry to leave it out of the picker and reject it during task execution.

Add MCP Servers

To make another server available, set MCP_SERVERS on the worker to a JSON file of server names, URLs, and headers. Replace the example URL with your server’s address. Use ${VAR} to read a header value from the environment:

{
  "tools": {
    "url": "https://tools.example.com/mcp",
    "headers": {"Authorization": "Bearer ${MCP_TOKEN}"}
  }
}

Select that server in the Agent Step’s mcp configuration.

Set Model Rates

When a provider supplies the charge, Argyll uses that amount. Otherwise, the workers estimate charges using their providers’ published standard rates. To use your account’s rates or cover another model, point MODEL_PRICES to a JSON file with rates per million tokens:

{
  "anthropic/claude-haiku-5-5": {
    "input": 0.1,
    "output": 0.5,
    "cache_input": 0.01,
    "cache_output": 0.125,
    "tiers": [
      {
        "input_over": 100000,
        "input": 0.5,
        "output": 2.5,
        "cache_input": 0.05,
        "cache_output": 0.625
      }
    ]
  }
}

Each entry replaces that model’s base rates and tiers. Set input_over to the cutoff for a long-context tier. The worker uses the highest cutoff that a turn’s total input exceeds, including cached input. The selected rates apply to the whole turn. Supply all known rates for each tier and use zero for free tokens. Use one currency for the rates and charges you combine in a spend total.

Refresh Model Data

Each worker ships with model rates and capabilities gathered from its provider’s published information. Run its refresh command from an Argyll checkout to fetch newer copies. The provider setup sections give the commands and the files each writes.

Use -dir /path/to/defaults to write copies outside the checkout. Point MODEL_PRICES to the resulting model-prices.json, and set the provider’s capability or cache settings when the command writes those files too.

Only these standalone refresh commands fetch public documentation. Workers use provider APIs and local files at runtime.

Build Another Worker

Use the Agent Worker Contract to build a worker for another provider or agent runtime. Run this check from an Argyll checkout with the worker running, replacing the provider and model with yours:

go run ./engine/cmd/argyll-agent-check \
  -worker http://localhost:8070 -provider anthropic -model claude-sonnet-5-5

When the worker runs in another network, -listen sets where the check receives the outcome and -callback sets the URL the worker reaches it at.

This check calls the live provider, so it can incur charges.