---
title: "Event ingestion"
description: "Send deployments, incidents, CI runs, pull requests and support tickets to Achiral so they can become memory your team and agents recall later."
date: "2026-11-05"
modified: "2026-11-05"
reviewed: "2026-11-05"
---

# Event ingestion

> Send deployments, incidents, CI runs, pull requests and support tickets to Achiral so they can become memory your team and agents recall later.

Published on: 2026-11-05

Last updated on: 2026-11-05

Use event ingestion when a system action should become future memory.

Examples:

- deployments
- incidents
- CI runs
- pull requests
- code review findings
- support tickets
- user preferences
- operational decisions

## Route

```http
POST /v1/memory/events
```

Requires `memory:write`.

When environments are enabled, the credential determines whether the event enters Test or Production. Do not put an Achiral environment ID in the request payload or use the payload's domain-specific `metadata.environment` value for routing. See [Memory API environments](/docs/memory/api/environments).

## Payload

```json
{
  "type": "deployment.completed",
  "source": "github-actions",
  "subject": "api-service",
  "text": "api-service commit abc123 deployed to production.",
  "metadata": {
    "repo": "acme/api-service",
    "sha": "abc123",
    "environment": "production"
  }
}
```

Required fields:

| Field  | Purpose                                                                  |
| ------ | ------------------------------------------------------------------------ |
| `type` | Stable event type such as `deployment.completed` or `incident.resolved`. |
| `text` | Human-readable event summary that can be triaged into memory.            |

Recommended fields:

| Field      | Purpose                                                                      |
| ---------- | ---------------------------------------------------------------------------- |
| `source`   | System that emitted the event.                                               |
| `subject`  | Service, customer, repo, workflow, or entity the event is about.             |
| `metadata` | Structured source details such as repo, SHA, environment, ticket id, or URL. |

Send `Idempotency-Key` when retrying event submissions. If no explicit key is provided, Achiral derives a deterministic key from the developer event source, event type, and normalized payload hash.

Idempotency is scoped to the selected environment. The same source event can be ingested once in Test and once in Production without a collision. Retries within one environment continue to resolve to the same event.

Test starts with notifications, automations, and external writes turned off. Event ingestion can still create environment-scoped records and memory candidates for validation.

## SDK

```ts
await chiro.events.ingest({
  type: "incident.resolved",
  source: "pagerduty",
  subject: "auth-service",
  text: "Resolved elevated 401s after rotating the stale JWKS cache.",
  metadata: {
    incidentId: "INC-123",
    severity: "sev2",
  },
});
```

Events flow through Achiral's generic ingestion pipeline as `developer_event` sources and can create `BusinessEvent` records, workflow state, and memory candidates.
