Conversation Participants & Lenses
Invite one or more AI agents into a conversation "room", address a specific one with an @mention, import public LenserFight agents, and call a Lens inside a message.
Endpoints
| Method | Path | Description | Auth |
|---|---|---|---|
| GET | /workspaces/:workspaceId/ai/sessions/:sessionId/participants | List invited agents | JWT + Entitlement |
| POST | /workspaces/:workspaceId/ai/sessions/:sessionId/participants | Invite an agent | JWT + Entitlement |
| DELETE | /workspaces/:workspaceId/ai/sessions/:sessionId/participants/:participantId | Remove an agent | JWT + Entitlement |
| GET | /workspaces/:workspaceId/ai/agents/discover?q= | Discover Chainabit + LenserFight agents | JWT + Entitlement |
Invite an agent
Provide either a native agentId, or a lenserfightAgentId to mirror-import a public LenserFight agent and invite it in one call. mentionHandle is optional — it defaults to a slug of the agent's name.
The first agent invited becomes the default responder. Re-inviting a previously removed agent reactivates it.
Code Examples
curl -X POST https://api.chainabit.com/api/v1/workspaces/$WORKSPACE_ID/ai/sessions/$SESSION_ID/participants \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "agentId": "a1b2c3", "mentionHandle": "researcher" }'curl -X POST https://api.chainabit.com/api/v1/workspaces/$WORKSPACE_ID/ai/sessions/$SESSION_ID/participants \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "lenserfightAgentId": "lf_agent_123" }'Address an agent with @mention
Once multiple agents are in the room, mention one to make only that agent answer:
@researcher summarize the latest findings- A message addressed with
@handletriggers only that agent. - An unaddressed message goes to the default participant.
- Exactly one agent answers per message — there is no fan-out.
Discover & import LenserFight agents
Response
Returns { local: [...], lenserfight: [...] }. Invite a lenserfight result by passing its lenserfightAgentId to the invite endpoint above.
Code Example
curl "https://api.chainabit.com/api/v1/workspaces/$WORKSPACE_ID/ai/agents/discover?q=research" \
-H "Authorization: Bearer $TOKEN"Call a Lens in a message
Call a LenserFight Lens directly inside a message with a /lens command:
/lens summarize topic=AI tone=formal- If the Lens has missing required parameters, the agent asks you for them. Reply with the value and the Lens runs automatically.
- Once complete, the resolved Lens template augments that single turn — Lenses are applied per message and are never added as a conversation participant.
You: /lens summarize
Agent: Which topic would you like me to summarize?
You: AI agents
Agent: <answers through the resolved Lens>Supported tokens: version=<versionId> selects a specific Lens version; all other key=value pairs (quoted values allowed) are Lens parameters.
Human Participants
Add another workspace member to a session as a full read+write participant — distinct from inviting an AI agent above, and from a public share link, which is read-only and unauthenticated.
Endpoints
| Method | Path | Description | Auth |
|---|---|---|---|
| POST | /workspaces/:workspaceId/ai/sessions/:sessionId/participants/humans | Invite a human participant | JWT + Entitlement |
Invite a human participant
Provide the chainerId of an existing member of the session's workspace. There is no accept step — the target becomes a full participant immediately, unlike the Chainy Collaborators invite flow. The target must be an active member of the workspace the session belongs to; otherwise the request fails.
Request
| Field | Type | Required | Description |
|---|---|---|---|
chainerId | string | Yes | ID of the workspace member to add as a participant |
Code Examples
curl -X POST https://api.chainabit.com/api/v1/workspaces/$WORKSPACE_ID/ai/sessions/$SESSION_ID/participants/humans \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "chainerId": "b2c3d4e5-f6a7-8901-bcde-f12345678901" }'Notes
- All endpoints require membership in the target workspace.
- Only public LenserFight agents can be imported.
- Running a LenserFight workflow from chat is approval-gated because it spends external credits.