Skip to main content

Overview

Tools are external capabilities that AI agents can invoke during flow execution—web search, database queries, API calls, code execution, and more. AXON treats tools as first-class primitives with configurable parameters and safety constraints.

Tool Definition

Syntax

Fields

provider (optional)

Type: Identifier Specifies the tool provider or service.
Common Providers:
  • brave — Brave Search API
  • google — Google Search
  • bing — Bing Search
  • postgres — PostgreSQL database
  • mysql — MySQL database
  • redis — Redis cache
  • http — Generic HTTP client
  • docker — Docker container execution
  • lambda — AWS Lambda function
  • custom — Custom implementation

max_results (optional)

Type: Integer (must be positive) Maximum number of results to return.

filter (optional)

Type: Expression Filter expression to constrain results.
Common Filters:
  • recent(days: N) — Results from last N days
  • verified — Verified/trusted sources only
  • domain: "example.com" — Specific domain
  • language: "en" — Specific language
  • Custom expressions based on provider

timeout (optional)

Type: Duration Maximum execution time before timeout.
Duration Format:
  • ms — Milliseconds: 500ms, 100ms
  • s — Seconds: 5s, 30s
  • m — Minutes: 2m, 5m
  • h — Hours: 1h, 2h
  • d — Days: 1d, 7d

runtime (optional)

Type: Identifier Specifies the runtime environment for tool execution.
Common Runtimes:
  • sandboxed — Isolated sandbox environment
  • native — Native host environment
  • container — Docker/container runtime
  • serverless — Serverless function (Lambda, etc.)
  • vm — Virtual machine

sandbox (optional)

Type: Boolean (default: false) Whether to execute the tool in a sandboxed environment.
When to Sandbox:
  • ✅ Code execution
  • ✅ Untrusted inputs
  • ✅ External code/scripts
  • ✅ User-provided queries
  • ❌ Internal trusted APIs
  • ❌ Read-only operations

Complete Examples

Web Search Tool

Use Case: Search the web for recent information with a 10-second timeout.

Database Query Tool

Use Case: Query a PostgreSQL database with result limit and timeout.

Code Execution Tool

Use Case: Execute Python code in an isolated Docker container.

API Client Tool

Use Case: Call external HTTP APIs with timeout and result limit.

Filtered Search Tool

Use Case: Search only academic domains (.edu) for research.

Using Tools in Flows

Syntax

Within Steps

Direct Usage

Multiple Tools

With Variables

Tool Arguments

Tools accept string or identifier arguments:

Best Practices

1. Set Appropriate Timeouts

2. Limit Result Sets

3. Sandbox Untrusted Code

4. Use Filters to Reduce Noise

5. Combine Tools with Validation

6. Handle Tool Failures

Common Patterns

Search and Analyze

Multi-Source Enrichment

Iterative Refinement

Safe Code Execution

Type Checking

The AXON type checker validates: Max results: Must be positive
Timeout: Must be valid duration
Tool references: Referenced tools must exist
Provider: Provider must be specified

Security Considerations

1. Always Sandbox Untrusted Code

2. Validate Tool Inputs

3. Limit Resource Usage

4. Use Appropriate Timeouts

  • Flow — Using tools in flows
  • Persona — Agent identities
  • Context — Execution environments
  • Anchor — Hard constraints