stratavell (Python client)
A small, dependency-free Python client for the Stratavell HTTP API. Stratavell is a context management engine for long-running LLM agents, with asynchronous compaction, losslessly retrievable history, cache-aware context assembly and persistent task state.
This package is only the client. It talks to a running stratavell serve, over TCP or a Unix socket.
Install
pip install stratavell
Start the engine with a release binary, the Docker image, or go install github.com/TobiasLogic/stratavell/cmd/stratavell@latest:
stratavell serve --db memory.db --socket /tmp/stratavell.sock
Use
from stratavell import Client, text, tool_call, tool_result
client = Client(socket_path="/tmp/stratavell.sock")
agent = client.session("task-42").agent("main")
agent.append(
text("user", "Find why the build fails. Do not touch the generated/ directory."),
tool_call("c1", "bash", {"command": "make build"}),
tool_result("c1", "bash", "main.c:12:5: error: implicit declaration of function 'parse_cfg'", exit_code=2, command="make build"),
)
request = agent.assemble(system="You are a coding agent.", fmt="anthropic", model="claude-sonnet-5-5", max_tokens=4096)
print(request["tokens"], "tokens")
for hit in agent.search("parse_cfg"):
print(hit["id"], hit["snippet"])
Each turn follows the same loop:
- Send
request["request"]to your provider. - Report the provider's token counts with
agent.usage(...). - Append the assistant's reply and the tool results.
- Execute
memory_*tool calls withagent.tool(name, arguments).
Use Client(base_url="http://127.0.0.1:7077") for TCP. Set STRATAVELL_TOKEN, or pass token=, when the server requires a bearer token.
The full loop is in the integration guide. The HTTP API is specified in openapi.yaml.
License
Apache-2.0
Metadata
Release files for stratavell 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| stratavell-0.1.2.tar.gz | 7.9 kB | With provenance | Details for stratavell-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stratavell-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for stratavell-0.1.2-py3-none-any.whl |
Total release size: 16.1 kB
Release files / stratavell-0.1.2.tar.gz
| Download URL | stratavell-0.1.2.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50e91d25b443e024275799a47b607e004df533e4397f5d0c9d7b1c4d8216639e
|
|
BLAKE2b-256 checksum How to use checksums |
56744c66dd1c4aa92afac76d420c40579c72ecef17309dfb684b3cacdc79890a
|
| 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 Nov 26, 2026.
Transparency logRelease files / stratavell-0.1.2-py3-none-any.whl
| Download URL | stratavell-0.1.2-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f06b1ef881a41c20e927a2053866c2a43f6fb56199adaf925027ebf7a022bdac
|
|
BLAKE2b-256 checksum How to use checksums |
43b9617ea31550268b18cd63a1f172898e45cf805cc6c2e83cfa6d2130131d97
|
| 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 Nov 26, 2026.
Transparency logSecurity for stratavell 0.1.2
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.
Attestation for stratavell-0.1.2.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 Nov 26, 2026.
Transparency logA 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.