> For the complete documentation index, see [llms.txt](https://agpt.co/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agpt.co/docs/integrations/block-integrations/answers.md).

# Exa Answers

Blocks for getting AI-generated answers to questions using Exa's search-informed answer API.

## Exa Answer

### What it is

Get an LLM answer to a question informed by Exa search results, with citations; optionally as structured JSON

### How it works

This block sends your question to Exa's `/answer` endpoint in one non-streaming request: Exa searches the web and an LLM writes an answer from the results, returned with the citations it used (with their full text when Text is on). Model picks the Exa model that writes the answer: 'exa' (default, Exa's own default so it is not sent), 'exa-pro', 'exa-fast' or 'exa-research'; Exa does not document how they differ. System Prompt adds instructions such as tone, length or source preferences.

Set Output Schema to a JSON Schema to get a structured answer: the object arrives in Answer Structured and as JSON text in Answer. User Location must be a two-letter country code and User Identifier 1-64 letters, digits, '\_' or '-', or the block fails before calling Exa. The run is billed from the dollar cost Exa reports, at 150 credits per US dollar.

### Inputs

| Input            | Description                                                                                                                                                                                                             | Type                                               | Required |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | -------- |
| query            | The question or query to answer                                                                                                                                                                                         | str                                                | Yes      |
| text             | Include full text content in the search results used for the answer                                                                                                                                                     | bool                                               | No       |
| model            | The Exa model that writes the answer: 'exa' (default), 'exa-pro', 'exa-fast' or 'exa-research'. Exa does not document how they differ; all are billed at the /answer rate.                                              | "exa" \| "exa-pro" \| "exa-fast" \| "exa-research" | No       |
| output\_schema   | A JSON Schema (draft 7) for a structured answer, e.g. {"type": "object", "properties": {"valuation": {"type": "string"}}}. When set, the answer arrives as an object in Answer Structured (and as JSON text in Answer). | Dict\[str, Any]                                    | No       |
| system\_prompt   | Extra instructions for the answer, e.g. source preferences, tone or length                                                                                                                                              | str                                                | No       |
| user\_location   | The end user's two-letter ISO country code (e.g. 'US') to localize the search                                                                                                                                           | str                                                | No       |
| user\_identifier | Opaque ID of the end user this request is for (1-64 letters, digits, '\_' or '-', e.g. a UUID or hash). Never an email or name.                                                                                         | str                                                | No       |

### Outputs

| Output             | Description                                                                             | Type                  |
| ------------------ | --------------------------------------------------------------------------------------- | --------------------- |
| error              | Error message if the request failed                                                     | str                   |
| answer             | The generated answer. With an Output Schema, the structured answer as JSON text.        | str                   |
| answer\_structured | The answer as an object, when Exa returns one (normally only when Output Schema is set) | Dict\[str, Any]       |
| citations          | Search results used to generate the answer                                              | List\[AnswerCitation] |
| citation           | Individual citation from the answer                                                     | AnswerCitation        |
| request\_id        | Exa's ID for this request                                                               | str                   |
| cost\_dollars      | Cost breakdown for the request                                                          | Cost                  |

### Possible use case

**Research Assistance**: Get quick, sourced answers to complex questions without manually searching multiple websites.

**Fact Verification**: Verify claims or statements by getting answers backed by real web sources with citations.

**Structured Data Extraction**: Ask for a company's latest funding round with an Output Schema and pass the resulting fields straight to the next block.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://agpt.co/docs/integrations/block-integrations/answers.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
