GitHub
Examples

Observability

Monitor memory system health, view access logs, and track metrics.

Ops Module
Scenario: Auditing memory access

When to Use

Memory systems are often black boxes. Observability gives you transparency into what the agent is remembering and recalling. Perfect for:

  • Debugging "Why did the agent say that?"
  • Privacy auditing (Who accessed PII?)
  • Monitoring system performance and health

Key Operations

get_stats()

View storage/usage metrics

get_access_logs()

Audit trail of memory reads

Code Example

Retrieve stats for the Knowledge Graph and check who accessed memory recently.

# 1. Get Memory Stats
stats = client.memory.observability.get_stats(
kg_name="KG_Companion_Demo",
time_window_hours=24
)
print(f"Facts stored: {stats['fact_count']}")
# 2. Audit Access Logs
logs = client.memory.observability.get_access_logs(
user_id="emma_2024",
limit=5
)
for log in logs:
print(f"Access: {log.action} on {log.item_id} at {log.timestamp}")

Key Takeaways

  • Transparency: Builds trust by showing exactly what data is being used.
  • Compliance: Essential for GDPR/privacy to prove who accessed user data.
  • Includes get_module_health() to verify if subsystems (like Vector DB) are up.