AgentsOutput

Output

Choose how your agent answers, as streamed text or as JSON in a shape you define.

Your agent can answer in two ways. Stream text for people to read, in a conversation or as a one-off, or return JSON in a shape you define for your code to use.

Which one to use

You wantUse
A chat interface that remembers the conversationclient.chat()
A summary, rewrite, or other standalone textclient.completion()
Data your code acts on, such as a category or extracted fieldsclient.object()

All three run the same agent, with its model, instructions, and tools, and all three count toward your usage and quotas. Only chat keeps history in a session.

On this page