> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs-beta.getzep.com/v3/customer-account-context/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-beta.getzep.com/_mcp/server. # Customer and account context > Build governed customer and account context from user activity, conversations, CRM records, support data, and business events. An agent cannot understand a customer's situation when account records, conversations, and events are separate. Zep can combine these sources into Context Graphs that preserve the correct user, customer, or account scope. ## Choose the graph model Use the graph scope that matches data ownership and access: | Context | Recommended scope | | ---------------------------------------------------------------- | ------------------------------------------------------------- | | A person's conversations, activity, and preferences | A user graph addressed with `user_id` | | Shared account records, cases, contracts, or organization events | A Context Graph addressed with `graph_id` | | A task that needs personal and account context | Retrieve from the user graph and the authorized account graph | Do not copy shared account data into every user graph. Keep shared data in an account Context Graph and retrieve it only for authorized callers. ## Implementation path #### Create users for personal context [Create a Zep user](/quick-start-guide#create-a-zep-user-for-each-of-your-users) for each application user whose conversations or activity must persist. #### Create a Context Graph for shared account context [Create a graph](/create-graph) with a stable `graph_id` for the customer or account. #### Ingest each source into the correct graph Add conversations through threads. Add user-owned business data with `user_id`. Add shared records and events with the account `graph_id`. #### Retrieve the context required for the task Use [`thread.get_user_context`](/retrieving-context) for the user context. For the account context, use [`graph.search`](/searching-the-graph#auto-search) with `scope="auto"` for one low-latency call, or give the agent tools that pin the authorized account `graph_id`. Combine the results in the application. See [Build an Agent with Zep](/build-an-agent-with-zep). #### Apply access controls and preserve provenance Use [policy-based access control](/policy-based-access-control) for shared graphs. Retain source episode references when the application must show where a retrieved fact came from. See [Add User-Specific Business Data](/how-to-add-user-specific-business-data-to-user-graphs) and [Share Context Across Users](/how-to-share-context-across-users-using-graphs) for implementation examples. ## Application responsibilities Zep controls access to context in Zep. Your application remains responsible for customer authorization, action permissions, model instructions, and the validation of changes in external systems. > Combine records, conversations, and events for each customer or account