Skip to content

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 ​

MethodPathDescriptionAuth
GET/workspaces/:workspaceId/ai/sessions/:sessionId/participantsList invited agentsJWT + Entitlement
POST/workspaces/:workspaceId/ai/sessions/:sessionId/participantsInvite an agentJWT + Entitlement
DELETE/workspaces/:workspaceId/ai/sessions/:sessionId/participants/:participantIdRemove an agentJWT + Entitlement
GET/workspaces/:workspaceId/ai/agents/discover?q=Discover Chainabit + LenserFight agentsJWT + 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.

The agent must be available in the session's workspace: an agent of that workspace, or one shared with the whole account. An agent private to another workspace of the account, another account's agent, and a deleted agent are refused with 404 (Agent not found), the same response as an agent that does not exist.

Code Examples ​

bash
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" }'
bash
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:

text
@researcher summarize the latest findings
  • A message addressed with @handle triggers 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 ​

bash
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:

text
/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.
text
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 ​

MethodPathDescriptionAuth
POST/workspaces/:workspaceId/ai/sessions/:sessionId/participants/humansInvite a human participantJWT + 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 ​

FieldTypeRequiredDescription
chainerIdstringYesID of the workspace member to add as a participant

Code Examples ​

bash
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.

Current limitations ​

  • If another workspace of the account has already imported the same LenserFight agent, or the imported copy was deleted, inviting it with lenserfightAgentId is refused with the same 404 (Agent not found).

Built with purpose.