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

# Build a reporter

> Create an agent that analyzes sources with a workflow.

A **reporter** analyzes sources by running a **workflow** — an ordered list of
**steps**, each a tool plus an inline prompt. This guide builds one and runs it.

## 1. Create the reporter

```bash theme={null}
curl -X POST https://api.clipping.cc/v1/reporters \
  -H "Authorization: Bearer ck_live_…" -H "Content-Type: application/json" \
  -d '{ "name": "AI news analyst" }'
```

```json theme={null}
{ "reporter": { "reporter_id": "rep_…", "name": "AI news analyst" } }
```

## 2. Create a workflow

A workflow has a `target_kind` — what it runs against (`youtube_video`,
`youtube_channel`, or `collection`):

```bash theme={null}
curl -X POST https://api.clipping.cc/v1/reporters/rep_123/workflows \
  -H "Authorization: Bearer ck_live_…" -H "Content-Type: application/json" \
  -d '{ "name": "Summarize videos", "target_kind": "youtube_video" }'
```

## 3. Add steps

Each step is a `tool_id` plus an inline `prompt_text` (and optional `params`).
Browse available tools at `GET /v1/tools`:

```bash theme={null}
curl -X POST https://api.clipping.cc/v1/reporters/rep_123/workflows/wf_123/steps \
  -H "Authorization: Bearer ck_live_…" -H "Content-Type: application/json" \
  -d '{
        "tool_id": "summary_review",
        "prompt_text": "Summarize the key claims and who made them."
      }'
```

<Tip>
  Reordering by drag-and-drop? Send the whole list at once with
  `PUT /v1/reporters/{id}/workflows/{wid}/steps` and a `steps: [...]` array — it
  replaces all steps in order.
</Tip>

## 4. Run it

Running is [asynchronous](/en/async-operations) — you get a `202` + an execution.
Point it at a `source` (a URL/handle resolved like an item). Omit `workflow_id`
to use the reporter's default workflow:

```bash theme={null}
curl -X POST https://api.clipping.cc/v1/reporters/rep_123/process \
  -H "Authorization: Bearer ck_live_…" -H "Content-Type: application/json" \
  -d '{ "source": "https://youtube.com/watch?v=…", "workflow_id": "wf_123" }'
```

```json theme={null}
{ "execution": { "execution_id": "exc_…", "status": "pending" } }
```

Track the execution to completion; the output lands as **documents**
(`GET /v1/documents?reporter_id=rep_123`). Inspect a finished run with
`GET /v1/executions/{id}` to see each step's input/output.

## 5. (Optional) attach collections

Attach collections to the reporter so it has a working set, then run a
collection-wide workflow with `POST /v1/reporters/{id}/process-collection`:

```bash theme={null}
curl -X POST https://api.clipping.cc/v1/reporters/rep_123/collections \
  -H "Authorization: Bearer ck_live_…" -H "Content-Type: application/json" \
  -d '{ "collection_id": "col_123" }'
```

## Next

<Card title="Schedule it" icon="clock" href="/en/guides/schedule-runs">
  Run the workflow automatically over new videos on a cadence.
</Card>
