Character Chat
This guide uses `service_source: enterprise-tutor`.
This guide uses service_source: enterprise-tutor.
On human-facing pages, this appears as Character Chat / Enterprise Tutor.
Default integration pattern
- create one anchor per
user + characterpair - recall before every reply
- store meaningful memory after every reply
- keep transcript state outside MaaS if you want, but persist durable memory in MaaS
- send feedback only when recalled memory influenced the final answer
Create the pair anchor
curl -X POST https://maas.nunchiai.com/v1/anchors \
-H "Authorization: Bearer mk_maas_example" \
-H "X-Workspace-Id: acme-prod" \
-H 'Content-Type: application/json' \
-d '{
"name": "User 42 and Aria",
"type": "chat-log",
"metadata": {
"lane": "user-42:aria",
"user_external_id": "user-42",
"character_id": "aria"
}
}'
Store durable memory
curl -X POST https://maas.nunchiai.com/v1/atoms \
-H "Authorization: Bearer mk_maas_example" \
-H "X-Workspace-Id: acme-prod" \
-H 'Content-Type: application/json' \
-d '{
"anchor_id": "be2d5afd-8ec2-44d1-bfb3-e1eb4cb2c9b1",
"content": "User asked to continue the movie discussion next time.",
"source_type": "prd",
"metadata": {
"atom_type": "promise",
"user_external_id": "user-42",
"session_id": "session-005"
},
"chunking": { "enabled": false }
}'
{
"atom_ids": ["f44c85cc-f63d-4fbc-9f5d-5b84df02d77d"],
"stored_count": 1
}
Recall before generation
curl -X POST https://maas.nunchiai.com/v1/memory/recall \
-H "Authorization: Bearer mk_maas_example" \
-H "X-Workspace-Id: acme-prod" \
-H 'Content-Type: application/json' \
-d '{
"user_external_id": "user-42",
"session_id": "session-006",
"query": "What should the character remember before replying?"
}'
{
"items": [
{
"atom_id": "f44c85cc-f63d-4fbc-9f5d-5b84df02d77d",
"content": "User asked to continue the movie discussion next time.",
"score": 0.893
}
]
}
Recommended atom taxonomy
preferenceemotional_staterelationship_eventbackstory_revealpromiseboundary
Do not store
- greetings
- acknowledgements
- filler turns
- low-confidence fallback text
Errors
-
400invalid key or missing workspace header -
402billing blocked -
403access policy denied -
404missing anchor -
429rate limited