Metadata-Version: 2.4
Name: acta-sdk
Version: 1.0.0rc1
Summary: Python client for the Acta verifiable-memory REST API
License: MIT OR Apache-2.0
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Provides-Extra: sign
Requires-Dist: cryptography>=41; extra == "sign"
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.2; extra == "langchain"

# acta-sdk

Python client for **[Acta](https://github.com/Kylewilson04/acta)** —
verifiable, structured, portable agent memory built on a signed, per-tenant
ledger. Stdlib-only (no required runtime dependencies); optional Ed25519 signing
and a LangChain retriever.

## Install

```bash
pip install acta-sdk
# optional extras:
pip install "acta-sdk[sign]"       # faster Ed25519 via `cryptography`
pip install "acta-sdk[langchain]"  # LangChain retriever adapter
```

## Quickstart

```python
from acta_sdk import ActaClient

o = ActaClient("http://127.0.0.1:8088", tenant="t1")
o.write_intent(owner="u1", goal="keep acme renewal on track",
               scope=["business"], priority=95)

bundle = o.read_context(task="draft acme renewal email", scope=["business"])
# bundle carries a state_root + aea_id — proof of exactly what context was used
```

With authentication enabled on the server, pass the account API key (the tenant
is then taken from the key):

```python
o = ActaClient("https://acta.example.com", api_key="acta_sk_…")
```

## Signed writes (client-held trust root)

Construct with a signing key so each write is Ed25519-signed by *your* key, and
bind it to your account so the server enforces it:

```python
o = ActaClient(url, api_key="acta_sk_…", signing_key=my_seed)
o.set_authorship_key(o.authorship_public_hex)
```

## LangChain

```python
from acta_sdk.langchain import acta_retriever
retriever = acta_retriever(o, scope=["business"])
docs = retriever.invoke("draft the acme renewal email")
# each Document carries the bundle's aea_id + state_root, so retrieval stays auditable
```

## License

MIT OR Apache-2.0
