> ## Documentation Index
> Fetch the complete documentation index at: https://docs.seltz.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Getting started with the Seltz Agent API

Agent runs a multi-step research loop over the web and returns a cited answer:
it plans its own searches, follows up on what it finds, and keeps going until
it has enough to answer, rather than the one grounding search
[Answer](/answer/answer-concepts) makes.

This quickstart walks through a simple workflow that starts an agent run then gets its results.

## 1. Send a query

A run is asynchronous. [`create`](/api-reference/agent/start-run) returns at
once with the run in `pending` state; the SDKs' `create_and_wait` /
`createAndWait` starts a run and blocks until it finishes, which is the
easiest way to get a result end to end. The only required field is
[`query`](/api-reference/agent/start-run#body-query). See
[Basic run](/agent/guides/basic-run) for the cURL form, which only starts the
run and needs a separate poll to read the result.

<CodeGroup>
  ```python Python theme={null}
  from seltz import Seltz

  client = Seltz(api_key="your-api-key")

  run = client.agent.create_and_wait(
      "What are the three most notable AI-company acquisitions announced in 2026?"
  )
  ```

  ```typescript TypeScript theme={null}
  import { Seltz } from "seltz";

  const client = new Seltz({ apiKey: "your-api-key" });

  const run = await client.agent.createAndWait({
    query: "What are the three most notable AI-company acquisitions announced in 2026?",
  });
  ```
</CodeGroup>

<Note>
  Runs typically finish in well under a minute for a simple question, but a
  harder one can take several minutes and up to around an hour. `create_and_wait` /
  `createAndWait` block until then; pass `timeout` / `timeoutMs` to bound the
  client-side wait.
</Note>

## 2. Read the result

`create_and_wait` / `createAndWait` only return once the run is done, so this
part is safe: a completed run's
[`output.text`](/api-reference/agent/start-run#response-output-one-of-1) is
a cited Markdown report, with inline `[n]` markers pointing at
[`output.sources`](/api-reference/agent/start-run#response-output-one-of-1).
Checking a run that is not done yet, over cURL or your own poll loop, gets
you back [`status`](/api-reference/agent/get-run#response-status):
`"running"` (or `"pending"`) instead, with `output`'s fields still unset.
See [Basic run](/agent/guides/basic-run) for what that looks like.

<CodeGroup>
  ```python Python theme={null}
  print(run.output.text)
  for source in run.output.sources:
      print(f"[{source.id}] {source.url}")
  ```

  ```typescript TypeScript theme={null}
  console.log(run.output?.text);
  for (const source of run.output?.sources ?? []) {
    console.log(`[${source.id}] ${source.url}`);
  }
  ```
</CodeGroup>

```text Example output theme={null}
Three notable AI-company acquisitions announced in 2026 include:

- **SpaceX → Anysphere (Cursor):** an all-stock deal valuing the AI coding-assistant company at approximately $60 billion. [1]
- **Zendesk → Forethought:** the AI-agent company automating customer-service interactions. [2]
- **Palo Alto Networks → Console:** an AI-agent company automating IT help-desk tasks. [3]

[1] https://www.latestly.com/technology/spacex-to-acquire-ai-coding-startup-cursor-in-usd-60-billion-deal-7475967.html
[2] https://techcrunch.com/2026/03/11/zendesk-acquires-agentic-customer-service-startup-forethought/
[3] https://techcrunch.com/2026/09/02/palo-alto-networks-paid-500m-for-thrive-backed-console-sources-say/
```

## Next steps

To learn more about Seltz Agent, check out the following topics:

* [Concepts](/agent/concepts): the run lifecycle, output shapes, and citations
* [Basic run](/agent/guides/basic-run): the full request/response cycle, including the cURL poll
* [Structured output](/agent/guides/structured-output): requesting a JSON result instead of Markdown
* [List runs](/agent/guides/list-runs): paging this org's runs, newest first
* [Poll for completion](/agent/guides/poll-for-completion): managing the wait yourself
* [Cancel a run](/agent/guides/cancel-a-run): best-effort cancellation, and why it can lose the race to completion
* [Handle errors](/agent/guides/handle-errors): rejected requests versus failed runs
* [Reference](/agent/reference): endpoints, fields, limits and errors
* [Agent API Reference](/api-reference/agent/start-run): full REST request and response specification
