Skip to content

Tools and Workflows

Tools and Workflows

Tools let an agent act. Workflows structure when and how those actions happen.

Tool Calling

Good tools have narrow permissions, typed inputs, predictable outputs, and clear error behavior. A tool should represent one capability, not a vague bridge into an entire system.

Examples include:

  • Search a knowledge base.
  • Create a CRM note.
  • Send a transactional notification.
  • Open a support ticket.
  • Fetch current account state.

Workflow Orchestration

Use workflows when a process has ordered steps, approvals, retries, or background work. Workflows make agent behavior easier to observe and test than a single long prompt.

External APIs

External API calls should be wrapped with validation, rate limiting, timeouts, and audit logs. Secrets should be loaded at runtime through a secret manager, not committed to source control.

Related pages: Mastra and Infisical Secrets.