seam-client
Build custom agents with SEAM-backed long-term memory without embedding the private SEAM runtime in your application.
seam-client is the public, Apache-2.0 Python SDK. It provides:
- synchronous and asynchronous clients
remember,recall, and context assembly- a framework-neutral prepare/complete turn lifecycle
- inspectable rendered context and opaque recalled-memory metadata
- typed, opaque response models
- bearer-token authentication and explicit error types
It does not contain the private SEAM runtime, MIRL implementation, HS/1 surface codecs, storage engine, ranking logic, benchmark holdouts, or model orchestration internals.
Install
python -m pip install seam-client
Version 2.0.0 adds the structured agent-turn lifecycle. To install directly from the public source repository instead:
python -m pip install \
"seam-client @ git+https://github.com/BlackhatShiftey/Seam_Runtime.git@main#subdirectory=sdk"
Use it in an agent
from seam_client import AgentMemory, SeamClient
client = SeamClient(
base_url="http://127.0.0.1:8765",
api_key="your-seam-token",
)
memory = AgentMemory(
client=client,
namespace="research-agent",
session_id="thread-42",
agent_id="researcher",
)
messages = [{"role": "user", "content": "What did we decide about licensing?"}]
turn = memory.prepare_turn(
messages,
user_input=messages[-1]["content"],
)
# Call your preferred model/provider with `turn.messages`.
assistant_output = "We separated the public SDK from the private runtime."
receipt = memory.complete_turn(turn, assistant_output)
AgentMemory does not choose or call a model. It supplies memory hooks that can
wrap your own OpenAI, Anthropic, local-model, or custom agent loop.
turn.context contains the rendered context. turn.memories contains the
typed, opaque memory records behind it, so an agent can log scores or build
citations without access to SEAM internals. prepare_turn copies the supplied
message mappings and never mutates the caller's list.
Use memory_query= when the best retrieval query differs from the raw user
input:
turn = memory.prepare_turn(
messages,
user_input="Compare those approaches.",
memory_query="licensing architecture alternatives",
)
The 0.1 hooks remain available: before_turn, after_turn,
system_message, and augment_messages.
Direct client
from seam_client import SeamClient
with SeamClient.from_env() as seam:
seam.remember(
"The operator prefers evidence-backed answers.",
namespace="my-agent",
session_id="thread-42",
)
recalled = seam.recall(
"answer style",
namespace="my-agent",
session_id="thread-42",
)
for memory in recalled.memories:
print(memory.text, memory.score)
Environment variables:
SEAM_BASE_URL— defaults tohttp://127.0.0.1:8765SEAM_API_TOKEN— optional bearer token for the configured server
Async client
from seam_client import AsyncAgentMemory, AsyncSeamClient
async with AsyncSeamClient.from_env() as client:
memory = AsyncAgentMemory(
client=client,
namespace="async-agent",
session_id="thread-7",
)
turn = await memory.prepare_turn(
[{"role": "user", "content": "What should I remember?"}],
user_input="What should I remember?",
)
# assistant_output = await your_model(turn.messages)
# await memory.complete_turn(turn, assistant_output)
Partitions
namespaceisolates one agent or application from another.session_idisolates a specific conversation or run.scopeis semantic and defaults tothread. Supported server scopes areephemeral,global,org,project,thread, anduser.
The server maps public partitions into an SDK-only internal namespace. Public
responses use opaque rcpt_... and mem_... identifiers.
Hosted access
The SDK is public. A hosted SEAM endpoint is not implied by installing it. Use a SEAM server URL and token you have been given, or run an authorized local SEAM server. Hosted access remains separately provisioned.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file seam_client-2.0.0.tar.gz.
File metadata
- Download URL: seam_client-2.0.0.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37af38068982fa44d54ab0a5ed696319d4711a6d8a18dbf004a1123a2aac7096
|
|
| MD5 |
3c9b622b16655dae8c735580d7f6064d
|
|
| BLAKE2b-256 |
e35aa9672e6a166d11a03bced5ca9750ec1759ebfe2b65dc90225ae07b41403e
|
Provenance
The following attestation bundles were made for seam_client-2.0.0.tar.gz:
Publisher:
sdk-publish.yml on BlackhatShiftey/Seam_Runtime
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
seam_client-2.0.0.tar.gz -
Subject digest:
37af38068982fa44d54ab0a5ed696319d4711a6d8a18dbf004a1123a2aac7096 - Sigstore transparency entry: 2277540742
- Sigstore integration time:
-
Permalink:
BlackhatShiftey/Seam_Runtime@0d7ec37d386c30fe63f8ca28bccb2e741ff4e983 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/BlackhatShiftey
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-publish.yml@0d7ec37d386c30fe63f8ca28bccb2e741ff4e983 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file seam_client-2.0.0-py3-none-any.whl.
File metadata
- Download URL: seam_client-2.0.0-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03585afd5e6e42168cf24e47c703b8bf8a77a72b92e56b4efdb9421811cc372f
|
|
| MD5 |
e4d25e07ae14d940eda95fee4081cbdb
|
|
| BLAKE2b-256 |
bf46583d00f0723759a2293813182def008da110f3397a56e56bee2ff7cea584
|
Provenance
The following attestation bundles were made for seam_client-2.0.0-py3-none-any.whl:
Publisher:
sdk-publish.yml on BlackhatShiftey/Seam_Runtime
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
seam_client-2.0.0-py3-none-any.whl -
Subject digest:
03585afd5e6e42168cf24e47c703b8bf8a77a72b92e56b4efdb9421811cc372f - Sigstore transparency entry: 2277540798
- Sigstore integration time:
-
Permalink:
BlackhatShiftey/Seam_Runtime@0d7ec37d386c30fe63f8ca28bccb2e741ff4e983 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/BlackhatShiftey
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-publish.yml@0d7ec37d386c30fe63f8ca28bccb2e741ff4e983 -
Trigger Event:
workflow_dispatch
-
Statement type: