Skip to navigation

Extend with code

Write Python functions to extend your agent beyond what the visual interface covers — call APIs, query databases, validate input, and encode custom business logic. The agent invokes your function like any other tool.

Python required. Non-technical operators: see Configure agents in the UI for the no-code path.

Before writing custom API code, check if a pre-built integration already exists for your platform (e.g., Salesforce, Zendesk, OpenTable, Stripe). Pre-built integrations handle authentication, environment configuration, and common operations for you.

What you can build

Get started

1

Write your first function

Follow the create a function guide to set up a Python function with parameters, code, and a description the LLM can use to trigger it.

2

Understand the tools system

Read the tools overview to learn how functions integrate with the LLM, how to use conv objects, and best practices for naming and triggering.

3

Explore advanced patterns

Read flows, call handoffs, and secrets management to build production integrations.

Tools and functions

Write Python scripts that run when your agent needs to take action. Functions are the bridge between conversation and your business systems.

Reference

Access conversation data and built-in utilities in your functions.

Advanced capabilities