Skip to content

Python thin REST client (agentmemory-py) #342

Closed

Description

@rohitg00

Problem

The agentmemory daemon speaks plain REST on :3111, but the only first-party client is TypeScript (@agentmemory/agentmemory). Python users — data-science notebooks, LangChain / LlamaIndex glue, Django backends — currently requests.post by hand or copy the curl examples from the README.

Proposed approach

Ship agentmemory-py as a thin, dependency-light REST client. No business logic, no embedding logic — the daemon owns all of that.

Layout:

agentmemory-py/
├── agentmemory/
│   ├── __init__.py        # Client
│   ├── _http.py           # httpx wrapper, timeouts, retries, auth
│   └── _types.py          # TypedDicts mirroring REST envelopes
├── tests/
│   └── test_client.py     # respx-mocked
├── pyproject.toml
└── README.md

Surface:

from agentmemory import Client

c = Client(base_url="http://localhost:3111")          # default
c.remember(content="…", project="x", title="…")
c.smart_search(query="…", project="x", limit=10)
c.memories(project="x", latest=True)
c.forget(id="…")
c.health()                                            # GET /livez

Acceptance

  • pip install agentmemory works.
  • 100% of REST endpoints exposed as methods.
  • Typed responses (TypedDict, no Pydantic dep).
  • Bearer-token auth honoured; plaintext-bearer guard from v0.9.12 ported (warn on http + non-loopback, refuse if AGENTMEMORY_REQUIRE_HTTPS=1).
  • Tests pass against respx and a live local daemon.
  • Published to PyPI via trusted publisher.

Out of scope

  • Async-only or sync-only — ship both via Client / AsyncClient.
  • Embedded server. Python client is a client, not a server.
  • LangChain / LlamaIndex adapters — separate packages, separate issues.

Activity

  1. added a commit that references this issue on May 13, 2026
    f365d38
  2. added a commit that references this issue on Jul 20, 2026
    96e182b
  3. added a commit that references this issue on Jul 27, 2026
    d1f6c55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestsdkSDK / client library

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions