# Create a managed memory entry

Launch stage: Beta

`POST /api/2.0/agents/{parent=memory-stores/*}/entries`

Creates a managed memory entry using exclusive-create semantics. Callers may choose the entry
 ID; the service generates one when it is omitted. Returns `ALREADY_EXISTS` when an entry with
 the same actor, session, and path already exists. Omitted `session_id` is its own uniqueness
 key: two omitted-session entries with the same actor and path conflict, but an omitted-session
 entry does not conflict with a session-scoped entry at the same actor and path.

API scopes: agent-kit

## Path parameters

- `parent` (string, required)
  Managed memory store that will contain the entry, in the form
   `memory-stores/{managed_memory_store_id}`.

## Query parameters

- `managed_memory_entry_id` (string, optional)
  Optional caller-selected managed memory entry ID. The service generates an ID when omitted.

## Request body

The managed memory entry to create.
- `actor_id` (string, required, Immutable)
  Customer-provided identifier for the actor whose memory this entry represents.
- `session_id` (string, optional, Immutable)
  Optional identifier for the session associated with this memory entry. When omitted, the
   entry applies across the actor's sessions.
- `path` (string, required, Immutable)
  Absolute, case-sensitive path identifying the entry within its actor and optional session.
   Paths must begin with `/` and must not contain empty, `.` or `..` segments.
- `content` (string, optional)
  Optional free-form memory content.
- `description` (string, optional)
  Human-readable description of the memory entry.
- `source_type` (string, optional, Immutable)
  Which writer created this entry. Caller sets this on Create; immutable after creation.
  Possible values:
  - `MANAGED_MEMORY_ENTRY_SOURCE_TYPE_AGENT`
  - `MANAGED_MEMORY_ENTRY_SOURCE_TYPE_DREAMER`

## Returns

Returns the ManagedMemoryEntry object.

## Response

```json
{
  "name": "string",
  "actor_id": "string",
  "session_id": "string",
  "path": "string",
  "content": "string",
  "description": "string",
  "source_type": "MANAGED_MEMORY_ENTRY_SOURCE_TYPE_AGENT",
  "create_time": "string",
  "update_time": "string"
}
```

