AMCS-0.1
Agent Memory Canonicalization Standard (AMCS) reference implementation.
Install
python -m pip install -e ".[dev,api]"
If you only need core library features:
python -m pip install -e ".[dev]"
Adopt In 1 Hour
- Create a SQLite store.
- Append events through
AMCSClient. - Read the memory root.
- Verify the chain.
- Optionally encrypt payload fields before append.
Minimal Append
from amcs import AMCSClient, SQLiteEventStore
store = SQLiteEventStore("./amcs.db")
client = AMCSClient(store=store, agent_id="agent-1")
result = client.append("interaction.append", {"message": "hello"})
print(result.sequence, result.event_hash, result.memory_root)
Verify Chain
from amcs import verify_chain
result = verify_chain(store, "agent-1")
assert result.ok
External Root Checkpoint (Optional)
Create a signed root receipt for external anchoring (for example: publish to an immutable log).
from amcs import b64encode, generate_keypair
private_key, public_key = generate_keypair()
checkpoint = client.create_root_checkpoint(
signer_private_key_b64=b64encode(private_key),
signer_kid="registry-main",
)
assert client.verify_root_checkpoint(
checkpoint=checkpoint,
signer_public_key_b64=b64encode(public_key),
)
Verification & Tamper Detection
For a full end-to-end tamper detection scenario, see:
tests/test_sdk_append_verify.py
Encrypt Field (Optional)
from amcs import encrypt_field
enc = encrypt_field(
b"secret",
key,
"kid-1",
{"agent_id": "agent-1", "event_id": "evt-1", "event_type": "interaction.append"},
)
Canonical JSON
from amcs import canonical_bytes, canonical_dumps
event = {"b": 1, "a": 2}
text = canonical_dumps(event) # {"a":2,"b":1}
data = canonical_bytes(event) # UTF-8 bytes
Optional API Service
from amcs.api import create_app
app = create_app("./amcs.db")
The API dependencies are installed with:
python -m pip install -e ".[api]"
Examples
examples/minimal_append.pyexamples/action_invoke.pyexamples/encrypted_interaction.py
Manual Acceptance Test (10 Minutes)
Run the human-legible acceptance test:
./scripts/manual_acceptance_test.sh
Detailed runbook:
docs/manual-acceptance-test-10min.md
Metadata
Release files for iap-amcs 0.1.0
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 |
|---|---|---|---|---|
| iap_amcs-0.1.0.tar.gz | 19.2 kB | Without provenance | Details for iap_amcs-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iap_amcs-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for iap_amcs-0.1.0-py3-none-any.whl |
Total release size: 36.2 kB
Release files / iap_amcs-0.1.0.tar.gz
| Download URL | iap_amcs-0.1.0.tar.gz |
|---|---|
| Size | 19.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2dd841445d921cd4c96ea0f248398d28133967e18dd2115a5a1f2f74394e8851
|
|
BLAKE2b-256 checksum How to use checksums |
557193df48bbb3e14c3325a4cc49cc0336b6e91f97c7e558c8cbb5384efa58f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Release files / iap_amcs-0.1.0-py3-none-any.whl
| Download URL | iap_amcs-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0358a76fdaf28d1d123361009a678f7ce0cb67b836743bdbc908c215c3c83fbd
|
|
BLAKE2b-256 checksum How to use checksums |
810eb0e0b3fc17f74dd4aefaaa6d28062a96742f2b0a575f3edade287483efb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Security for iap-amcs 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.