# sopops docs

Source: https://sopops.dev/docs/

Run a local demo that imports prompts, checks calls, and publishes a fix. It
uses known calls, so you can see each result before you connect your own agent.

Read [how sopops improves agents](https://sopops.dev/docs/what-is-sopops.md) to understand the loop.
Recording calls from your own agent takes no code on LiveKit, ElevenLabs and
Vapi; see [Connect your agent](https://sopops.dev/docs/connect.md).

## First request

Send one session with a workspace token that has the `ingest` scope. Make
the token in Settings → Access → Tokens, in the
[hosted app](https://sopops.dev/app) or your own sopops
([quickstart](https://sopops.dev/docs/quickstart.md)). The page shows it once, with `SOPOPS_URL` and
`SOPOPS_TOKEN` to export.

```sh
curl -s -X POST -H "Content-Type: application/json" \
  -H "Authorization: Bearer $SOPOPS_TOKEN" \
  "$SOPOPS_URL/sessions" \
  -d '{"platform": "api", "external_id": "first-request-1", "turns": [{"role": "agent", "text": "Thanks for calling. Pickup or delivery?"}, {"role": "user", "text": "Delivery, please."}]}'
```

`201` returns the new session's `id`. `401` means a missing or wrong token;
`403`, a token without the `ingest` scope. The format is in
[Sessions](https://sopops.dev/docs/api/sessions.md).
