Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.5.1 instead.
Reason given by maintainers: Superseded; no longer maintained. Use caura-client instead

memclaw-client

Official Python client for MemClaw — governed shared memory for AI agent fleets (multi-agent, multi-tenant, MCP-native).

A thin wrapper over the MemClaw REST API. Point it at a managed (https://memclaw.net) or self-hosted (http://localhost:8000) deployment.

Install

pip install memclaw-client

Quickstart

from memclaw_client import MemClaw

mc = MemClaw("mc_xxx", tenant_id="my-team", agent_id="my-agent")

# Write a memory — enriched server-side with type, title, tags, importance.
mc.write("Q3 revenue target is $4M, set on 2026-04-15.")

# Search (ranked raw results)
for m in mc.search("Q3 revenue target", top_k=5):
    print(m.title, "—", m.content)

# Recall (LLM-synthesized context brief)
print(mc.recall("Q3 revenue target").summary)

Self-hosted? Pass base_url:

mc = MemClaw("standalone", tenant_id="default", base_url="http://localhost:8000")

API

Method Endpoint Returns
write(content, ...) POST /api/v1/memories Memory
search(query, top_k=5, ...) POST /api/v1/search list[Memory]
recall(query, top_k=5, ...) POST /api/v1/recall RecallResult
health() GET /api/v1/health dict

The client is a context manager (with MemClaw(...) as mc:) and raises AuthError (401/403), NotFoundError (404), or MemClawAPIError on failures. Every result also exposes the full API payload on .raw.

For credentials, scopes, and the full API surface, see the MemClaw docs. Production fleets should use per-agent keys.

memclaw-interviewer — Claude Code + Cursor adapter

Installing this package also provides the memclaw-interviewer CLI: the MemClaw Interviewer's disk-parser adapter for Claude Code and Cursor workstations. It reads agent session transcripts read-only — Claude Code's ~/.claude/projects/…/*.jsonl or Cursor's ~/.cursor/projects/…/agent-transcripts/…/*.jsonl — tracks a per-file cursor via the server's forward-only watermark documents (no local state), and submits event windows to POST /api/v1/interview/submit, where MemClaw synthesizes them into typed memories. Requires the tenant to have interviewer.enabled = true.

export MEMCLAW_API_KEY=mc_xxx MEMCLAW_TENANT_ID=my-team
export MEMCLAW_INTERVIEWER_PROJECTS="-Users-me-work-*"   # allowlist, default-deny

memclaw-interviewer status --since-hours 24     # cursors vs. local line counts
memclaw-interviewer run --dry-run -v            # parse + window, submit nothing
memclaw-interviewer run --max-windows 8         # submit due windows
memclaw-interviewer run --harness cursor        # harvest Cursor instead (or
                                                # MEMCLAW_INTERVIEWER_HARNESS=cursor)

Privacy: default-deny — with no allowlist the CLI lists discovered project dirs and exits with guidance; --all-projects is the explicit opt-in. Credential-shaped strings are scrubbed locally before anything leaves the machine, and the server masks PII again on receipt.

Triggers: run it from cron, or wire the harness's session-end hook so a session is interviewed the moment it ends (a failed harvest never fails the session — the hook always exits 0). The SAME hook command serves both harnesses: each sends transcript_path on stdin, and the harness is inferred from the path shape.

Claude Code (~/.claude/settings.json):

{ "hooks": { "SessionEnd": [ { "hooks": [
  { "type": "command", "command": "memclaw-interviewer hook", "timeout": 300 }
] } ] } }

Cursor (~/.cursor/hooks.json):

{ "version": 1, "hooks": {
  "sessionEnd": [ { "command": "memclaw-interviewer hook" } ]
} }

Schedule the cron in one command. Rather than hand-editing crontab, install writes an idempotent cron entry (and a 0600 env file it sources, since cron doesn't inherit your shell environment). Config comes from the same flags/env as run:

memclaw-interviewer install --interval 30m        # add --harness cursor for Cursor
memclaw-interviewer uninstall                      # removes the entry + env file

It refuses to schedule a job that would no-op (missing credentials or no project allowlist). On Windows (no crontab), use Task Scheduler to run memclaw-interviewer run on a timer instead.

Crash-safety is inherited from the Interviewer protocol: the watermark advances only after the server commits a window, and retries of the same window dedup server-side via a deterministic attempt id — never a gap, never a duplicate.

License

Apache-2.0

Metadata

Release files for memclaw-client 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for memclaw-client 0.4.0
File Size Uploaded Provenance
memclaw_client-0.4.0.tar.gz 46.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for memclaw-client 0.4.0
File Interpreter ABI Platform
memclaw_client-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 80.2 kB

Release files / memclaw_client-0.4.0.tar.gz

Download URL memclaw_client-0.4.0.tar.gz
Size 46.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fbfb359adb83c5c329d6440f0aab1bd25dcfd5752e9260c8b5ed8b32ddbc8a30
BLAKE2b-256 checksum
How to use checksums
e479dafff236871496e1892c5cdb6ce2e45ebbe9b29fab488af8eadd800dfead
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release files / memclaw_client-0.4.0-py3-none-any.whl

Download URL memclaw_client-0.4.0-py3-none-any.whl
Size 34.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15e7b0c48921fc638119bb62b375dc06e52e932ef6709c029d73a26c9cae6e3e
BLAKE2b-256 checksum
How to use checksums
f8de9df438d4f7fbfecc446fdb294edbd8e275088281f0b29fe9616ceb8fa093
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Security for memclaw-client 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for memclaw_client-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page