Support agents that remember every customer interaction. No more asking customers to repeat themselves.
Every new session starts from zero. Customers explain their issue again and again across channels and agents.
When a customer returns, the AI has no idea about previous interactions, resolutions, or preferences.
Without history, the AI gives cookie-cutter answers instead of personalized solutions based on the customer's product usage.
Agents spend time gathering context instead of solving problems. Each ticket starts from scratch.
Semantic memory stores customer preferences, plan details, and product usage. Episodic memory recalls past issues and resolutions.
Every interaction enriches the customer's memory. Next time they reach out, the AI already knows their history.
Cognitive Profile generates a system prompt with everything known about the customer — preferences, history, and escalation patterns.
Procedural memory captures resolution workflows that improve from failures. The AI learns the best process for each issue type.
from mengram import Mengram
from openai import OpenAI
m = Mengram(api_key="mg-...")
openai = OpenAI()
def handle_ticket(customer_id: str, message: str):
# Get full customer context in one call
profile = m.profile(user_id=customer_id)
past_issues = m.search(message, user_id=customer_id, top_k=3)
context = "\n".join([r.memory for r in past_issues])
response = openai.chat.completions.create(
model="gpt-4o",
messages=[
{"role": "system", "content": profile},
{"role": "user", "content": f"Past issues:\n{context}\n\nNew message: {message}"}
]
)
# Store this interaction for future context
m.add(f"Customer: {message}\nAgent: {response.choices[0].message.content}",
user_id=customer_id)
return response.choices[0].message.content
Faster resolution
Customer satisfaction
Context switching
Free API key. No credit card required. Start in 60 seconds.