MaaS AHOP Docs
Home Demo llms.txt
Language EN KO JA

Working with a coding agent? Copy the Markdown version of this page or hand over the full docs bundle.

Open llms-full.txt
Integration Guides

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 + character pair
  • 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
    }
  ]
}
  • preference
  • emotional_state
  • relationship_event
  • backstory_reveal
  • promise
  • boundary

Do not store

  • greetings
  • acknowledgements
  • filler turns
  • low-confidence fallback text

Errors

  • 400 invalid key or missing workspace header
  • 402 billing blocked
  • 403 access policy denied
  • 404 missing anchor
  • 429 rate limited