> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.markup.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.markup.ai/_mcp/server.

# Key Takeaways

> Run the Key Takeaways agent (key_takeaways) via the Markup AI API.

**API name:** `key_takeaways` · **Category:** AI Visibility

Ensure content includes a clear Key Takeaways section near the top. For what this agent does and why it matters, see [Key Takeaways](/agents/key-takeaways) in the Agent Catalog.

## What it returns

Either confirmation of an adequate takeaways section or a generated one ready to insert, plus the run status.

## Run this agent

Agents are run by ID, but you never need to hardcode one: resolve the ID from the agent's stable `name` (`key_takeaways`) with `GET /agents`, then call `POST /agents/{agent_id}/run`. Pass `wait=true` to block until the run completes; omit it to get a `workflow_id` back immediately and track the run with `GET /agents/workflows/{workflow_id}` (or a `webhook_url` in the request body).

**`cURL`**

```bash title="cURL"
TOKEN="YOUR_TOKEN"

# Resolve the agent ID by name
AGENT_ID=$(curl -s "https://api.markup.ai/agents?page_size=100" \
  -H "Authorization: Bearer $TOKEN" \
  | jq -r '.agents[] | select(.name == "key_takeaways") | .id')

# Run the agent and wait for the result
curl -X POST "https://api.markup.ai/agents/$AGENT_ID/run?wait=true" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text": "Your content to check."}'
```

**`Python`**

```python title="Python"
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "key_takeaways")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))
```

**`TypeScript`**

```typescript title="TypeScript"
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "key_takeaways").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);
```

Prefer MCP? On the hosted MCP server, run this agent with `markupai_run_agents` and `agents: ["key_takeaways"]`, or let `markupai_review` select it from your goal — see the [MCP overview](/mcp).