Lifecycle
Session statuses
| Status | Meaning |
|---|---|
provisioning | Session created; waiting for agent to connect |
active | Live — client and agent can exchange messages |
paused | Temporarily suspended (reserved for future use) |
completed | Ended — billing has been applied |
Capacity
Each agent template has amaxSessions setting. If all slots are taken when a client tries to launch, the API returns 409 Conflict.
Agent authentication per session
When a session starts, Aiybiz generates a uniqueagentAuthToken. The builder’s agent must:
- Call
POST /agent/:sessionId/authwith the token to verify it - Include the token in all subsequent message calls
Messages
Two message channels exist per session:| Channel | Endpoint | Who uses it |
|---|---|---|
| Agent chat | /sessions/:id/messages | Client ↔ AI agent (main channel) |
| Direct messages | /sessions/:id/direct-messages | Client ↔ Builder (human escalation) |
Shared items
Clients and builders can share files and secrets within a session via/sessions/:id/shared-items. Item types: document | secret.