Skip to main content

garrison-sdk

Governed, traced AI agents on Anvil (tool governance) and Agent Forge (agents). Declare apps, tools, agents and flows once; every run is checked by Anvil, executed by Agent Forge and traced end to end under one trace_id.

This is the SDK. The control plane (accounts, versioned prompts, app keys, dashboards) is garrison-hq.

Install

pip install garrison-sdk                 # OpenAI-backed agents
pip install "garrison-sdk[anthropic]"    # + agents on Anthropic models

Install garrison-sdk, import garrison: the install name and the import name differ. Python 3.11 or newer. It brings garrison-anvil (imported as anvil) and garrison-forge (imported as agent_forge); for those two the install and import names differ. Garrison was called Bastion before its first release; see the changelog for what changed.

Quickstart

garrison.yaml:

apps:
  ironclad:
    base_url: http://localhost:8765
    tools:
      get_accounts: {path: /accounts, method: GET, trust: trusted, description: List the user's bank accounts.,
                     parameters: {type: object, properties: {user_id: {type: string}}, required: [user_id]}}
agents:
  ironclad.support_agent:
    instructions: You are Ironclad's support agent for user_id "demo". Look up accounts before answering.
    prompt_version: v1
    tools: [get_accounts]
import asyncio
from garrison import Platform

async def main():
    platform = Platform.from_config("garrison.yaml", app="ironclad")
    reply = await platform.run_agent("support_agent", "What accounts do I have?")
    print(reply.content, reply.status, reply.trace_id)

asyncio.run(main())

Set OPENAI_API_KEY first. The run's input, every tool call and the output are checked by Anvil, and the full trace is appended to ./garrison_traces.jsonl. A runnable version with a stand-in bank API is in examples/quickstart.

Remote mode

Run on the bundle a garrison-hq service publishes for the key's app; prompt edits there reach the running app without a restart:

platform = Platform.from_service(os.environ["GARRISON_URL"], api_key=os.environ["GARRISON_KEY"])

More

Sessions, flows, grants and credentials, agent-to-agent calls (garrison.a2a), the dashboard sink and the config reference are in the full README.

License

Apache License 2.0. See LICENSE.

Metadata

Release files for garrison-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 garrison-sdk 0.1.0
File Size Uploaded Provenance Actions
garrison_sdk-0.1.0.tar.gz 46.2 kB With provenance Details for garrison_sdk-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 96.1 kB

Release files / garrison_sdk-0.1.0.tar.gz

Download URL garrison_sdk-0.1.0.tar.gz
Size 46.2 kB
Tags Source
SHA-256 checksum
How to use checksums
19c8e8dd886c4a81562fc222b6eb1cccc1fee533ea6ab3908dc30633da585351
BLAKE2b-256 checksum
How to use checksums
beec1f7468d465b18e20022b761f1f64f6e75dc0c48bff40e3dd6c73fb00b90c
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 23, 2026.

Transparency log

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

Download URL garrison_sdk-0.1.0-py3-none-any.whl
Size 49.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8cf584376b790b79dc9e23f7245f939c38c3ee54c78e5a4aa09499e672bc854
BLAKE2b-256 checksum
How to use checksums
db22d07e1b112c25d460b0d45be2fde6a4d3f6baf2bfa1fbb638f45a0d44ef59
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 23, 2026.

Transparency log

Security for garrison-sdk 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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for garrison_sdk-0.1.0.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 23, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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