AI Twins
Your AI Twin is a personalised view of how Chainabit understands you. The system maintains it automatically — you observe it via these endpoints, tune the limited behavioural preferences, and forget or flag items you don't want.
A Business seat funds your authorized Business usage; it does not share your Personal Twin, private behavioral state, or Chao history with the team. Business-owned knowledge and explicitly shared resources remain subject to their own permissions. See Business billing and data ownership.
A Twin models contextual preferences, not a fixed identity or a clinical profile. Your current instructions take priority over inferred preferences.
Endpoints
| Method | Path | Description | Auth |
|---|---|---|---|
GET | /agents/twins/export | Export the signed-in person's Twin data | JWT |
GET | /workspaces/{workspaceId}/ai/twins/{twinId}/brain | Read the latest twin profile | JWT |
GET | /workspaces/{workspaceId}/ai/twins/{twinId}/confidence | Per-field confidence values | JWT |
GET | /workspaces/{workspaceId}/ai/twins/{twinId}/evidence | Provenance for the twin's claims | JWT |
GET | /workspaces/{workspaceId}/ai/twins/{twinId}/timeline | History of twin profile versions | JWT |
PATCH | /workspaces/{workspaceId}/ai/twins/{twinId}/preferences | Update behavioural preferences | JWT |
POST | /workspaces/{workspaceId}/ai/twins/{twinId}/test | Run a sample prompt against the twin | JWT |
DELETE | /workspaces/{workspaceId}/ai/twins/{entityTwinId}/contributions/{userId} | Admin: revoke a member's contributions to an entity twin | JWT, admin role |
GET | /agents/twins/{twinId}/memories | List memories | JWT |
POST | /agents/twins/{twinId}/memories/{id}/deletions/preview | Review a memory before forgetting it | JWT |
POST | /agents/twins/{twinId}/memories/{id}/deletions/cancel | Cancel a pending memory deletion | JWT |
DELETE | /agents/twins/{twinId}/memories/{id} | Forget a memory | JWT |
POST | /agents/twins/{twinId}/memories/{id}/flag | Flag a memory as wrong | JWT |
GET /agents/twins/export
Returns the signed-in person's Twin record and its memories, behavioral evidence, and workspace policies in a JSON response. The response has a data object with twin, memories, evidence, and policies fields. Returns 404 if that person has no Twin to export. Access requires a JWT and the applicable Twin entitlement and policy checks.
GET /workspaces/{workspaceId}/ai/twins/{twinId}/brain
Description
Returns the current operational Twin snapshot. The legacy personality projection is null with personalityStatus: "unknown"; it does not assess psychological traits. topClaims and confidence contain only supported operational facts. Contextual preferences and their evidence are reviewed in Twin settings. Without an available snapshot, the response reports readiness with status: "seeded" or "blocked".
Request
- Headers:
Authorization: Bearer <token> - Path params:
workspaceIdtwinId
Response
200 OKjson{ "data": { "version": 12, "personality": null, "personalityStatus": "unknown", "topClaims": [], "confidence": {} } }
Code Example
curl -H "Authorization: Bearer $TOKEN" \
https://api.chainabit.com/api/v1/workspaces/$WORKSPACE/ai/twins/$TWIN/brainGET /workspaces/{workspaceId}/ai/twins/{twinId}/confidence
Description
Returns the snapshot confidence map for supported operational facts. An empty map means no such facts are available. This endpoint does not expose psychological scores or determine whether a preference may personalize Chao; review that understanding in Twin settings.
Request
- Path params:
workspaceId,twinId
Response
200 OKjson{ "data": {} }
Code Example
curl -H "Authorization: Bearer $TOKEN" \
https://api.chainabit.com/api/v1/workspaces/$WORKSPACE/ai/twins/$TWIN/confidenceGET /workspaces/{workspaceId}/ai/twins/{twinId}/evidence
Description
Returns recent operational evidence. Optionally filter by fieldPath, such as style.message_length_short. Message length is a literal observation, not proof of a preferred response style. Contextual preference evidence is reviewed separately in Twin settings.
Request
- Path params:
workspaceId,twinId - Query:
fieldPath(optional),limit(optional, default 50)
Response
200 OK— array of evidence entries withclaim,polarity,confidence,createdAt.
Code Example
curl -H "Authorization: Bearer $TOKEN" \
"https://api.chainabit.com/api/v1/workspaces/$WORKSPACE/ai/twins/$TWIN/evidence?fieldPath=style.message_length_short"GET /workspaces/{workspaceId}/ai/twins/{twinId}/timeline
Description
Returns the recent versions of the twin profile, newest first. Legacy personality projections remain unknown in historical snapshots as well.
Request
- Path params:
workspaceId,twinId - Query:
limit(optional, default 20)
Response
200 OK— array of profile snapshots ordered byversiondesc.
Code Example
curl -H "Authorization: Bearer $TOKEN" \
"https://api.chainabit.com/api/v1/workspaces/$WORKSPACE/ai/twins/$TWIN/timeline?limit=20"PATCH /workspaces/{workspaceId}/ai/twins/{twinId}/preferences
Description
Update the twin's behavioural preferences. This is the only writable surface on a twin's identity. Identity itself is system-managed.
Allowed fields:
| Field | Type | Notes |
|---|---|---|
paused | boolean | Pause background twin updates. |
observationEnabled | boolean | Allow the system to observe signals for this twin. |
aggregationCron | string | Cron expression (subject to policy bounds). |
memoryRetentionDays | integer (1–3650) | How long memories are retained. |
sensitivityLevel | "low" | "med" | "high" | Privacy / sharing sensitivity. |
publicBrainShowcase | boolean | Opt-in to the public brain showcase on your profile. Off by default. |
Workspace and enterprise admin policies may override or restrict these fields.
Request
- Headers:
Authorization: Bearer <token>,Content-Type: application/json - Body:json
{ "paused": false, "memoryRetentionDays": 180, "sensitivityLevel": "med" }
Response
200 OK—{ "data": { "preferences": { ... } } }400 Bad Request— invalid field values403 Forbidden— caller not in twin's scope
Code Example
curl -X PATCH \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "paused": false, "memoryRetentionDays": 180, "sensitivityLevel": "med" }' \
https://api.chainabit.com/api/v1/workspaces/$WORKSPACE/ai/twins/$TWIN/preferencesDELETE /workspaces/{workspaceId}/ai/twins/{entityTwinId}/contributions/
Description
Admin-only. Revokes a single member's contributions to a team / workspace / enterprise twin. The member's own user twin is unaffected.
Use ?cascade=teams on an enterprise twin to also revoke from every team within the enterprise.
Request
- Path params:
workspaceId,entityTwinId,userId - Query:
cascade=teams(optional)
Response
200 OK—{ "data": { "evidenceRowsDeleted": 42, "teamsCascaded": 3 } }403 Forbidden— caller is not an admin in scope.
Code Example
curl -X DELETE \
-H "Authorization: Bearer $TOKEN" \
"https://api.chainabit.com/api/v1/workspaces/$WORKSPACE/ai/twins/$ENTITY_TWIN/contributions/$USER_ID?cascade=teams"Contribution eligibility
Account admins can remove a prior contribution exclusion for an active member. This does not change the member's observation consent; it only makes the member eligible to contribute again if consent and policy allow it.
Review contribution eligibility in the product's administrative controls. This reference does not prescribe a public HTTP operation for restoring an exclusion.
Contextual understanding
In Twin settings, statements about your preferences are separate from patterns in your observed choices. They can disagree without either being overwritten. A preference supported in engineering work does not automatically apply to casual conversation or another workspace.
Several signals from one conversation are correlated evidence, not several independent confirmations. Unknown, developing, contested and stale understanding remain distinct. Estimates include uncertainty and are not certified prediction accuracy.
“Fits me”, “Doesn’t fit” and “Depends” add review evidence; they never make a belief absolutely true or false.
Learning requires your consent and respects pauses and workspace policy restrictions. Workspace learning is private to you, not shared with other members. Conversation-derived Twin observation adds no user charges. Calibration is a separate opt-in: it may withhold one inferred preference, never your instructions or saved facts.
Forgetting understanding removes evidence and forecast history in the selected context. Saved knowledge and Agent experience have separate controls. Source deletion and retention limits also remove dependent understanding. The product’s contextual review controls are not a public API contract.
DELETE /agents/twins/{twinId}/memories/
Description
Review the exact memory first. Delete only after the user explicitly confirms the returned semantic fact. The confirmation expires after ten minutes and is bound to the requesting user, workspace, Twin, memory and revision. A changed memory requires a new preview. A direct DELETE without a confirmation receipt is rejected.
Request
- Path parameters:
twinId,idfrom the memory list. - JSON body:
{ "previewToken": "<receipt returned by preview>" }. - Use the same workspace context for preview, cancellation and confirmation.
- To cancel, POST the same body to
/agents/twins/{twinId}/memories/{id}/deletions/cancel; the memory remains unchanged.
Response
- Preview:
data.success,data.previewToken,data.expiresAt,data.totalFound, anddata.willForget(semanticcontentandtype). A missing or inaccessible memory produces no confirmation receipt. - Confirmed deletion:
200 OKwith{ "data": { "success": true, "preview": false, "deletedCount": 1 } }. Repeating the confirmed operation returns the same count withreplayed: true. - Missing, expired, cancelled, changed or incorrectly scoped confirmation:
400 Bad Request. The service does not disclose another user’s memory.
Code example
# Read-only preview; show willForget to the user.
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "X-Workspace-Id: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{}' \
https://api.chainabit.com/api/v1/agents/twins/$TWIN/memories/$MEMORY_ID/deletions/preview# Run only after explicit user confirmation. PREVIEW_TOKEN comes from the preview.
curl -X DELETE \
-H "Authorization: Bearer $TOKEN" \
-H "X-Workspace-Id: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d "{\"previewToken\":\"$PREVIEW_TOKEN\"}" \
https://api.chainabit.com/api/v1/agents/twins/$TWIN/memories/$MEMORY_IDPOST /agents/twins/{twinId}/memories/{id}/flag
Description
Flag a memory as wrong. The system demotes the memory's influence going forward and may stop using it altogether if it is flagged repeatedly.
Request
- Path params:
twinId,id(the memory ID, from List memories'sGET /agents/twins/{twinId}/memoriesresponse)
Response
200 OK—{ "data": { "flaggedCount": 1 } }
Code Example
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
https://api.chainabit.com/api/v1/agents/twins/$TWIN/memories/$MEMORY_ID/flagPOST /workspaces/{workspaceId}/ai/twins/{twinId}/test
Description
Return a preview description for an accessible Twin and a sample prompt. This operation does not generate a model answer or modify the Twin's stored state.
Request
- Headers:
Authorization: Bearer <token>,Content-Type: application/json - Body:
{ "prompt": "string" }
Response
201 Created— a preview object withtwinId,prompt,output, andpersona. The current preview is a fixed description; it does not execute an AI model or return a tool-call trace.
Code Example
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "prompt": "How would you phrase a reminder for this user?" }' \
https://api.chainabit.com/api/v1/workspaces/$WORKSPACE/ai/twins/$TWIN/testNotes
- Rate limits and pagination apply per the standard platform headers.
- Auth is JWT with workspace-scoped entitlements; admin endpoints additionally require an admin role in the enterprise.
- For agent execution records (run history, approvals, automation rules), see the agent actions reference.
- For the Brain Simulator (brain graph, memory graph, live activity, narration), see Twin Brain.