Skip to main content

jennah-sdk-py

The Python SDK for Jennah, the memory and context platform for AI agents.

pip install jennah-sdk-py

Store and recall a memory

Sign in once with the jnh CLI (jnh login), or set JENNAH_API_KEY. Then:

import uuid

from jennah import Client
from jennah.agent.v1 import agent_pb2, memory_pb2

with Client() as client:  # uses `jnh login`, or $JENNAH_API_KEY
    agent_id = f"quickstart-{uuid.uuid4().hex[:8]}"
    client.agents.CreateAgent(
        agent_pb2.CreateAgentRequest(agent_instance_id=agent_id)
    )
    agent = client.agent(agent_id)

    # Store a memory. The platform embeds raw_content for you.
    agent.vectors.upsert(memory_pb2.VectorChunk(
        chunk_id="pref-1",
        raw_content="The customer prefers invoices in Japanese yen, "
        "sent on the 5th.",
    ))

    # Recall it by meaning, not by keyword.
    result = agent.vectors.search(memory_pb2.SemanticQuery(
        query_text="what currency does the customer want to be "
        "billed in?",
        limit=3,
    ))
    for m in result.matches:
        print(f"{m.distance:.3f}  {m.raw_content}")

    client.agents.DeleteAgent(
        agent_pb2.DeleteAgentRequest(agent_instance_id=agent_id)
    )
0.235  The customer prefers invoices in Japanese yen, sent on the 5th.

Async

AsyncClient has the same operations, awaited, over grpc.aio. Nothing it does blocks the event loop, credential renewal included.

import asyncio

from jennah import AsyncClient
from jennah.agent.v1 import memory_pb2


async def main():
    async with AsyncClient() as client:
        query = memory_pb2.SemanticQuery(
            query_text="billing preferences", limit=3
        )
        result = await client.agent("my-agent").vectors.search(query)
        print(result.matches)


asyncio.run(main())

Use Client in scripts, notebooks and evaluation harnesses; use AsyncClient inside an agent framework or any other asyncio program.

Every operation, already authenticated

Each service in the API is a generated stub on the client, already bound to the credentialed connection, so every operation is callable without a wrapper:

from jennah.agent.v1 import scope_pb2

client.scopes.ListScopes(scope_pb2.ListScopesRequest())
client.memory.InspectMemory(...)
client.datasets.ListDatasets(...)

The services are agents, memory, scopes, datasets, schema, data, auth, approvals, billing and platform. For a service added after your SDK version, client.stub(SomeServiceStub) binds it the same way. Never build your own channel to reach one: you would lose credential renewal.

client.agent(id) adds the memory shortcuts, each one single-section call: memory.commit(...) and memory.query(...) (any request field, as keywords), logs.create/logs.recent, vectors.upsert/vectors.search, and graph.write/graph.query.

Credentials

The client takes the first credential it finds, in this order:

  1. credentials=, a source your program supplies.
  2. api_key=.
  3. The JENNAH_API_KEY environment variable.
  4. The session stored by jnh login.

A signed-in session renews itself: a rejected call is renewed once and retried, and the renewed session is written back to the shared credentials file, so jnh on the same machine stays signed in. client.credential reports what authenticated the client, and where it came from, without the secret.

Development

The generated code is not committed. With jennah-api checked out next to this repository:

scripts/dev-generate.sh      # generate and lay the stubs and conformance suite in place
pip install -e '.[test]'
pytest

Metadata

Release files for jennah-sdk-py 0.76.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 jennah-sdk-py 0.76.0
File Size Uploaded Provenance Actions
jennah_sdk_py-0.76.0.tar.gz 130.7 kB With provenance Details for jennah_sdk_py-0.76.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jennah-sdk-py 0.76.0
File Interpreter ABI Platform Actions
jennah_sdk_py-0.76.0-py3-none-any.whl Python 3 none any Details for jennah_sdk_py-0.76.0-py3-none-any.whl

Total release size: 266.6 kB

Release files / jennah_sdk_py-0.76.0.tar.gz

Download URL jennah_sdk_py-0.76.0.tar.gz
Size 130.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f66c0d51d590118bb81b1772c24319db08fe84611882afb260a2c2041bb83b68
BLAKE2b-256 checksum
How to use checksums
4daec35c5a05664f2d2711b33046a424e401f2d1dd93f4a5a7c6d1696204f389
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / jennah_sdk_py-0.76.0-py3-none-any.whl

Download URL jennah_sdk_py-0.76.0-py3-none-any.whl
Size 135.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e554f90612c3dd8d71347b4c79778892063480f88ae8da1ca695f96e9fcb40df
BLAKE2b-256 checksum
How to use checksums
7db774f9d89565e2ee856ea2bff4088d052d06d9d4a354e0be1eb6fc5c016589
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Security for jennah-sdk-py 0.76.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for jennah_sdk_py-0.76.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 Oct 26, 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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