agentc
GitHubagentc-sh/agentc
agentc
GitHubagentc-sh/agentc
›Introduction
Get started›Concepts in 5 minutes›Build your first agent›Add your first tool›Serve and connect
Concepts›Architecture overview›The manifest›The compilation pipeline›Archetypes›The graph›Tools and capabilities›Runtime libraries›Skills›Agents and prompts›Serving and protocols›Observability
Guides›Author a manifest›Write a tool›Give your agent a filesystem›Control network egress›Connect external tools via MCP›Connect agents via A2A›Use the bash tool›Control tool access with capabilities›Write templated prompts›Manage prompts with Langfuse›Pass context from the client›Configure a model provider›Connect a CopilotKit frontend›Deploy a standalone binary›Deploy with Docker and PostgreSQL›Instrument with OpenTelemetry›Extend code generation with blocks
Reference
Manifest
›build›locals›runtime›filesystem›network
providers
›Anthropic›OpenAI›Ollama›OpenRouter›xAI›Gemini›Hugging Face
›agent›graph›tool›skill›http_server
Runtime
›Observability

OpenAI

Configuration for the OpenAI model provider.

The openai sub-block configures the OpenAI cloud provider. It also works with any OpenAI-compatible endpoint, such as Azure OpenAI or a local proxy, by setting config.base_url.

Fields

FieldTypeRequiredruntime()Description
modelslistnonoAllowlist of models for this provider. Each entry is a plain string or a config object with name and params. When omitted, no allowlist is enforced.
configblocknoConnection configuration.
config.api_keystringnoyesOpenAI API key. Wrap in secret(runtime(...)) to keep it out of build artifacts.
config.base_urlstringnoyesAPI base URL. Override to point at a compatible endpoint such as Azure OpenAI or a local proxy.
paramsblocknoProvider-level inference parameter defaults. Applied to every request unless overridden at the model level.

The config block is optional. When omitted, the OpenAI SDK reads credentials from the OPENAI_API_KEY environment variable using its standard resolution logic.

params

The params block sets inference parameter defaults for all models under this provider. All fields are optional and support runtime().

FieldTyperuntime()Description
max_tokensintegeryesMaximum number of tokens to generate.
temperaturefloatyesSampling temperature.
top_pfloatyesNucleus sampling probability.
top_kintegeryesTop-K sampling limit.
stop_sequenceslist of stringsyesSequences that stop generation.
frequency_penaltyfloatyesPenalty for token frequency.
presence_penaltyfloatyesPenalty for token presence.
seedintegeryesSeed for deterministic sampling.
provider_paramsobjectyesProvider-specific parameters passed directly to the API. Use this for options not covered by the typed fields above.

Example

agent.acl
providers {
  openai {
    models = [
      "gpt-4o-mini",
      {
        name = "gpt-4o"
        params {
          max_tokens  = 8192
          temperature = 0.3
        }
      }
    ]

    config {
      api_key  = secret(runtime("OPENAI_API_KEY"))
      base_url = runtime("OPENAI_BASE_URL", "https://api.openai.com/v1")
    }

    params {
      max_tokens        = 2048
      temperature       = 0.5
      frequency_penalty = 0.1
    }
  }
}

In this example, requests to gpt-4o-mini use the provider-level defaults. Requests to gpt-4o use its own model-level params for max_tokens and temperature, while still inheriting frequency_penalty from the provider-level defaults.

tip

Always wrap API keys in secret(runtime(...)). This prevents the key from appearing in build artifacts and the output of agentc inspect.

← PreviousAnthropicNext →Ollama

© 2026 pogue.dev. All rights reserved.

Creative CommonsCC BY 4.0
On this pageFieldsparamsExample

Search docs

Search the agentc documentation