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
Runtime
›Observability

Control tool access with capabilities

Use capability tags to control which tools an agent is allowed to invoke.

Capabilities decide which tools an agent is permitted to call. Each tool declares the capability tags it requires, and the agent declares the tags it holds. A tool is callable only when the agent holds every tag the tool requires. This guide shows how to set that up. For the underlying idea, see Tools and capabilities.

Capabilities only gate tool invocation. They do not change what the runtime libraries expose to guest code. That environment is shared across components and is described at Runtime libraries.

Tag your tools

Add a capabilities list to each tool that should be gated. The convention is namespace::operation, but the tags are arbitrary strings you choose:

agent.acl
tool "adder" {
  kind         = "javascript"
  source       = "./tools/math"
  capabilities = ["math::add"]
}

tool "get_weather" {
  kind         = "python"
  source       = "./tools/weather"
  capabilities = ["weather::get"]
}

A tool with no capabilities is always available. Grant tags only to the tools you want to gate, and leave freely available tools untagged.

Grant capabilities to the agent

The agent's capabilities list declares what it holds. Matching is prefix-based over the :: namespace, so granting math satisfies any tool requiring math::add or math::subtract, while granting math::add satisfies only that one:

agent "assistant" {
  graph {
    type = "react"
  }

  capabilities = ["math", "weather::get"]

  model {
    provider = "anthropic"
    name     = "claude-haiku-4-5"
  }
}

Here the agent can call any math tool and the specific weather::get tool, but not a tool requiring, say, filesystem::write.

Decide whether clients may change the set

By default the agent's capability set is fixed to the manifest. The capability_policy field controls whether a client may change it for a single session:

agent "assistant" {
  graph {
    type = "react"
  }

  capabilities      = ["math", "weather::get"]
  capability_policy = "extensible"

  model {
    provider = "anthropic"
    name     = "claude-haiku-4-5"
  }
}

locked, the default, ignores any capability override a client sends. extensible lets a client add to the set, or replace it, for that session. Use extensible when different callers should reach different tools; keep locked when the manifest is the sole authority. Untagged tools stay available under either policy.

Remember the skills capability

Skills are exposed to the agent through built-in skill tools, which are gated like any other tool. For an agent to use skills at all, grant it the skills capability:

capabilities = ["skills", "math"]

Gate an A2A target

An A2A tool block creates four operation tools for one downstream agent. The capabilities list on the block gates all four operations together:

tool "planner" {
  kind         = "a2a"
  url          = runtime("PLANNER_A2A_URL")
  capabilities = ["a2a::planner"]
}

Grant the agent that capability when it is allowed to delegate work to the planner:

capabilities = ["a2a::planner"]

Where to go next

  • Tools and capabilities: the model behind capability matching.
  • Connect agents via A2A: configure downstream agent delegation.
  • agent reference: the capabilities and capability_policy fields.
  • tool reference: the capabilities field on each tool kind.
← PreviousUse the bash toolNext →Write templated prompts

© 2026 pogue.dev. All rights reserved.

Creative CommonsCC BY 4.0
On this pageTag your toolsGrant capabilities to the agentDecide whether clients may change the setRemember the skills capabilityGate an A2A targetWhere to go next

Search docs

Search the agentc documentation