---
title: "Ingest content into memory system (async embedding)"
method: POST
path: "/api/memory/index"
tags: ["Memory"]
---

# Ingest content into memory system (async embedding)

`POST /api/memory/index`

## Request body

- object
  - `agentId` string
  - `content` string, required
  - `name` string, required
  - `scope` 'agent' | 'swarm', required
  - `source` 'manual' | 'file_index' | 'session_summary' | 'task_completion', required
  - `sourceTaskId` string, uuid
  - `sourcePath` string
  - `tags` string[]
  - `persistMemory` boolean
  - `contextKey` string

## Response `202`

Content queued for embedding

- object
  - `queued` boolean, required
  - `memoryIds` string[], required
  - `skipped` string
  - `edited` boolean

## Other responses

- `400` — Validation error

---

[API](https://skmtc.net/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.net/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/versions/ef761849166b/schema)
