Search documentation

Browse Awaken Agents docs
Docs/Awaken Agentsv1.0.0-dev/Internal mechanisms/UnderstandKeep capability separate from permission
Note·You're reading pre-release documentation (v1.0.0-dev). Interfaces and behavior may change before a stable release.

Internal mechanisms · Understand

Keep capability separate from permission

What this page covers

Trace a Tool from model visibility to registration, permission, execution, and a committed result without treating discovery as authority.

A model may see a Tool without having permission to execute it. A process may have the implementation installed without presenting it to this Agent. Keep those facts separate when adding Tools, policy, or execution adapters.

Four decisions precede an effect

DecisionOwnerResult
Model visibilityimmutable Agent snapshota ToolDescriptor may enter the model request
Executable availabilityRuntime Tool registry or executorthe requested id has one implementation
AuthorizationToolPermissionPolicy and final gateallow, block, or require confirmation
Effect and durable resultToolExecutor plus commit boundaryexecute once, then publish the accepted result

For a typed Tool, derive model-visible identity and schema with ToolDescriptor::for_tool::<T>(). Register the same T::ID through the sole typed-to-raw adapter. Do not write a second descriptor by hand.

flowchart LR
  S[ExecutableAgentSnapshot] --> D[ToolDescriptor]
  D --> M[Model requests Tool id]
  M --> A[Availability and capability filters]
  A --> G{Final permission gate}
  G -->|Allow| E[ToolExecutor]
  G -->|Block| B[Model-visible blocked result]
  G -->|Require confirmation| W[Awaiting with ResumeTicket]
  E --> C[Step commit]

Visibility, selection, capability compatibility, placement, and health may remove a candidate. None can produce an Allow decision. Only ToolPermissionVerdict::Allow projects to an executable gate outcome.

Permission can only preserve or narrow authority

ToolCapabilityNarrowing has two values: Configured and DenyAll. Intersecting restrictions keeps Configured only when every input is Configured; DenyAll is absorbing. A Run, Plugin, or executor can therefore remove configured Tool authority but cannot add authority that the host did not grant.

sequenceDiagram
  participant Model
  participant Runtime
  participant Policy as Permission policy
  participant Tool as Tool executor
  participant Commit
  Model->>Runtime: Tool call with id and arguments
  Runtime->>Runtime: resolve one visible, installed capability
  Runtime->>Policy: evaluate exact ToolCall
  alt deny
    Policy-->>Runtime: Deny with reason
    Runtime->>Commit: commit model-visible blocked result
  else confirmation required
    Policy-->>Runtime: RequireConfirmation with correlation id
    Runtime->>Commit: commit Awaiting and ResumeTicket
  else allow
    Policy-->>Runtime: Allow
    Runtime->>Tool: execute exact call
    Tool-->>Runtime: ToolOutput or Tool error
    Runtime->>Commit: commit accepted result
  end

RequireConfirmation is a resumable Run state. A blocked call and a Tool error are returned to the model as results, so the loop may choose another action. These outcomes need no generic troubleshooting section. External action is needed only when the system returns an approval request or an explicit configuration, registration, or executor error.

Keep neighboring data out of the Tool authority

  • A descriptor contains model-visible identity and schema, not an executable handle or permission grant.
  • Durable Agent and Session data carry credential references, not plaintext. Materialization belongs to the final trust boundary.
  • Tool state changes return as Command data and cross the same Step commit; they do not create another store.
  • Skills and MCP Tools enter the same descriptor, gate, executor, and result path. They do not receive a separate authorization channel.

To implement the contract, use Implement a typed Tool. To configure approval rules, use Enable Tool permission HITL. Execution placement and credential custody remain in the Awaken Agents execution boundary.