Skip to main content

garrison-sdk

PyPI License: Apache-2.0

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.1

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.1
File Size Uploaded Provenance Actions
garrison_sdk-0.1.1.tar.gz 46.5 kB With provenance Details for garrison_sdk-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 96.6 kB

Release files / garrison_sdk-0.1.1.tar.gz

Download URL garrison_sdk-0.1.1.tar.gz
Size 46.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b7765d55e072cb95c269ad48a6a055cbc118d20dec913938bc442fe8f180c569
BLAKE2b-256 checksum
How to use checksums
cb9290ef18b2044d89f333e9e4225d74e69dbe74774330568f60e8d78060523b
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.1-py3-none-any.whl

Download URL garrison_sdk-0.1.1-py3-none-any.whl
Size 50.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab6b3ac1049a91813d821458e230f03cca742c65cc2da51fc70bd6eac4e10ae4
BLAKE2b-256 checksum
How to use checksums
b4283037908a7576533b72d9627e03d9f67a52860836b434a0c83d5bc5ce8b55
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.1

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.1.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.1 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