Capabilities
Capabilities are the reusable building blocks that a Toolang agent can load and overlay at runtime.
Four capability kinds
Toolang manages four kinds:
skillservicepromptpsyche
Each kind uses the same ref model and the same scope model. The difference is the role it plays for the agent.
Three ways to include a capability
Toolang supports three authored forms:
- ref
declared with
use ...in.toooragents.too - inline
declared directly inside one
.toofile - local an editable file or directory stored in a local cap root
The practical rule is:
- use ref when the capability should stay reusable
- use inline when it only belongs to one agent
- use local when you want an editable on-disk copy
Scope and precedence
The same capability name can exist at three scopes:
agentonly this agent sees itsharedagents in the same home can share itglobalevery eligible agent on the machine can see it
Runtime precedence is:
agentsharedglobal
That means a narrower scope can override a wider one without deleting it.
Refs use one neutral shape
Capability refs are kind-neutral:
user-or-org/cap-nameThe same ref syntax is used in:
.toousedeclarations- shared
agents.toosource - CLI commands such as
toolang skill add ...
sync keeps scopes separate
toolang sync does not flatten scope overrides into one merged directory. It
materializes global, shared, and agent-scoped sync outputs separately.
That preserves two important properties:
- runtime precedence stays explicit
- exact resolved refs can be inspected later
Runtime visibility stays configurable
Toolang always loads agent-scoped capabilities. Wider scopes can be enabled or disabled at runtime:
--sharedor--no-shared--globalor--no-global
That matters when you want an agent to run with only its local inputs, or when you want a resident agent to inherit machine-wide capabilities.
Common capability commands
All four kinds share the same command shape:
toolang skill add <cap_ref> --scope=agent
toolang skill remove <name> --scope=shared
toolang skill local new <name> --scope=global
toolang skill local new <name> --from <cap_ref> --scope=shared
toolang skill local path <name> --scope=shared
toolang skill local delete <name> --scope=globalThe same structure applies to service, prompt, and psyche.
Read next
- Read Agent Files for where capability source and local roots live.
- Read Runtime State for what
syncwrites. - Read Capability Model if you want the exact resolution, precedence, and sync rules.