Overview
Tool type:json_mode
You define the shape of the JSON with the tool’s parameters (its input schema). The agent fills those fields based on the conversation, and that filled-in object is exactly what your application receives.
Because the tool is configured on the agent, only agents you attach it to can produce this payload. It cannot be declared or triggered from a browser through the SDK’s client functions — the behavior is tied to the agent, not to the caller’s request.
How it works
- You create a JSON Mode tool, define its fields, and attach it to an agent.
- During a conversation, the agent decides the tool is relevant and calls it, filling the fields.
- AGO ends the turn and exposes the payload to the caller.
- Your application reads the payload and does the processing.
Configuration
- Navigate to AI Studio → Tools
- Click Create Tool
- Select
json_modeas the tool type - Set a clear name and description (the agent reads the description to decide when to call it)
- Define the parameters — each field the agent should fill, with a type and a description
- Attach the tool to one or more agents
Parameters
Parameters follow the same input-schema format as other tools. Each field has atype (str, int, float, bool, or a list), a description, and can be marked required. The object the agent fills is what your backend receives.
Reading the payload
The payload is delivered on the message’s tool call data, so you can read it two ways:- Streaming: while reading the response stream, catch the tool call entry of type
json_mode— it carries thedataobject (and the same values underarguments). - Request/poll: fetch the conversation and read the message’s
tool_call_data; thejson_modeentry holds the payload underdata.
When to use something else
- If the agent needs the result of an action to continue its answer, use a client function in pause mode instead — that round-trips a result back into the conversation.
- If AGO should perform the call itself (and the agent should use the response), use the HTTP Request Tool.
Related Documentation
HTTP Request Tool
Let the agent call an external API and use the response
SDK API Reference
Send messages and read conversations over the API
