Added
defineAgent and defineTool
Declare an agent in one file under functions/_agents/ with its model, instructions, and tools, and define each tool with a Zod input schema and a handler that gets the caller's ctx. The runtime drives the model loop, runs tools, and stops when the model has an answer or hits the limits you set. Agents load automatically on deploy and under helix dev.
Read the docs →
Added
ctx.agent(name).generate() and sessions
Call any agent from any function or schedule. Omit sessionId and the call creates a session; pass one back and the agent continues from the last turn. Sessions come in two scopes: project sessions are shared by every execution, and user sessions belong to the signed-in person who started them. You control the message window and TTL per agent.
Read the docs →
Added
Tool approval pauses an agent for a human
Set needsApproval on a tool and the agent stops before running it. The call returns with the pending tool calls, you show them to a person, and a second call carries their approve or deny decision. A predicate form lets you gate only on certain inputs, so a refund over a threshold pauses but a small one does not.
Read the docs →