Skip to main content

Python client for the Recallio API

Project description

Recallio Python Client

Recallio – AI-Powered Contextual Memory & Knowledge-Graph API

Store, index, and retrieve application “memories” with built-in fact extraction, dynamic summaries, reranked recall, and a full knowledge-graph layer.

🔧 Core Capabilities

  • Embeddings-backed Storage: Fast semantic write & recall.

  • LLM-Driven Insights: Fact extraction, reranking, summarization.

  • Full Lifecycle Management: Write, recall, delete, export.

  • Knowledge Graph: Entities, relationships, and powerful graph queries.

  • OpenAPI-First: Auto-generated Swagger docs and client libs.

Lightweight Python wrapper for the Recallio API.

Installation

pip install recallio

Quick start

from recallio import RecallioClient

client = RecallioClient(api_key="YOUR_RECALLIO_API_KEY")

Memory API

Write memory

from recallio import MemoryWriteRequest

req = MemoryWriteRequest(
    userId="user_123",
    projectId="project_abc",
    content="The user prefers dark mode and wants notifications disabled on weekends",
    consentFlag=True,
)
client.write_memory(req)

You can also pass a JSON object or array for content:

req_json = MemoryWriteRequest(
    userId="user_123",
    projectId="project_abc",
    content=[{"role": "assistant", "content": "What is your name ?"},{"role": "user", "content": "My name is Guillaume"}],
    consentFlag=True,
)
client.write_memory(req_json)

Note: when content is not a string, it must be either a dict like { "role": "assistant", "content": "..." } or a list of such dicts. The client validates and automatically JSON-serializes this format before sending.

Ingest document

from recallio import DocumentIngestRequest

ingest_req = DocumentIngestRequest(
    file_path="/path/to/file.pdf",
    userId="user_123",
    projectId="project_abc",
    consentFlag=True,
)
client.ingest_document(ingest_req)

Recall memories

from recallio import MemoryRecallRequest

recall_req = MemoryRecallRequest(
    projectId="project_abc",
    userId="user_123",
    query="dark mode",
    scope="user",
    reRank=True,
)
results = client.recall_memory(recall_req)
for m in results:
    print(m.content, m.similarityScore)

Recall summary

from recallio import RecallSummaryRequest

summary_req = RecallSummaryRequest(
    projectId="project_abc",
    userId="user_123",
    scope="user",
)
summary = client.recall_summary(summary_req)
print(summary.content)

Recall topics

from recallio import RecallTopicsRequest

topics_req = RecallTopicsRequest(userId="user_123")
topics = client.recall_topics(topics_req)
print(topics.topics)

Delete memories

from recallio import MemoryDeleteRequest

delete_req = MemoryDeleteRequest(scope="user", userId="user_123")
client.delete_memory(delete_req)

Export memories

from recallio import MemoryExportRequest

export_req = MemoryExportRequest(type="fact", format="json", userId="user_123")
json_data = client.export_memory(export_req)

Graph Memory API

Add data to the graph

from recallio import GraphAddRequest

graph_req = GraphAddRequest(
    data="John works at OpenAI in San Francisco",
    user_id="user_123",
    project_id="project_abc",
)
response = client.add_graph_memory(graph_req)
print(response.added_entities)

Search the graph

from recallio import GraphSearchRequest

search_req = GraphSearchRequest(query="Where does John work?", user_id="user_123")
graph_results = client.search_graph_memory(search_req)
for r in graph_results:
    print(r.source, r.relationship, r.destination)

Get all relationships

relationships = client.get_graph_relationships(user_id="user_123")

Delete all graph data

client.delete_all_graph_memory(user_id="user_123")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

recallio-1.2.7.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

recallio-1.2.7-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file recallio-1.2.7.tar.gz.

File metadata

  • Download URL: recallio-1.2.7.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.6

File hashes

Hashes for recallio-1.2.7.tar.gz
Algorithm Hash digest
SHA256 bb3d93340ab76fcef0508aaff9a07e9ccb95d4e55a6f1eadac3caee921d7353e
MD5 87d1a0ff010021eb1ac3ffdcf08c50e4
BLAKE2b-256 a6b0737d2c7082981ac93b8740c70a41e81033083e5668dfefce6d5dca581c45

See more details on using hashes here.

File details

Details for the file recallio-1.2.7-py3-none-any.whl.

File metadata

  • Download URL: recallio-1.2.7-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.6

File hashes

Hashes for recallio-1.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6cc45f8dace0a03567de5202ae647b22465afb1644b76a1ef0f5f88cada5746d
MD5 afab63702ef3074f1cbf181059df5cc7
BLAKE2b-256 7451825b98ca8548ff2232d2ea7e972f71536ee4e0bf89a07c674068e50edafe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page