Metadata-Version: 2.4
Name: garrison-hq
Version: 0.1.0
Summary: The Garrison control plane: accounts, apps, tools, agents with versioned prompts, flows, grants, app keys, the bundle API for the SDK's remote mode, and trace dashboards.
Author: Shikhar Pathak
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/infoshikharpathak/garrison
Project-URL: Repository, https://github.com/infoshikharpathak/garrison
Project-URL: Issues, https://github.com/infoshikharpathak/garrison/issues
Project-URL: Changelog, https://github.com/infoshikharpathak/garrison/blob/main/CHANGELOG.md
Keywords: agents,llm,governance,control-plane,dashboard,tracing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Security
Classifier: Framework :: FastAPI
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: garrison-sdk<0.2,>=0.1.0
Requires-Dist: fastapi>=0.110
Requires-Dist: uvicorn[standard]>=0.29
Requires-Dist: sqlalchemy<3,>=2.0
Requires-Dist: alembic>=1.13
Requires-Dist: argon2-cffi>=23.1
Requires-Dist: jinja2>=3.1
Requires-Dist: python-multipart>=0.0.9
Requires-Dist: pyyaml>=6.0
Provides-Extra: postgres
Requires-Dist: psycopg[binary]>=3.1; extra == "postgres"
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
Requires-Dist: httpx>=0.27; extra == "dev"
Dynamic: license-file

# garrison-hq

The [Garrison](https://github.com/infoshikharpathak/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

```bash
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](https://github.com/infoshikharpathak/garrison#control-plane-server).
Python 3.11 or newer.

## From source

```bash
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](https://github.com/infoshikharpathak/garrison/blob/main/LICENSE).
