Overview
| Aspect | Details |
|---|---|
| Data Type | Entities with facts, events, and relationships |
| Scope | Configurable (global or per-user) |
| Persistence | Long-term |
| Default Mode | ALWAYS |
| Supported Modes | ALWAYS, AGENTIC |
Basic Usage
Three Types of Knowledge
Entity Memory captures three types of information:Facts (Timeless Truths)
Facts are things that remain true over time:- “Uses PostgreSQL for their main database”
- “Headquarters in San Francisco”
- “50 employees”
- “Founded by ex-Google engineers”
Events (Time-Bound Occurrences)
Events are things that happened at a specific time:- “Launched v2.0 on January 15, 2025”
- “Closed $50M Series B led by Sequoia”
- “Had 4-hour outage affecting payment processing”
- “Announced partnership with CloudCo yesterday”
Relationships (Entity Connections)
Relationships link entities together:- Jane Smith → CEO → Acme Corp
- Project Atlas → uses → PostgreSQL
- Acme Corp → competitor_of → Beta Inc
ALWAYS Mode (Default)
In ALWAYS mode, entities are extracted automatically from conversations:- Extraction happens in parallel with the agent’s response
- No tools are visible to the agent
- All conversations are analyzed for entity information
AGENTIC Mode
In AGENTIC mode, the agent explicitly decides when to create or update entities:| Tool | Description |
|---|---|
search_entities | Search for entities by name, facts, or events |
create_entity | Create a new entity |
update_entity | Update entity properties |
add_fact | Add a timeless truth |
update_fact | Correct an existing fact |
delete_fact | Remove an incorrect fact |
add_event | Record a time-bound occurrence |
add_relationship | Create connection between entities |
Entity Data Model
Each entity contains:| Field | Type | Description |
|---|---|---|
entity_id | str | Unique identifier (e.g., “acme_corp”) |
entity_type | str | Category: “company”, “person”, “project”, etc. |
name | str | Display name |
description | str | Brief description |
properties | dict | Key-value metadata |
facts | list | Timeless truths |
events | list | Time-bound occurrences |
relationships | list | Connections to other entities |
Accessing Entity Memory
Context Injection
Relevant entities are injected into the agent’s context:Namespace Configuration
Control who can access entity data:Example: CRM Assistant
Facts vs Events Guide
| Use Facts For | Use Events For |
|---|---|
| Tech stack | Product launches |
| Headquarters location | Funding rounds |
| Employee count | Outages or incidents |
| Industry/domain | Partnerships announced |
| Pricing model | Key meetings |
| Preferences | Milestones achieved |
Building Relationship Graphs
Create rich knowledge graphs by linking entities:- People:
CEO,CTO,engineer_at,founder,reports_to - Companies:
competitor_of,partner_of,acquired_by,subsidiary_of - Projects:
uses,depends_on,integrates_with,owned_by