Skip to main content

hardHats

coldHat is for play; hardHats are for work. hardHats is the framework — the factory that makes crews. A crew is a line-up of agents, each wearing a hat, run across a federation of free model backends.

A hat is one of two things:

  • an LLM hat — a model wearing an instruction (a role, a method, an output rule), or
  • a gate hat — a deterministic function: a real check, a linter, a measurement.

The same engine runs both, so a crew can put an LLM drafter and a deterministic verifier on the same line. That is the point: the LLM hats do the judgement, the gate hats do the facts, and nobody has to trust a model for something a rule can decide.

A crew is config, not code

from hardhats import Hat, Crew

crew = Crew("grant", [
    Hat("researcher", model=("groq", "openai/gpt-oss-20b"),
        instruction="List what a Statement of Need must establish."),
    Hat("writer", model=("github", "openai/gpt-4o"),
        instruction="Draft it in a cold, plain register. No AI-tell words."),
    Hat("critic", gate=slopgate),          # a deterministic gate hat
])

# pre-flight the crew against a conflict graph before it runs
conflicts = crew.preflight(load("dataset/prompt-conflicts.json"))

outputs = crew.run("Write a Statement of Need for an accessibility tool.")

Each hat sees the task and every prior hat's output, down the line.

The federation

hardhats.backends speaks to one chat() over many OpenAI-compatible (and Gemini) backends — Gemini, Groq, OpenRouter, Ollama, plus GitHub Models, Cloudflare Workers AI, Cerebras, Mistral, NVIDIA NIM, SambaNova and Cohere — each read from the environment, keys never printed. Add a key, gain a perspective.

Crews in the family

  • a11yhat — the WCAG accessibility machine, four crew leads as deterministic gate hats.
  • a grant crew, a compliance crew, a prompt-check crew — each a few lines of config.

Tests

python -m unittest discover -s tests — the engine (pipeline + pre-flight) is verified with gate hats only, so it proves out with zero model calls.

License

MIT. Copyright Vincent Gonzalez / F-Keys Creative LLC.

Metadata

Release files for hardhats 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 hardhats 0.1.0
File Size Uploaded Provenance Actions
hardhats-0.1.0.tar.gz 8.6 kB Without provenance Details for hardhats-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 17.3 kB

Release files / hardhats-0.1.0.tar.gz

Download URL hardhats-0.1.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8685a90ae94fc9fecbaf5f8b4ca5edff558a133e4e57cba6ffdc0c4e15a1c3ab
BLAKE2b-256 checksum
How to use checksums
b53c73a88d4050d74d3d0bc0c0bfc2dc450f0a611c81a0eda4d1024d11abc77a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

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

Download URL hardhats-0.1.0-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0519108888cfd4e5c4eca97af20247e686b66b902563702a15b93687b13d91a9
BLAKE2b-256 checksum
How to use checksums
a0614596dccafb74208348d9c1cc62150b2ea878184bcaad9871b5f4a29a6c36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for hardhats 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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