Code tools: run sandboxed Python inside a conversation
Code tools: run sandboxed Python inside a conversation
Code tools let an AI Agent run a small piece of sandboxed Python during a conversation to reshape data, compute a value, or return only what it needs. A code tool does everything an API tool does — call an external endpoint and get data back — and can also run logic on the result before the Agent uses it.
Code tools are authored via Ada’s MCP Server or the Platform API. Over Ada’s MCP Server, you describe the tool to an AI assistant and authoring goes through a change set (describe, generate, stage, test, then promote), so a tool never affects live conversations until it is approved. A push through the Platform API writes the tool directly, with no change-set step. Add a tool to a Playbook step for the Agent to run mid-conversation (recommended), or invoke it directly like an API tool.
Alongside this release, Actions are now called API tools — the tool type that connects an AI Agent to an external endpoint. This is a naming change only; setup, configuration, and behavior are unchanged.
To learn more, see Code tools and API tools.
Reasoning-mapped Ask steps can set several variables at once
Reasoning-mapped Ask steps can set several variables at once
A Playbooks ASK step that maps the answer using reasoning can now set up to 5 variables from a single end user response. The AI Agent asks for the values together and extracts all of them in one pass. If the response provides only some of the values, the Agent saves those and re-asks for the ones still missing. The end user can correct any captured value before the step completes.
Each variable is configured as an input, and keeps its own accepted values and fallback value.
Tools API is available
The Tools API is a single inventory of the HTTP tools (api) and code tools (code) configured on an AI Agent. List, fetch, create, update, and delete tools through one Platform API.
API endpoints
The following REST endpoints are available:
- List tools (
GET /v2/tools/): Returns the Agent’s tools in cursor-paginated pages, in source orderapi, thencode. Filter withtypeandenabled. Replaymeta.next_page_urlunchanged to fetch the next page. - Get a tool (
GET /v2/tools/{tool_id}): Returns a single tool by itsid, including the type-specific body (apiorcode).Authorizationheaders are never returned. - Create a tool (
POST /v2/tools/): Creates anapiorcodetool. - Update a tool (
PATCH /v2/tools/{tool_id}): Partially updates a tool.apiandcodetools accept contract, control, and implementation writes. - Delete a tool (
DELETE /v2/tools/{tool_id}): Soft-deletes anapiorcodetool.
List items use the same Tool envelope as GET-by-id without the type body. HTTP details and source code belong on a single-tool fetch.
code.environment supports source=sensitive_value. That value is write-only. GET returns it empty.
Get started
- Tools API reference for authentication, pagination, filters, and the PATCH write matrix.