https://api.herm.run. This quickstart uses
curl; no SDK is required.
Prerequisites
- A Herm workspace. Open Herm, sign in, and create or select a workspace.
- An API key. Open Settings → API keys, create a key, and copy it when it is shown.
curl
PRISM_API_KEY environment
variable. Requests authenticate with the x-api-key header.
x-api-key: $PRISM_API_KEY. Requests with a body
must also include Content-Type: application/json.
1
Create an agent
id and its initial immutable version. Save the
id for the next request.2
Create a session
Create a session using a stable Reuse the same
subjectId from your application:subjectId for the same user or organization. A session records
the latest agent version when it is created.3
Open the event stream
In another terminal, open the session’s Server-Sent Events stream before sending
the message:Each frame has an SSE
event name and a JSON event envelope in data. Assistant
text arrives as agent.message; turn lifecycle events are
session.status_running and session.status_idle.4
Send a message
202 Accepted with the accepted inbound event. Responses
arrive on the stream; there is no separate run resource.5
Read the response
The stream emits frames like:For
agent.message, render text from payload.content. A delta: true payload
is a streaming chunk; durable completed messages use delta: false.Next steps
Agents
Configure models, skills, MCP servers, and tools.
Sessions
Manage session identity and lifecycle.
Stream events
Handle events, required actions, and reconnection.
Long-running tools
Complete application-owned work asynchronously.

