# hexgate - [Introduction](https://docs.hexgate.ai/introduction.md): Runtime authorization for AI agents — decide who can run which tool, in which role, with which arguments. - [Quickstart](https://docs.hexgate.ai/quickstart.md): Watch a role + arguments decide a tool call — first offline, then in your own agent. - [Which path do I pick?](https://docs.hexgate.ai/two-paths.md): Local-only chat REPL vs. platform-backed serve — choose the right shape. - [Build an agent](https://docs.hexgate.ai/guides/build-an-agent.md): From create_agent to a policy-gated, user-scoped runtime — and the whole config surface. - [Policy decision](https://docs.hexgate.ai/concepts/policy-decision.md): The Decision object — allow, deny, approval-required — at the heart of every tool call. - [Guards](https://docs.hexgate.ai/concepts/guards.md): Functions that run before and after a tool call to observe it, rewrite its arguments, or refuse it — plus the official secret-detection plugins. - [Request context](https://docs.hexgate.ai/concepts/user-scope.md): Per-request caller identity, role selection, attributes, biscuit attenuation. - [Agent-level enforcement](https://docs.hexgate.ai/concepts/agent-level-enforcement.md): Gate who may run an agent, and which agents one agent may reach, through the same policy engine that gates tool calls. - [Agent skills](https://docs.hexgate.ai/concepts/skills.md): What a skill is, why Hexgate governs it, and the three levels policy can gate — instructions, resources and scripts. - [Signed policy bundles](https://docs.hexgate.ai/concepts/signed-bundles.md): Compile YAML to WASM, sign with Ed25519, verify on every load. - [Audit trail](https://docs.hexgate.ai/concepts/audit-trail.md): Every decision, LLM call and blocked attempt leaves as an OpenTelemetry span and lands in ClickHouse. - [MCP servers (proxy)](https://docs.hexgate.ai/concepts/mcp.md): Auto-wrap third-party Model Context Protocol servers as policy-enforced tools. - [Approval-required](https://docs.hexgate.ai/concepts/approval-required.md): Ask a human before a tool call runs, using a single async callback. - [Approval in other frameworks](https://docs.hexgate.ai/concepts/approval-frameworks-compared.md): How OpenAI Agents SDK, LangGraph, Pydantic AI, and Claude Code approach human-in-the-loop, and where Hexgate fits. - [Bans](https://docs.hexgate.ai/concepts/bans.md): An operator kill-switch that refuses a run before the model executes, overriding policy. - [Workspace sandbox](https://docs.hexgate.ai/concepts/sandbox.md): OS-level filesystem + network enforcement for the bash tool — separate from policy enforcement. - [Network egress](https://docs.hexgate.ai/concepts/egress.md): Gate an agent's outbound HTTP(S) by destination host, through the same policy engine that gates tool calls. - [Adapters overview](https://docs.hexgate.ai/adapters/overview.md): How hexgate wraps third-party agent frameworks, and which versions are verified. - [OpenAI Agents SDK](https://docs.hexgate.ai/adapters/openai.md): Wrap an Agent with HexgateRunner — drop-in replacement for agents.Runner. - [LangChain / LangGraph](https://docs.hexgate.ai/adapters/langchain.md): wrap_langchain_agent — policy-gated tools, in-place installation. - [Google ADK](https://docs.hexgate.ai/adapters/google-adk.md): HexgateRunner — wraps google.adk.runners.Runner with policy + observability. - [Pydantic AI](https://docs.hexgate.ai/adapters/pydantic-ai.md): wrap_pydantic_agent — gates every tool through PolicyEnforcer. - [Policy YAML shape](https://docs.hexgate.ai/policy/yaml-shape.md): version, constraints, default_policy, tools, modes. - [Writing conditions](https://docs.hexgate.ai/policy/writing-conditions.md): A friendly, example-first guide to gating tool calls on their arguments. - [Constraints reference](https://docs.hexgate.ai/policy/constraints.md): Every operator, function, and quantifier the condition grammar accepts. - [Define policy in code](https://docs.hexgate.ai/policy/in-code.md): Build and unit-test policies in Python — no YAML required. - [WASM bundles](https://docs.hexgate.ai/policy/wasm-bundles.md): Compile policy.yaml to a portable signed artifact. - [Signing & verification](https://docs.hexgate.ai/policy/signing.md): Ed25519 keypair, detached signatures, REQUIRE_SIGNATURE matrix. - [Local override (HEXGATE_LOCAL_POLICY)](https://docs.hexgate.ai/policy/local-override.md): Point an agent at a YAML file or bundle dir; hot-reload on save. - [hexgate chat](https://docs.hexgate.ai/cli/chat.md): Single-process REPL against a local or registered agent. - [hexgate serve](https://docs.hexgate.ai/cli/serve.md): Bridge a local agent to the platform's WebSocket relay. - [hexgate register](https://docs.hexgate.ai/cli/register.md): Push a manifest to the platform. - [hexgate policy](https://docs.hexgate.ai/cli/policy.md): validate, show-rego, test, build, keygen, resolve, check — policy authoring CLI. - [Platform overview](https://docs.hexgate.ai/platform/overview.md): Three ways to enforce policy: local, Hexgate Cloud, or self-hosted. - [Platform workflow](https://docs.hexgate.ai/platform/workflow.md): From agent to enforced policy — mint a key, register, edit the policy, test, deploy. - [Hexgate Cloud (hosted)](https://docs.hexgate.ai/platform/hosted.md): The zero-infra path to remote policy enforcement and audit — set one env var. - [Live demo](https://docs.hexgate.ai/platform/live-demo.md): Try hexgate in your browser — define an agent, chat with it, watch policy decisions stream live. - [Control plane (FastAPI)](https://docs.hexgate.ai/platform/control-plane.md): Self-host the REST + WebSocket API. SQLite for dev, Postgres for production. - [Dashboard](https://docs.hexgate.ai/platform/dashboard.md): Vite + React + shadcn/ui. Policy editor, Playground, tokens. - [Audit log (ClickHouse)](https://docs.hexgate.ai/platform/audit-clickhouse.md): Policy decisions persisted for the audit dashboard. - [Outbound email (Resend)](https://docs.hexgate.ai/platform/email.md): Verification + password-reset emails — Resend in production, stderr in dev. - [SDK reference](https://docs.hexgate.ai/sdk/index.md): Python API for the hexgate package. - [Environment variables](https://docs.hexgate.ai/reference/environment.md): The HEXGATE_* variables and provider keys you'll set in practice, and what each one switches on. - [Audit pipeline](https://docs.hexgate.ai/internals/audit-pipeline.md) - [Rego wasm](https://docs.hexgate.ai/internals/rego-wasm.md) - [Development](https://docs.hexgate.ai/internals/development.md) ## Optional - [PyPI](https://pypi.org/project/hexgate/) - [Discussions](https://github.com/HexamindOrganisation/hexgate/discussions) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.