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
›agent›graph›tool›skill›http_server
Runtime
›Observability

tool

The tool block declares a tool, its source, capabilities, and configuration.

The tool block declares a tool that the agent can call during a run. A manifest can contain any number of tool blocks. The kind field determines the tool type and which additional fields apply.

agent.acl
tool "adder" {
  kind         = "javascript"
  source       = "./tools/adder"
  capabilities = ["math::add"]
  enabled      = runtime("TOOL_ADDER_ENABLED", true)
}

Common fields

These fields apply to all tool kinds.

FieldTypeRequiredruntime()Description
kindstringyesnoTool type. One of "javascript", "python", "bash", "mcp", "a2a".
descriptionstringnonoHuman-readable description of what the tool does.
capabilitieslist of stringsnonoCapability tags required to invoke this tool. See Tools and capabilities.
enabledboolnoyesWhether the tool is registered at startup. Defaults to true.
configmapnoyesNamed string values made available to the tool at runtime, each of which may be a constant or a runtime() expression.

javascript

A JavaScript tool is a TypeScript or JavaScript package bundled by esbuild at compile time and executed in the runtime's embedded engine. See runtime libraries for the environment that engine provides. The bundle is embedded in the binary; no Node.js installation is required at runtime.

tool "adder" {
  kind         = "javascript"
  source       = "./tools/adder"
  export       = "AdderTool"
  capabilities = ["math::add"]
  enabled      = runtime("TOOL_ADDER_ENABLED", true)
  config       = {
    API_ENDPOINT = runtime("ADDER_API_ENDPOINT", "http://localhost:3000")
  }
}
FieldTypeRequiredruntime()Description
sourcestringyesnoPath to the tool's package directory, relative to the manifest. Must contain a package.json.
exportstringnonoName of the JS export object for this tool. Defaults to the tool block name.

See Write a tool for how to write the tool source.

python

A Python tool is a uv-managed Python package. Dependencies are installed at compile time and the package source and site-packages are embedded in the binary. The selected interpreter determines whether the embedded package runs through RustPython or CPython.

tool "weather" {
  kind         = "python"
  source       = "./tools/weather"
  interpreter  = "embedded"
  capabilities = ["weather::get"]
}
FieldTypeRequiredruntime()Description
sourcestringyesnoPath to the tool's directory, relative to the manifest. Must contain a pyproject.toml.
interpreterstringnonoPython runtime backend. "embedded" (default) uses RustPython, supports pure-Python packages, and produces a self-contained binary. "static" uses CPython 3.14 and supports packages with C extensions, but requires a compatible shared CPython installation and libpython available at runtime.

See Write a tool for how to write the tool source.

bash

A bash tool provides the agent with a sandboxed shell interpreter. Host programs, filesystem access, environment variables, and network access are all individually controlled.

tool "shell" {
  kind     = "bash"
  commands = ["git"]

  env {
    kind = "inherit"
  }

  limits {
    max_execution_time_secs = 30
  }
}
FieldTypeRequiredDescription
commandslist of stringsnoAdditional host programs to register as passthrough commands. Each name is proxied to the real binary on the host. Common utilities such as jq, sed, awk, and curl are already built in and do not need listing.
fsblocknoFilesystem backend configuration.
envblocknoEnvironment variable forwarding policy.
limitsblocknoResource limits applied to each execution.
networkblocknoNetwork access policy for sandboxed curl invocations.

fs block

FieldTypeDefaultDescription
kindstring"in_memory"Filesystem backend. One of "in_memory", "overlay", "read_write". "overlay" and "read_write" require path.
pathstringHost path used by the "overlay" and "read_write" backends.
cwdstring"/home/agent"Working directory inside the sandbox.

env block

FieldTypeDefaultDescription
kindstring"empty"Forwarding policy. One of "empty" (no variables), "inherit" (all variables), "allow" (only those listed in vars), "deny" (all except those listed in vars).
varslist of strings[]Variable names used by the "allow" and "deny" policies.

limits block

All fields are optional and fall back to the interpreter's built-in defaults when absent.

FieldTypeDefaultDescription
max_execution_time_secsinteger30Maximum wall-clock execution time in seconds.
max_output_sizeinteger10485760Maximum combined output size in bytes (default 10 MiB).
max_command_countinteger10000Maximum number of commands that may be dispatched.
max_loop_iterationsinteger10000Maximum number of loop iterations.

network block

FieldTypeDefaultDescription
enabledboolfalseWhether sandboxed curl network access is enabled.
allowed_url_prefixeslist of strings[]URL prefixes that sandboxed curl may contact.
allowed_methodslist of strings[]HTTP methods that sandboxed curl may use.
max_redirectsinteger0Maximum redirects curl may follow.
max_response_sizeinteger10485760Maximum response body size in bytes (default 10 MiB).
network_timeout_secsinteger30Maximum duration of a curl request in seconds.

