Skip to main content

Official Python SDK and MCP server for the Unified Agent Memory System (UAMS).

Project description

UAMS Shared Memory SDK

A unified, asynchronous Python SDK for the Unified Agent Memory System (UAMS). Designed to be shared natively by both Hermes and OpenClaw agents.

Features

  • Unified Client: One standard interface for all agents.
  • Async First: Built on httpx for non-blocking operations.
  • Intelligent Caching: Built-in TTL caching with automatic invalidation on writes.
  • Full API Coverage: Semantic search, graph traversal, context compression, and writes.
  • MCP Adapter: Exposes UAMS as standard MCP tools, resources, and prompts for agent tool discovery.

Installation

pip install -e .

Usage

import asyncio
from uams_sdk import UAMSClient

async def main():
    client = UAMSClient(base_url="http://localhost:8000")
    task = "How do I fix Docker file locks?"

    # Default preflight before the agent works.
    memory = await client.begin_task(task)
    print(memory["context"])

    # Default write-back after durable work.
    await client.end_task(
        task=task,
        outcome="Documented the Docker file-lock workaround.",
        entities=["Docker File Locks"],
        tags=["#procedure"],
    )

asyncio.run(main())

MCP Server

Run the adapter from the repository root:

./uams mcp

Or run the installed console entry point:

UAMS_API_URL=http://localhost:8000 uams-mcp

Agent MCP config:

{
  "mcpServers": {
    "uams": {
      "command": "/absolute/path/to/unified_memory/uams",
      "args": ["mcp"],
      "env": {
        "UAMS_API_URL": "http://localhost:8000"
      }
    }
  }
}

Generate snippets from the repository root:

./uams mcp-config all
./uams mcp-config codex
./uams mcp-config json

Discovered MCP capabilities:

  • Tools: begin_task, end_task, health, search_memory, get_context, get_procedures, remember, get_related_entities, summarize_memory, store_fix_summary
  • Resource: uams://memory-policy
  • Prompt: use_uams_memory

Agent default protocol:

Before each non-trivial task, call `begin_task`.
During work, call `search_memory` when more recall is needed.
After durable work, call `end_task`.
Never store raw transcripts; store distilled facts, decisions, fixes, and procedures.

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

uams_sdk-1.0.2.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

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

uams_sdk-1.0.2-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file uams_sdk-1.0.2.tar.gz.

File metadata

  • Download URL: uams_sdk-1.0.2.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for uams_sdk-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d047cf219805454573fdda8b52fd347f92d82c9f1e3aa4a243f98b5617de9da1
MD5 b931cbd77b5cf1986a24c06cc7237198
BLAKE2b-256 6be8fb71ae4a1dc06c051d4aba670c2e35f9d020dec260fe09228967747e73de

See more details on using hashes here.

File details

Details for the file uams_sdk-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: uams_sdk-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for uams_sdk-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 12491a75936e75668ccac206ddc2180b9a7a137538b0a8c02c834f739b65d8da
MD5 24aaa72f77c22fb5b4b014a4e2276898
BLAKE2b-256 6cfe4a4a3be8d7aef2660840a074a3155b7ca5df27f63e35c3880c8a37785725

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