POST /api/agent-session
Creates a LiveKit room and starts an agent in-process for the in-browser playground. Returns the credentials needed to join the room.POST — Create session
Request
| Field | Type | Required | Description |
|---|---|---|---|
nodes | SimpleNode[] | ✅ | Serialized graph nodes |
edges | SimpleEdge[] | ✅ | Serialized graph edges |
livekit | object | — | LiveKit credentials (falls back to env vars) |
apiKeys | object | — | Provider API keys (merged with env var fallbacks) |
Response
| Field | Type | Description |
|---|---|---|
token | string | LiveKit JWT access token for the user |
roomName | string | Unique room identifier |
serverUrl | string | LiveKit WebSocket URL |
DELETE — End session
Request
{ "ok": true }.