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

# Cycle events

> Each run of the agent: finished, or stopped before the end.

Every event arrives in the same [envelope](/webhooks#the-envelope): only `data` changes. The examples are fictional, and indented here for reading; the request body is compact JSON.

## cycle.completed

A run of the agent finishes: the posts were checked and, when there was something to collect, harvested.

**Data:** `cycle` ([cycle](/webhooks/objects#cycle)).

<Accordion title="Example: cycle.completed">
  ```json theme={null}
  {
    "id": "3b582235-0be6-485a-80e8-bda8672daf33",
    "type": "cycle.completed",
    "created_at": "2026-10-06T20:03:57Z",
    "api_version": "2026-10-01",
    "workspace_id": "23e69bdb-4cd1-4822-802e-b38580e2f451",
    "data": {
      "cycle": {
        "id": "run_18vjkk1eipydcd7vvi4e81nn3z",
        "status": "completed",
        "started_at": "2026-10-06T20:02:33Z",
        "completed_at": "2026-10-06T20:03:57Z",
        "duration_seconds": 85,
        "posts_checked": 2,
        "posts_harvested": 2,
        "people_processed": 16,
        "credits_charged": 11,
        "credits_remaining": 3808,
        "leads_written": 9,
        "errors": []
      }
    }
  }
  ```
</Accordion>

## cycle.failed

A run of the agent could not finish.

**Data:** `cycle` ([cycle](/webhooks/objects#cycle)), with `status` `failed` and `errors`: `[{step, message}]`. Nothing is charged for what was not done.

<Note>
  A workspace the agent skips (paused, out of credits, period ended) has no cycle, and no event.
</Note>

<Accordion title="Example: cycle.failed">
  ```json theme={null}
  {
    "id": "7c271e9a-2029-4a22-857a-34e767436af5",
    "type": "cycle.failed",
    "created_at": "2026-10-05T12:01:40Z",
    "api_version": "2026-10-01",
    "workspace_id": "23e69bdb-4cd1-4822-802e-b38580e2f451",
    "data": {
      "cycle": {
        "id": "run_18vjkk1eipydcd7vvi4e81nn3z",
        "status": "failed",
        "started_at": "2026-10-05T12:00:33Z",
        "completed_at": "2026-10-05T12:01:40Z",
        "duration_seconds": 67,
        "posts_checked": 3,
        "posts_harvested": 0,
        "people_processed": 0,
        "credits_charged": 0,
        "credits_remaining": 3808,
        "leads_written": 0,
        "errors": [
          {
            "step": "harvest",
            "message": "The data provider refused to start the harvest. Nothing was charged."
          }
        ]
      }
    }
  }
  ```
</Accordion>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.