SDK · Python

Give your Python workflow a memory.

Keep the useful results of a run available to the next one. The Minds Python SDK lets your scripts and applications record events, retrieve stored information, and query relationships in a dedicated Mind.

Python · across sessions

The kernel restarts. The work carries on.

Save a useful result to your Mind. Retrieve it in another process.

release-review.ipynbAll changes saved
Python 3
CodeSESSION B
[ ]

# Save the decision to the Mind.

{"name": "remember", "arguments": {
    "content": "We chose weekly releases.",
    "context": {"source": "launch-review"}
}}
Out [7]{"stored": true}
Kernel restarted · local variables cleared
[1]

# New session. Reconnect to the same Mind.

{"name": "recall", "arguments": {
    "query": "What release schedule did we choose?", "limit": 5
}}
Out [1]

We chose weekly releases.

Ask for it from a new session.

Reconnect to the same instance and use recall. A new notebook run can retrieve the decision saved by the earlier one.

Choose a chapter to explore

Example notebook payloads for /v1/mcp/tools/call. The HTTP example below shows the instance URL and authentication; your code chooses what to save.

Capabilities

From a script to a lasting record.

Record a deployment, look up a project fact, or manage a backup from Python. The client separates account administration from the data and memory stored inside each Mind.

01

Connect with familiar Python.

Create a client with your API URL and token. Synchronous calls fit into scripts, jobs, and existing Python applications.

02

Work inside a specific Mind.

Choose an instance URL to access its records, memory, graph, and model operations.

03

Keep administration close.

Use the account-management client for backups and monitoring alongside your application’s data workflow.

04

Get guidance in your editor.

Type annotations make method inputs easier to discover and support static checks as your integration grows.

05

Keep a history of events.

Record what happened and its context, such as a deployment result or a customer interaction, in episodic memory.

06

Follow the relationships.

Look up a known graph record or query connections between people, projects, and events.

Client

Find a decision from Python.

This Python HTTP example uses httpx to search existing memories on a Mind with MCP enabled. Set AKASHA_URL to the instance endpoint, AKASHA_TOKEN to your access token, and AKASHA_CAPABILITY to a signed credential with memory-read permission.

Memory request · Pythonpython
import os
import httpx

response = httpx.post(
    os.environ["AKASHA_URL"].rstrip("/") + "/v1/mcp/tools/call",
    headers={
        "Authorization": "Bearer " + os.environ["AKASHA_TOKEN"],
        "X-Akasha-Capability": os.environ["AKASHA_CAPABILITY"],
    },
    json={
        "name": "recall",
        "arguments": {"query": "What release schedule did we choose?", "limit": 5},
    },
)
response.raise_for_status()
output = response.json()
if output["is_error"]:
    raise RuntimeError("Memory tool failed")
print(output["result"]["memories"])
Package

Add Minds to your Python project.

At a glance
Package
akasha-sdk
Import
akasha
Python
3.10+
Types
Type annotations included
HTTP
httpx · JSON

Carry the result into your next run.

Connect your Python application to a dedicated Mind and save your first event.