Skip to main content

agentsam-sdk (Python)

Core repository/data commands remain stdlib-only (dependencies = []). Rich is an optional renderer dependency used by the SDK's internal terminal preview lab; it is not exposed as an installed-user renderer command.

pip install agentsam-sdk            # stdlib-only core
pip install "agentsam-sdk[tui]"     # optional Rich terminal renderer
agentsam repository inventory --repo-root /path/to/repo --format json

Requires Python 3.10+. For development from a checkout: cd python && pip install -e . then python -m unittest discover -s tests -v.

AgentSamClient.invoke()

The repository, data, hooks and agentsam CLI tools run entirely in Python. The local SAM client (AgentSamClient) delegates to the Node SAM kernel, so it needs Node 20+ and the npm package in the project or a parent directory:

npm install @inneranimalmedia/agentsam-sdk

The bridge is found automatically from the working directory. It is read-only by design: write, D1, CMS and terminal operations are refused (sam_bridge_operation_not_allowed). Without the npm package, invoke() raises sam_bridge_not_installed.

Protocol: ../protocol/README.md.

Portable lifecycle hooks

agentsam_sdk.hooks implements the same agentsam.hook.v1 envelope as the JavaScript/TypeScript, Go, Rust, command, and HTTP adapters. It is stdlib-only:

from agentsam_sdk.hooks import HookRuntime

hooks = HookRuntime()
hooks.register("pre_tool_use", lambda envelope: {
    "permission_decision": "allow"
})
result = await hooks.dispatch("pre_tool_use", {
    "tool_name": "repository.snapshot", "tool_args": {}
})

See ../packages/agentsam-hooks/README.md for composition, permission, and subprocess transport rules.

Optional sibling packages (not part of stdlib core)

Package Path Notes
agentsam-site-scrape ../packages/agentsam-site-scrape/ Optional/network (requests); crawl→R2. Dual-homed with IAM tools/agentsam-site-scrape/. Does not fold into agentsam_sdk.

Internal Rich renderer preview

The npm SDK owns the public interactive experience. For renderer development only:

cd ..
npm run ui:preview -- tour
npm run ui:preview -- thinking

The Python module can also be invoked directly after installing the optional extra:

cd python
pip install -e '.[tui]'
PYTHONPATH=. python -m agentsam_sdk.tui --scene dashboard --check

agentsam_sdk.tui is presentation-only. It does not define tools, execution policy, or public CLI vocabulary.

Metadata

Release files for agentsam-sdk 0.1.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 agentsam-sdk 0.1.0
File Size Uploaded
agentsam_sdk-0.1.0.tar.gz 77.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentsam-sdk 0.1.0
File Interpreter ABI Platform
agentsam_sdk-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 160.4 kB

Release files / agentsam_sdk-0.1.0.tar.gz

Download URL agentsam_sdk-0.1.0.tar.gz
Size 77.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3a68edef478478535a88c43fa28ada66609dd7905a9d8fff1362deb7e304a1a5
BLAKE2b-256 checksum
How to use checksums
8c7b12fc720bd5479dc32a08fb6c291381d19f12d6c367554645681a752063c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 19, 2026.

Transparency log

Release files / agentsam_sdk-0.1.0-py3-none-any.whl

Download URL agentsam_sdk-0.1.0-py3-none-any.whl
Size 82.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6a95a65ff5262dfbabe4a31af6237c6f7489d98c8548457ebb80f7ccad88f50
BLAKE2b-256 checksum
How to use checksums
f6bf15d418ac9673788ef0f9a820458d04c526cb22cbb70b50230f848dacb5f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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