userId that scopes persistent memory and learned skills for that agent.
Memory and learned skills are scoped to agentId + userId. Reuse the same userId with the same agent when you intentionally want memory shared across sessions. Use a different userId to isolate memory. userId is your opaque identifier; it is not used for authentication.
Create a session
agentId, Herm uses the latest agent version at session creation time and pins that resolved version for the lifetime of the session. Future agent updates apply to new sessions, not existing sessions.
| Parameter | Type | Required | Description |
|---|---|---|---|
userId | string | No | Stable identifier for the person, team, organization, workspace, or subject the agent remembers |
title | string | No | Human-readable label for the session |
metadata | object | No | Key-value pairs for your own tracking |
List sessions
| Parameter | Type | Required | Description |
|---|---|---|---|
agentId | string | No | Filter to sessions for one agent |
userId | string | No | Filter to one memory scope |
status | string | No | Filter by session status |
limit | integer | No | Page size, 1–100. Defaults to 20 |
cursor | string | No | Pagination cursor from a previous response |
Get a session
Update a session
userId and the pinned agent version do not change after session creation.
Archive a session
Delete a session
agentId + userId are unaffected.
Endpoint summary
POST /v1/agents//sessions - Create a new session for an agent, optionally passinguserId to share memory and learned skills across sessions for that agent and user.
GET /v1/sessions - List sessions, filterable by agentId, userId, status, or metadata.
GET /v1/sessions/ - Retrieve session state, including status, resolved agent version, userId, metadata, and timestamps.
PATCH /v1/sessions/ - Update session metadata or title without changing its userId or resolved agent version.
POST /v1/sessions//archive - Archive a session so it no longer appears in active session lists.
DELETE /v1/sessions/ - Permanently delete a session and its conversation history.
Errors
| Status | Error | When |
|---|---|---|
| 400 | validation_error | Invalid request body |
| 404 | not_found | Agent or session does not exist |

