SDK Reference
Complete reference documentation for the MemoAir Python SDK. Each resource is documented with method signatures, parameters, and working examples.
Installation
pip install memoair
Resources
Client
client.client
Initialize the MemoAir client with your API key and configuration options.
Memories
client.memories
Add conversations and retrieve episodic memory context.
Search
client.search
Semantic search and tripartite cross-graph queries with HippoRAG.
Facts
client.facts
Create and manage explicit facts as semantic triplets with temporal reasoning.
Documents
client.documents
Upload and process documents for knowledge extraction.
Agent
client.agent
Conversational agent with tool use and approval workflows.
Ontology
client.ontology
Load and manage domain-specific schemas for structured extraction.
Quick Example
from memoair import MemoAir, Message
client = MemoAir()
# Add a conversation to memory
client.memories.add(
group_id="user:john",
messages=[
Message(content="I'm a Python developer", role_type="user"),
],
)
# Search the knowledge graph
results = client.search.tripartite(
query="What does John do?",
user_id="user:john",
)
for fact in results.get_all_facts():
print(f"- {fact.fact}")