See Use the bash tool for more detail and examples.

mcp

An MCP tool connects the agent to a Model Context Protocol server. Two transports are supported: stdio spawns a local subprocess; http connects to a remote server over streamable HTTP.

# stdio transport
tool "time_server" {
  kind      = "mcp"
  transport = "stdio"
  command   = "uvx"
  args      = ["mcp-server-time"]
}

# HTTP transport
tool "remote_tools" {
  kind       = "mcp"
  transport  = "http"
  url        = runtime("MCP_URL", "https://tools.example.com")
  auth_token = secret(runtime("MCP_TOKEN"))
  headers    = {
    "X-Client-ID" = runtime("CLIENT_ID")
  }
}

stdio fields:

FieldTypeRequiredruntime()Description
transportstringyesnoMust be "stdio".
commandstringyesyesExecutable used to spawn the MCP server subprocess.
argslist of stringsnoyesArguments passed to the command. Each element may be a runtime() expression.
configmapnoyesEnvironment variables forwarded to the subprocess. Each value may be a runtime() expression.

HTTP fields:

FieldTypeRequiredruntime()Description
transportstringyesnoMust be "http".
urlstringyesyesBase URL of the MCP server.
auth_tokenstringnoyesBearer token sent in the Authorization header. Use secret(runtime(...)).
headersmapnoyesAdditional HTTP headers sent with every request. Each value may be a runtime() expression.

See Connect external tools via MCP for more on Model Context Protocol integration.

a2a

An A2A tool delegates work to another agent through the Agent2Agent protocol. Each configured target is a fixed downstream server, not a model-visible arbitrary URL. Every A2A target registers the same four operation tools:

  • a2a_{target_id}_send
  • a2a_{target_id}_stream
  • a2a_{target_id}_get_task
  • a2a_{target_id}_cancel_task
tool "planner" {
  kind        = "a2a"
  description = "Delegate planning subtasks to the planning agent."
  url         = runtime("PLANNER_A2A_URL", "https://planner.example.com")
  auth_token  = secret(runtime("PLANNER_A2A_TOKEN"))

  headers = {
    "X-Client-ID" = runtime("PLANNER_CLIENT_ID", "assistant")
  }

  tenant = {
    policy = "inherit"
  }

  timeout_secs                  = runtime("PLANNER_A2A_TIMEOUT", 90)
  default_accepted_output_modes = ["text/plain"]
  capabilities                  = ["a2a::planner"]
  enabled                       = runtime("PLANNER_A2A_ENABLED", true)
}
FieldTypeRequiredruntime()Description
urlstringyesyesBase URL of the downstream A2A server.
auth_tokenstringnoyesBearer token sent in the Authorization header. Use secret(runtime(...)).
headersmapnoyesAdditional HTTP headers sent with every request. Each value may be a runtime() expression.
tenantblocknoyes, for fixed IDsTenant policy for the downstream request. Defaults to inherit.
timeout_secsintegernoyesRequest timeout in seconds.
default_accepted_output_modeslist of stringsnonoOutput modes used when a tool call does not provide its own accepted modes.

There is no operation-selection field. Every target always gets send, stream, get-task, and cancel-task tools.

tenant block

The tenant block controls the X-Tenant-Id value sent to the downstream A2A server.

tenant = {
  policy = "inherit"
}
FieldTypeRequiredruntime()Description
policystringyesnoOne of "inherit", "fixed", or "none".
idstringrequired for fixedyesTenant ID sent when policy = "fixed".

inherit forwards the effective tenant from the parent run. fixed sends the configured id. none omits the A2A tenant header.

Stream activity

The stream operation emits stateless activity deltas while the downstream task runs. These deltas are A2A-specific and are delivered through the normal tool activity event channel.

Activity types are:

  • a2a_task
  • a2a_task_status
  • a2a_artifact
  • a2a_message

The accumulated activity state has this shape:

{
  "target_id": "planner",
  "task_id": "task-123",
  "context_id": "ctx-123",
  "state": "TASK_STATE_WORKING",
  "latest_message": "Drafting plan.",
  "artifacts": []
}

See Connect agents via A2A for a complete guide to outbound A2A delegation.

← PreviousgraphNext →skill

© 2026 pogue.dev. All rights reserved.

Creative CommonsCC BY 4.0
On this pageCommon fieldsjavascriptpythonbashfs blockenv blocklimits blocknetwork blockmcpa2atenant blockStream activity

Search docs

Search the agentc documentation