> ## 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`.

# Follow-up tasks

> Continue the same task with new instructions instead of starting over.

Every task has a durable `task_id`. To refine, expand, or fix results, **continue** the
same task: the agent keeps the plan, the output rows, and the task-local files.

<CodeGroup>
  ```bash curl theme={"theme":{"light":"github-light","dark":"github-dark"}}
  # 1. start
  curl -sS -X POST "https://api.autumn.ai/task" \
    -H "X-API-Key: $AUTUMN_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"prompt": "Find 20 AI infrastructure startups hiring founding engineers", "clarify": false}'

  # 2. send more instructions to the same task
  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, and find 10 more rows"}'

  # 3. read the result
  curl -sS "https://api.autumn.ai/task/$TASK_ID/output" \
    -H "X-API-Key: $AUTUMN_API_KEY"
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import os, requests

  AUTUMN = "https://api.autumn.ai"
  HEADERS = {"X-API-Key": os.environ["AUTUMN_API_KEY"]}

  # start a task
  task = requests.post(f"{AUTUMN}/task", headers=HEADERS, json={
      "prompt": "Find 20 AI infrastructure startups hiring founding engineers",
      "clarify": False,
  }).json()
  task_id = task["task_id"]

  # send more instructions to the same task
  requests.post(f"{AUTUMN}/task/{task_id}/continue", headers=HEADERS, json={
      "message": "Add each company's founder LinkedIn URL, and find 10 more rows",
  })

  # read the result
  rows = requests.get(f"{AUTUMN}/task/{task_id}/output", headers=HEADERS).json()["rows"]
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const AUTUMN = "https://api.autumn.ai";
  const HEADERS = {
    "X-API-Key": process.env.AUTUMN_API_KEY,
    "Content-Type": "application/json",
  };

  const { task_id } = await fetch(`${AUTUMN}/task`, {
    method: "POST",
    headers: HEADERS,
    body: JSON.stringify({
      prompt: "Find 20 AI infrastructure startups hiring founding engineers",
      clarify: false,
    }),
  }).then((r) => r.json());

  await fetch(`${AUTUMN}/task/${task_id}/continue`, {
    method: "POST",
    headers: HEADERS,
    body: JSON.stringify({
      message: "Add each company's founder LinkedIn URL, and find 10 more rows",
    }),
  });

  const { rows } = await fetch(`${AUTUMN}/task/${task_id}/output`, { headers: HEADERS })
    .then((r) => r.json());
  ```
</CodeGroup>

Wait for the continue turn to finish the same way you wait for the first one: poll
`GET /task/{task_id}` until `status: "plan"` and `activity: "idle"`, or use
`POST /task/{task_id}/continue/stream` and read events until `done`. See
[Live messages](/docs/guides/streaming).

## When to continue vs. start fresh

Continue when the user references previous work: "add a column", "find more", "narrow to
US-only", "fix the empty fields". Start a new task only for unrelated work.

When you continue, rewrite the user's request into a clear instruction stating the current
goal, not just their raw words.

## Execute and stop

* `POST /task/{task_id}/execute` pushes an existing task toward producing output from its
  current plan. Use it after a task has been planned but is sitting idle.
* `POST /task/{task_id}/stop` stops a run and returns the task to `plan`.

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

curl -sS -X POST "https://api.autumn.ai/task/$TASK_ID/stop" \
  -H "X-API-Key: $AUTUMN_API_KEY"
```

<Note>
  Continuing a task keeps the model tier it started with. `version` is a start-only field.
</Note>

## Related

<CardGroup cols={2}>
  <Card title="Human in the loop" icon="hand" href="/docs/guides/human-in-the-loop">
    Let the agent ask a clarifying question first.
  </Card>

  <Card title="Live messages" icon="radio" href="/docs/guides/streaming">
    Watch each turn as it happens.
  </Card>
</CardGroup>
