What is a Customer?
A Customer represents a tenant or organization in your application. If you are building a B2B SaaS product, each of your client companies is a Customer. If you are building a consumer app, each household or account group could be a Customer. Customers are identified by acustomer_id string that you provide. This string is opaque to Synap — it can be a UUID, a slug, a database ID, or any identifier that is unique within your application. Synap uses it to create a memory boundary at the CUSTOMER scope level in the scope chain.
Examples of Customers:
"acme_corp"— Acme Corporation, one of your enterprise clients"startup_xyz"— A startup using your platform"household_9a3f"— A family unit in a consumer application"team_engineering"— An internal team in a workplace tool
What Customer scope provides
All memories ingested with a givencustomer_id (but without a user_id) are stored at the Customer scope. This means:
- Every user within that customer organization can access these memories
- Users in other customer organizations cannot see them
- These memories surface alongside user-specific memories during retrieval, with lower priority than user-scoped memories
Customer-scoped memories are ideal for shared organizational knowledge: company policies, team structure, project context, terminology, and preferences that apply to everyone in the organization.
What is a User?
A User represents an individual end-user of your application. Each person interacting with your AI agent is a User. Users are identified by auser_id string that you provide, following the same rules as customer_id — it is opaque to Synap and can be any unique identifier.
Users map to the USER scope in the scope chain, which is the narrowest and most private scope level. Memories stored at the User scope are visible only when that specific user_id is provided in a retrieval query.
Examples of Users:
"user_alice_chen"— An individual employee at Acme Corp"u_8b2f4a91"— A UUID-based user identifier"github|12345"— An OAuth-sourced user ID"employee_0042"— An internal employee number
What User scope provides
Memories ingested with both auser_id and a customer_id are stored at the User scope:
- Only that specific user can access these memories during retrieval
- Other users in the same customer organization cannot see them
- These memories have the highest retrieval priority in the scope chain
Entity hierarchy
Synap’s entity model forms a strict hierarchy. Understanding this hierarchy is essential for designing your memory scoping strategy.| Level | What it represents | Who creates it | Identifier | Scope level |
|---|---|---|---|---|
| Client | Your organization / application | Synap (on signup) | cli_<hex16> | CLIENT |
| Instance | A deployed AI agent | You (via SDK/API/Dashboard) | inst_<hex16> | — |
| Customer | A tenant in your application | You (implicitly, by passing customer_id) | Any string you choose | CUSTOMER |
| User | An individual end-user | You (implicitly, by passing user_id) | Any string you choose | USER |
Clients and Instances are explicitly created and managed through the Synap API. Customers and Users are implicitly created — they come into existence the first time you pass their IDs during ingestion or retrieval. There is no separate registration step.
How customer_id and user_id drive scoping
The combination ofcustomer_id and user_id you pass during ingestion determines where memories are stored. The combination you pass during retrieval determines which memories are returned.
Ingestion scoping rules
| Parameters provided | Resulting scope | What gets stored |
|---|---|---|
user_id + customer_id | USER | Personal memories for that individual user |
customer_id only | CUSTOMER | Shared memories for the organization |
| Neither | CLIENT | Application-wide memories visible to all |
Retrieval scoping rules
| Parameters provided | Scopes searched | Priority order |
|---|---|---|
user_id + customer_id | USER + CUSTOMER + CLIENT + WORLD | User first, then Customer, then Client, then World |
customer_id only | CUSTOMER + CLIENT + WORLD | Customer first, then Client, then World |
| Neither | CLIENT + WORLD | Client first, then World |
Code examples
Ingesting with full user and customer context
The most common pattern — storing a conversation that belongs to a specific user within a specific customer organization:Ingesting customer-scoped knowledge
Shared organizational knowledge that all users in the customer should benefit from:Ingesting client-scoped knowledge
Application-wide knowledge visible to everyone:Retrieving with scope chain
When to use customer_id vs user_id
Always provide both user_id and customer_id for conversations
Always provide both user_id and customer_id for conversations
When ingesting AI chat conversations, always provide both identifiers. This ensures personal preferences and conversation history are scoped to the individual user, while the customer association enables scope chain retrieval that includes organizational context.
Use customer_id alone for shared organizational documents
Use customer_id alone for shared organizational documents
Omit both for product-wide knowledge
Omit both for product-wide knowledge
When ingesting your own product documentation, feature announcements, or domain knowledge that should be universally available, omit both identifiers. This stores at Client scope, visible to all customers and users.
Never provide user_id without customer_id
Never provide user_id without customer_id
In Synap’s scope model, a User always belongs to a Customer. While the system will accept a
user_id without a customer_id, best practice is to always include the customer context to ensure proper scope chain behavior during retrieval.Comparison table
| Aspect | Client | Instance | Customer | User |
|---|---|---|---|---|
| What it is | Your organization | A deployed AI agent | A tenant in your app | An individual end-user |
| Who creates it | Synap (on signup) | You (SDK/API/Dashboard) | Implicit (first use) | Implicit (first use) |
| Identifier format | cli_<hex16> | inst_<hex16> | Any string you choose | Any string you choose |
| Scope level | CLIENT | — | CUSTOMER | USER |
| Memory visibility | All customers, all users | — | All users in that customer | Only that user |
| Typical count | 1 per application | 1-10 per client | Hundreds to thousands | Thousands to millions |
| Example | ”Your SaaS company" | "Production support bot" | "Acme Corp" | "Alice Chen” |
Next steps
Memory Scopes
Deep dive into the four-level scope chain and how retrieval priority works.
Clients & Instances
Understand the infrastructure hierarchy that Customers and Users operate within.
Memories & Context
Learn how memories are structured and delivered as context to your agent.
Multi-User Scoping Guide
Step-by-step guide to implementing multi-user, multi-tenant memory.