---
title: "FAQ"
description: "Short answers about history, custom prompts, retries, background runs, plan gating and the other ScholarXIV agent surfaces."
canonical_url: "https://scholarxiv.com/developers/docs/agent-api/faq"
markdown_url: "https://scholarxiv.com/developers/docs/agent-api/faq.md"
---

> For the complete documentation index, see [llms.txt](/llms.txt).

# FAQ
URL: /developers/docs/agent-api/faq
LLM index: /llms.txt
Description: Short answers about history, custom prompts, retries, background runs, plan gating and the other ScholarXIV agent surfaces.
Related: agent-api, agent-api/runs, agent-api/tools, mcp/tools, router-api/completions

# FAQ

## Can I send my own system prompt or history?

No. Caller-supplied history, system prompts, user IDs, plan IDs, and tool definitions are rejected. The agent runs its own prompt, and stored history reloads from `chat_id`. Account custom instructions apply as they do on the website; turn them off for a turn with `tools.custom_instructions: false`.

## Does it store conversations?

Yes. Every turn is persisted under `chat_id`, and the same conversation opens in the website's chat workspace. Read and manage it through [Conversations](/developers/docs/agent-api/conversations).

## My connection dropped. Should I resend?

Not blindly. The research keeps running and the finished turn is saved. If you sent an `Idempotency-Key`, resend with the same key and you get the same run's answer. Otherwise resume the run's stream from the last event id, read `GET /api/v1/runs/{run_id}`, or check `active_run` on the conversation. See [Runs](/developers/docs/agent-api/runs).

## How do I run something that takes several minutes?

Send `background: true`. You get `202` with a `run_id` right away; poll `GET /api/v1/runs/{run_id}` or stream it from `/stream`. MCP clients pass `background: true` to `research_chat` and read the answer with `get_agent_run`.

## Why did I get 409 run_in_progress?

A conversation runs one turn at a time, and another turn on that `chat_id` is still running. The error includes its `run_id`: wait for it, stream it, or cancel it with `POST /api/v1/runs/{run_id}/cancel`.

## Can I get JSON instead of prose?

Yes, alongside it. Send `response_format` with a JSON Schema and the answer also comes back as a matching `output` object. See [Structured output](/developers/docs/agent-api/tools#structured-output).

## How do I see what my integration costs?

Each finished turn reports `metrics` (tokens, tool calls, duration, estimated cost), and `GET /api/v1/usage` totals them by day, model, surface, source or key. The dashboard's [Usage page](/developers/dashboard/usage) shows the same. See [Usage and metrics](/developers/docs/agent-api/usage).

## How is this different from the Router API?

The Router API chooses or runs a model. The Agent API runs the research workflow around it: tools, continuation, compaction, storage, and durable runs. Use the [Router Chat Completions API](/developers/docs/router-api/completions) when you want a raw completion.

## How does this compare to MCP?

MCP exposes the same engine and runs as tools for editors and agent clients, including `research_chat`, `get_agent_run`, and `cancel_agent_run`. It returns a completed answer (or a background run) rather than token streaming. Over HTTP, use `stream: true` — see [Streaming](/developers/docs/agent-api/streaming).

## Does the plan gate the tools?

Yes. Tools, models, and deep research resolve live against the key owner's plan on every call; per-request controls can only narrow them. See [Tools and controls](/developers/docs/agent-api/tools).

## Is there a health equivalent?

Yes — `POST /api/v1/health/chat` runs the same harness, with the same runs, background mode, idempotency and usage, using the health profile and medical tools. See the [Health Chat API](/developers/docs/health-api).

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
Docs-scoped sitemap: [/docs/sitemap.md](/docs/sitemap.md).
Well-known sitemap: [/.well-known/sitemap.md](/.well-known/sitemap.md).
