Skip to main content
The add method stores conversation messages in Cognis memory. The extraction layer automatically pulls discrete facts, preferences, and context from the messages and indexes them as searchable memory records.

Method signature

At least one of owner_id, agent_id, or session_id must be provided.

Parameters

Response

Basic usage

Using CognisMessage objects

Use CognisMessage instead of plain dictionaries for type safety.

Multi-turn conversations

Pass longer conversations as a flat list of message pairs.

Scoping with multiple identifiers

Async usage

Send messages in natural user/assistant pairs for best extraction results. Richer, multi-turn conversations produce more useful memory records.