Skip to main content

garrison-hq

PyPI License: Apache-2.0

The Garrison control plane (install garrison-hq, import garrison_hq):

  • accounts, with database sessions, CSRF protection and a login rate limit;
  • apps, tools, agents with immutable prompt versions, flows and grants, each change compiled by the SDK's config compiler before it's saved, versioned and audited;
  • app keys, and the bundle API that the SDK's remote mode (Platform.from_service) pulls from;
  • trace ingestion and dashboards: per-app traces, sessions, tokens and cost.

Install and run

pip install garrison-hq                 # SQLite by default
pip install "garrison-hq[postgres]"     # + the Postgres driver (psycopg)

garrison-hq create-user --email you@example.com   # the first account (prompts for a password)
garrison-hq serve --port 8200                     # migrates, then serves http://localhost:8200/ui
garrison-hq migrate                               # run migrations yourself (with GARRISON_AUTO_MIGRATE=0)
garrison-hq cleanup-traces --older-than 30d       # delete old traces (--dry-run counts them)

DATABASE_URL picks the database (default sqlite:///./garrison_hq.db, or postgresql+psycopg://user:pass@host/db). The other settings are GARRISON_* environment variables, listed in the repo README. Python 3.11 or newer.

Trace content is off by default

Traces arrive with metadata only: IDs, agents, prompt versions, models, tokens, cost, timings, tool names and statuses, violation types and scan verdicts. Content (the agent's input and output, prompts, tool params and responses, and Anvil's corrective messages) is not sent unless the app opts in. Secret-looking fields and each tool's redact_fields are replaced with [redacted] before content leaves the app.

To turn it on for one app that runs in remote mode (Platform.from_service):

# with a signed-in session cookie; every write needs the X-Garrison header
curl -X PATCH http://localhost:8200/v1/apps/<app> -H 'X-Garrison: 1' \
     -H 'Content-Type: application/json' -d '{"dashboard": {"include_content": true}}'

or put it in the app's YAML and import it:

dashboard:
  include_content: true

The app picks it up on its next bundle refresh (default every 30 seconds). Platform.from_service(..., include_content=False) overrides it in code. An app in library mode sets dashboard: {include_content: true} in its own config instead; the service's setting doesn't apply to it.

Remote agents as tools

A tool with type: remote_agent is another app's agent: the SDK POSTs {message, session_id} to it and the model only writes the message. Give it a full endpoint when the agent runs on its own host, or a path (default /agent/chat) on the app's base_url. The SDK sets its method and parameters, so those fields are rejected. Grant it to another app like any tool; the consumer calls it with its own key (credentials), so the granting app needs an auth header scheme.

curl -X POST http://localhost:8200/v1/apps/fooddash/tools -H 'X-Garrison: 1' \
     -H 'Content-Type: application/json' \
     -d '{"name": "ask_fooddash", "type": "remote_agent", "endpoint": "http://localhost:8100/agent/chat"}'

From source

pip install -e sdk -e "server[dev]"     # from the repo root
pytest -q server                        # add TEST_POSTGRES_URL=... to also run on Postgres

License

Apache License 2.0. See LICENSE.

Metadata

Release files for garrison-hq 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-hq 0.1.1
File Size Uploaded Provenance Actions
garrison_hq-0.1.1.tar.gz 59.5 kB With provenance Details for garrison_hq-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 133.9 kB

Release files / garrison_hq-0.1.1.tar.gz

Download URL garrison_hq-0.1.1.tar.gz
Size 59.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d4d8009179ce9bf027d8e097233bff41b0dce5a47303c44208d2bed432705788
BLAKE2b-256 checksum
How to use checksums
a9556c393c80b5bdfcbb6b03ce5e30feb6eb8ebe36345718e649a16b21dbfe36
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_hq-0.1.1-py3-none-any.whl

Download URL garrison_hq-0.1.1-py3-none-any.whl
Size 74.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2cb7c949347ac2d22baa5f9df1ccdd243f9d89a9a46e994fb730a4238f53c5a9
BLAKE2b-256 checksum
How to use checksums
45f666e4628d732cf34bc36892be62f84a8ea56ed95806f1c7a065ed39c4ff22
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-hq 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_hq-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