Tools and Bounded Agents
AIF tools are backend capabilities executed through the governed gateway. They are not unrestricted model functions.
Tool Definitions
A tool definition declares:
- stable tool code and description
- required arguments
- required permissions
- side-effect classification
- whether human review is required
- idempotency behavior
The gateway checks permissions and policy before invoking the tool. Non-idempotent side-effecting tools require an idempotency key.
Bounded Agent Runner
BoundedAgentRunner executes an explicit list of registered tool calls through AifGateway. AgentBudget limits the number of steps and total duration. Exceeding either boundary stops the run with AgentBudgetExceededException.
The runner does not permit autonomous bypass of policy, review, tool registration, or audit logging.
Safe Integration Pattern
- Register only server-owned
ToolInterfaceimplementations. - Resolve the caller through a trusted
ExecutionContext. - Keep provider credentials and tool secrets outside model-visible arguments.
- Require review for meaningful external side effects.
- Use stable idempotency keys for retryable mutations.
- Audit every terminal outcome.