Skip to main content
Converse is the primary endpoint for talking to Datagrid: send a prompt, get an AI response. A single endpoint serves every mode and feature, so you can start simple and layer in capabilities as you need them. This page is a guided tour. For the full request and response schema, see the Converse API reference.

Your first call

The response content is an array; the text of the reply is at content[0].text.

Use an agent

To run a configured agent, pass its agent_id. The agent’s instructions, knowledge, and tools are applied automatically.
The config object lets you override an agent’s settings for a single turn without changing the stored agent. See Getting started with Agents for the full create-and-run flow.

Choose a mode

Converse can answer with a fast LLM-first response, a lighter search-backed agent, or a full multi-step agent. You select this with chat_mode (and config.agent_model): See Converse modes for the full mapping between chat_mode, config.agent_model, and which tools each mode allows.

Scope knowledge with corpus

By default the agent can use all knowledge in scope. Pass config.corpus to limit a request to specific knowledge bases or pages.
More detail in Knowledge and corpus.

Stream responses

Set stream: true to receive the response incrementally as server-sent events — useful for responsive UIs on longer answers.
See Streaming for the full event flow (start, delta, end).

Get structured output

Pass a JSON Schema in text.format to guarantee the response matches a schema. This works for every mode.
More in Structured outputs.

Add file inputs

Upload a file, then reference it in a structured prompt to ask questions about documents, PDFs, or images.
See File inputs for supported file types.

Continue a conversation

Pass a conversation_id to keep context across turns. The first call returns one (or you can create one explicitly via the Conversations API).

More capabilities

  • MCP servers — connect external tools via the Model Context Protocol (Beta).
  • Rate limits — limits, headers, and retry guidance.

Next steps