create_ai_memory_item
Save an AI memory item. Required: name, content. Scope it with entity ('lead'|'contact'|'account'|'campaign') + entity_id (a CRM record) AND/OR brain_id + agent_id (agent 'brain' memory). category is a free topical label (default 'general'). importance 1-5 (default 3) for ranking. key = stable handle for upsert (update the same fact instead of appending); the key is unique PER SCOPE (entity + entity_id + agent_id + brain_id), so the same key on two different leads keeps two items. The result says which scope was written. source, occurred_at (ISO original date) optional. (Legacy: parent_id = entity_id.) DURABLE RULE from a human for an agent ("ab jetzt immer …"): agent_id = that agent (yourself), category 'regel', importance 5, content = the rule quoted verbatim + ' — , '; it is loaded into every later run (runner and server_job, get_agent_bootstrap agentRules). An agent writing its OWN memory is never parked for approval.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"content": "<content>"
},
"name": "create_ai_memory_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Stable handle → upsert instead of duplicate, within the scope (the same key on another record is another item) | |
| name | Yes | Name of the AI memory item | |
| entity | No | lead|contact|account|campaign|user|asbest_project|raumbuchung_booking | |
| source | No | Where the fact comes from (optional provenance) | |
| content | Yes | Text content of the memory item | |
| agent_id | No | Owning agent (omit = shared across the user's agents) | |
| brain_id | No | Agent brain (category) this memory belongs to | |
| category | No | Free topical label (default 'general') | |
| entity_id | No | Record id to attach to | |
| parent_id | No | Legacy alias for entity_id | |
| importance | No | 1-5, default 3 | |
| occurred_at | No | ISO date the fact originated in its source system. |