Skip to main content
The JSON Mode tool lets an agent return a structured JSON payload to the application driving the conversation, instead of a text reply. When the agent calls the tool, AGO hands the JSON to your application and ends the turn. Your backend processes the payload; AGO does not act on it. Use it when the outcome of a request belongs in your system rather than in the chat: create a record, start a workflow, or return a machine-readable result. Tool type: json_mode

How it works

  1. You create a JSON Mode tool, define its fields, and attach it to an agent.
  2. During a conversation, the agent decides the tool is relevant and calls it, filling the fields.
  3. AGO ends the turn and returns the payload to your application.
  4. Your application reads the payload and processes it.
The agent gets no result back and does not continue the conversation about it. Only agents you attach the tool to can produce this payload. It cannot be added from a browser through the SDK’s client functions.

Configuration

1

Create the tool

  1. Go to Agents > Tools and click Create Tool.
  2. Set Tool Type to json_mode.
  3. Enter a Name and a Description. The agent reads the description to decide when to call the tool.
2

Define the fields

In Input Schema (JSON), list each field the agent should fill, with a type (str, int, float, bool, or a list such as str[]) and a description. The object the agent fills is exactly what your application receives.
3

Attach it to an agent

Click Save, then open each agent in Agents and add the tool under Capabilities > Available Tools.
Example input schema for a callback request:

Reading the payload

The payload is attached to the agent’s message as a tool call of type json_mode. You can read it two ways with the SDK API:
  • Streaming: while reading the response stream, catch the tool call entry of type json_mode. It carries the payload in data.
  • Request/poll: fetch the conversation and read the message’s tool_call_data. The json_mode entry holds the payload in data.

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.
  • If AGO should call your API itself and use the response, use the HTTP Request Tool.