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

> ## Agent Instructions
> Autumn AI (autumn.ai) is a people and company intelligence API, a separate company from useautumn.com (billing software); no billing-product routes exist here.
> Base URL https://api.autumn.ai. Auth on every request: `X-API-Key: <key>` or `Authorization: Bearer <key>`. Plain HTTP + JSON. Schemas: https://www.autumn.ai/docs/openapi.json. Every docs page is Markdown at its URL plus `.md`.

# Let an agent drive Autumn

> Give a coding agent the whole task surface: generate a spec, start it, and manage the loop.

Autumn's caller does not have to be your code. An agent with the [Skill](/docs/skill) installed
can run the entire loop itself: turn a user's request into a task spec, start it, wait, and
report the rows. This recipe is the shape of that handoff.

## 1. Install the skill

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
npx skills add https://www.autumn.ai
```

The skill teaches the agent the defaults that matter: `clarify: false`, keep the
`task_id`, continue instead of restarting, and read rows before reporting results. Other
install paths are on the [Skill](/docs/skill) page.

## 2. Let the agent write the spec, not just the prompt

An agent relaying a user's words loses their specifics. Instead, have it fetch
`GET /task/metaprompt`, which returns the task spec schema plus a metaprompt for
caller-side planning, and generate a clean `task.json`-style spec:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -sS "https://api.autumn.ai/task/metaprompt" \
  -H "X-API-Key: $AUTUMN_API_KEY"
```

The agent fills in `brief`, the output `schema`, and `target_count` from the user's
request, then starts with `POST /task/start`. A spec survives the relay; a paraphrase
does not. [Writing task prompts](/docs/best-practices/prompting) is the rubric to hold it to.

**Decision:** for a one-off question the user typed, plain `POST /task` with their words
passed through verbatim is fine. Reach for the metaprompt when the agent is constructing
the task on the user's behalf.

## 3. Wait without hallucinating

The two rules that keep an agent honest while a task runs:

* A start response only means the task was accepted. Poll `GET /task/{task_id}` with the
  full terminal check from [Task lifecycle](/docs/concepts/lifecycle) before claiming anything.
* Report from the rows, never from status text. `GET /task/{task_id}/output` is the only
  source of results.

## 4. Route refinements back to the same task

When the user says "add a column" or "find more", the agent should continue the existing
task, restating the goal as one clear instruction:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -sS -X POST "https://api.autumn.ai/task/$TASK_ID/continue" \
  -H "X-API-Key: $AUTUMN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "Add each company'\''s founder LinkedIn URL to every existing row."}'
```

A `409` here means a turn is still in flight; the agent should wait and retry rather than
starting a duplicate task. See [Errors](/docs/api/errors).

## Guardrails worth writing into the agent's instructions

* Default to `clarify: false`; the agent is rarely there to answer a blocking question.
* Never print the API key, in output or in generated code.
* One task per goal. Refinements continue it; only an unrelated goal starts a new one.

## Related

<CardGroup cols={2}>
  <Card title="Skill" icon="plug" href="/docs/skill">
    Install paths and the ready-made prompt to pair with it.
  </Card>

  <Card title="Vibecoding" icon="sparkles" href="/docs/vibecoding">
    The one-link version for coding agents building against Autumn.
  </Card>
</CardGroup>
