[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-111349":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":25,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},111349,"open-guardrail","alibaba\u002Fopen-guardrail","alibaba","Don't just filter what AI agents say — gate what they do. Deterministic, evidence-based action guardrails for AI agents & production workflows.","",null,"Go",86,4,1,6,0,8,30,3,49.1,"Apache License 2.0",false,"main",[],"2026-11-23 12:17:04","2026-11-22 09:12:08","# OpenGuardrail\n\nEnglish | [简体中文](docs\u002Fi18n\u002FREADME.zh-CN.md)\n\n**Evidence-based action guardrails for AI agents.**\n\nOpenGuardrail is a standalone guardrail service for AI agents that operate real\nsystems.\n\nDevelopers define the checks required before an action. The agent follows the\npolicy, performs the checks and submits results and evidence. OpenGuardrail\nvalidates the submission, records the assessment and returns `ALLOW` or `DENY`.\nThe execution tool verifies the decision and its validity before acting.\n\nEach assessment links the policy revision, check results, evidence and decision\nfor verification and audit. Agents and tools use the HTTP API or the\n`guardrailctl` CLI.\n\n**Status: development preview.** The API is `v1alpha1`. See\n[current capabilities and limits](#current-capabilities-and-limits) for details.\n\n[![Go 1.27+](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGo-1.27%2B-00ADD8?logo=go&logoColor=white)](go.mod)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-Apache--2.0-blue.svg)](LICENSE)\n\n[![OpenGuardrail overview: an AI agent submits checks and evidence; OpenGuardrail records an ALLOW or DENY decision with a validity window and audit trail; the execution tool verifies the decision before acting.](docs\u002Fimages\u002Freadme-hero.png)](docs\u002Fimages\u002Freadme-hero.svg)\n\n*The agent proposes; the gate decides. OpenGuardrail validates the structure and\ncompleteness of evidence; the calling system verifies observations and applies the\ndecision.*\n\n[Source](https:\u002F\u002Fgithub.com\u002Falibaba\u002Fopen-guardrail) · [Issues](https:\u002F\u002Fgithub.com\u002Falibaba\u002Fopen-guardrail\u002Fissues) ·\n[Get started](docs\u002Fgetting-started.md) · [Documentation](docs\u002FREADME.md) · [API and CLI](docs\u002Fapi.md) ·\n[Deployment](docs\u002Fconfiguration.md) · [Contributing](CONTRIBUTING.md) ·\n[Apache-2.0](LICENSE)\n\n## See it in action\n\nA predefined Python runner asks to delete four files: two temporary files, plus\n`orders.csv` and `config.yaml`. The broad request is blocked because it includes\nprotected files and exceeds the batch limit. The runner narrows the request; the\nsecond Run passes and the execution tool deletes only the two temporary files.\n\n[![OpenGuardrail live cleanup demo: the first check is DENY because the request includes orders and configuration; the second check is ALLOW after the runner narrows it to two temporary files.](docs\u002Fimages\u002Fcleanup-demo.png)](examples\u002Fcleanup-demo\u002FREADME.md)\n\n*Predefined runner, real service and files; this demo does not use an AI model. Start it with\n`python3 examples\u002Fcleanup-demo\u002Fdemo.py`.*\n\n## Why OpenGuardrail?\n\nWhen an agent has permission to operate real systems, required checks need to\nbe enforced at execution time. Prompts can tell the agent to check first, but\nexecution tools still need a verifiable basis for allowing an action. Audits\nalso need a clear record of the policy, check results and evidence used at the\ntime.\n\nIf that information lives only in agent conversations and tool logs, each\nexecution tool must extract and correlate it before deciding whether to proceed.\nOpenGuardrail organizes it into a consistent assessment record for tools to\nverify before acting and for later audits.\n\n### Where it fits\n\n**Use it when:** An agent or automation may delete data, deploy an application,\nor change configuration, and the team needs a traceable record of the policy,\nchecks and evidence behind each decision.\n\n**Integration requirement:** An agent or integration performs the checks and\nsubmits results and evidence. The tool that actually performs the operation\nreads the authoritative Run before acting and verifies the decision's validity,\nthe evidence it relies on and, where relevant, the current target state.\n\n**Limits:** OpenGuardrail validates the submission against the policy and records\n`ALLOW` or `DENY`; it does not independently verify the observations. A recorded\n`ALLOW` does not grant permission for the business operation. Actions that\nbypass the integrated tool are outside this check, and OpenGuardrail does not\nisolate processes or networks.\n\nThe [scenario packages](scenarios\u002FREADME.md) show where concrete checks,\nevidence collection and execution gates live. The\n[agent plugin](integrations\u002Fagent-plugins\u002FREADME.md) provides one pi entrypoint\nand loads the bundled scenarios.\n\n## How it works\n\nA **Scene** groups policies for one type of operation. Scenes share the same\npolicy, evidence and decision model. An assessment moves through five steps:\n\n[![OpenGuardrail evaluation flow: publish and activate a policy, create a Run, submit a complete assessment, read the Run and final Submission, and apply the decision in the calling system.](docs\u002Fimages\u002Foverview.png)](docs\u002Fimages\u002Foverview.svg)\n\n1. **Publish a policy.** Define checks and evidence requirements in a GuardrailSpec\n   and publish an immutable revision, then activate it for the Scene.\n2. **Start an assessment.** Create a Run to record the operation's context and freeze\n   the selected policy revision and evaluation deadline.\n3. **Check and submit.** The agent reads the Run's policy requirements, performs\n   the checks with its tools, and submits complete results and evidence.\n   Intermediate snapshots can precede a final submission.\n4. **Read the decision.** Query the authoritative Run for its stored decision and\n   validity, then read its referenced Submission to inspect the evidence.\n5. **Verify before acting.** The execution tool checks the authoritative decision,\n   its validity and the evidence, then applies business rules before acting.\n\nFor a completed Run, the check results aggregate as follows:\n\n| Result | Meaning | Decision |\n| --- | --- | --- |\n| `PASS` | All checks pass | `ALLOW` |\n| `BLOCKED` | At least one check reports a confirmed failure | `DENY` |\n| `UNKNOWN` | No check is blocked, but at least one cannot be assessed | `DENY` |\n\nAn unfinished Run can expire, and a completed decision has its own validity\nwindow. Integrations must check the authoritative Run, its deadline and decision\nvalidity. See [Runs and submissions](docs\u002Fruns.md).\n\n## Quickstart\n\nRun the same workflow locally and watch a guarded tool act on real files in a\ndisposable directory. This trial needs no model account, Jenkins, Docker or\nseparate database.\n\n### Run a guarded task\n\nPublished native previews appear in [GitHub Releases](https:\u002F\u002Fgithub.com\u002Falibaba\u002Fopen-guardrail\u002Freleases).\nChoose the native archive for your platform and `SHA256SUMS`; plugin users also\nchoose the complete `-install.tar.gz` plugin archive.\nFollow [archive verification](docs\u002Freleases.md) before extracting and running the\nsame cleanup demo with Python 3.9+; the native path needs no Go installation.\nFor a model-driven pi\u002FDeepSeek Harness trial, use the separate\n[plugin installation guide](docs\u002Fplugin-trial.md). The commands below build from source.\n\nInstall Git, the Go version specified in `go.mod` and Python 3.9+:\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Falibaba\u002Fopen-guardrail.git\ncd open-guardrail\npython3 examples\u002Fcleanup-demo\u002Fdemo.py\n```\n\nChoose a console password at the hidden prompts. The script builds both commands\nfrom source, then prints a **Demo** URL and a **Console** URL. Open the Demo first;\nit needs no login.\n\nClick **Run cleanup task**. The initial request includes temporary files, orders\nand configuration. A predefined runner submits the observed file state and gets\na real `DENY`. It narrows the request, creates another Run and gets `ALLOW`.\nThe controlled tool verifies that Run and its evidence before deleting only the\ntemporary files. Orders and configuration remain on disk.\n\nChange the selected files, disable automatic revision or lower the batch limit,\nthen run again. Expand a Run to inspect its frozen policy and accepted evidence.\nThe runner uses no model; the service calls and file operations are real.\nSee the [demo guide](examples\u002Fcleanup-demo\u002FREADME.md) for the workflow and limits.\n\nKeep the terminal open. Ctrl-C stops both services and removes their temporary\ndata and credentials. The separate Console uses username `demo` and the password\nchosen at startup; its **Runs** page contains the same Run IDs. For the original\nfour-case Recovery contract self-check, run\n`python3 examples\u002Fagent-demo\u002Fsmoke.py`.\n\n### Start a persistent service\n\nTo keep a service running and inspect your own Runs in the browser, use Go and\nMake from the checkout root:\n\n```sh\nmake build\n.\u002Fbin\u002Fopen-guardrail serve\n```\n\nOpen \u003Chttp:\u002F\u002F127.0.0.1:8080> and create the first administrator. There is no default\npassword. SQLite stores data in `.\u002Fdata`; no separate database service is needed.\n\n### Next steps\n\n| Goal | Guide |\n| --- | --- |\n| Understand how a policy affects a decision | [Getting started](docs\u002Fgetting-started.md): publish a policy, submit an assessment and inspect its evidence |\n| Have an agent perform the checks | [Agent demo](examples\u002Fagent-demo\u002FREADME.md): let an agent assess the sample observations and submit its findings |\n| Protect an operation in my own tool | [Integration guide](integrations\u002FREADME.md) and [API and CLI](docs\u002Fapi.md): define the checks, connect observation sources and verify the decision in your execution tool |\n\n## Target architecture\n\nThe target architecture below uses CD delivery as one example of the shared\nguardrail model. An agent follows a Scene's checks and submits evidence;\nOpenGuardrail validates the submission and records a decision; the execution tool\nverifies the decision and evidence before acting. Blue components belong to\nOpenGuardrail; gray components represent the agent and external systems.\n\n[![OpenGuardrail target architecture: an agent uses a Skill and guardrailctl to submit checks and evidence; the CLI and console share the OpenAPI service; policy, Run, evidence, decision and audit components share storage, while CD systems control deployment.](docs\u002Fimages\u002Ftarget-architecture.png)](docs\u002Fimages\u002Ftarget-architecture.svg)\n\n*Open the diagram for the full-size SVG. Execution Claims and receipts,\nreplaceable providers, and some CD integrations remain planned. The server\nvalidates evidence structure and completeness; the calling system verifies the\nobservations. See [current capabilities and limits](#current-capabilities-and-limits)\nand [reference integrations](#reference-integrations) for what works today.*\n\n## Current capabilities and limits\n\nThe preview includes:\n\n- A standalone Go service, an HTTP CLI and an embedded management UI.\n- Local administrator setup, browser\u002FCLI sessions and scoped machine credentials\n  with bounded lifetimes, metadata listing, secret rotation and revocation.\n- Scenes, editable policy drafts and immutable policy revisions.\n- Runs with frozen policy\u002Fevaluation context, intermediate and final submissions,\n  structured evidence, expiry and stored decisions.\n- SQLite and PostgreSQL adapters, with one service instance per database.\n- Native packaging for Linux and macOS on amd64 and arm64, plus optional Docker\n  deployment behind HTTPS.\n\nThe current boundaries are:\n\n- Checks run outside the service, in your agent or integration. The server does\n  not independently verify submitted observations. Registration and attestation\n  of external evaluators are not implemented.\n- Applying a decision and controlling actions belong to the calling system.\n  Execution Claims and ActionResults remain planned.\n- Multi-instance operation and replaceable identity\u002Fprovider APIs are not yet\n  supported.\n- Alpha APIs and storage contracts may change during the preview.\n\nSee the [roadmap](docs\u002Fdevelopment-roadmap.md), [runtime architecture](docs\u002Farchitecture.md)\nand [security policy](SECURITY.md) for details.\n\n## Reference integrations\n\nUse the versioned [HTTP\u002FOpenAPI contract](api\u002Fopenapi\u002Fopenapi.yaml) or the\n[shared CLI](cmd\u002Fguardrailctl\u002FREADME.md) to connect an application, service,\nscript or agent. The examples cover local file operations and delivery workflows.\n\n| Integration | Current status |\n| --- | --- |\n| [Live file cleanup demo](examples\u002Fcleanup-demo\u002FREADME.md) | Real Runs and guarded deletion in a disposable directory; predefined runner without a model |\n| [Local Recovery Agent demo](examples\u002Fagent-demo\u002FREADME.md) | Synthetic observations; agent-driven assessment and a deterministic self-check |\n| [Jenkins](integrations\u002Fjenkins\u002FREADME.md) | Synthetic pipeline demo with an outside agent and delivery-side evidence verification |\n| [Argo Rollouts](integrations\u002Fargo\u002FREADME.md) | Synthetic Analysis Job demo |\n| [GitHub Actions](integrations\u002Fgithub-actions\u002FREADME.md) | Planned adopter-facing workflow |\n| [Argo CD](integrations\u002Fargo\u002FREADME.md) | Sync hooks planned |\n\nThese examples demonstrate integration contracts. See the\n[integration guide](integrations\u002FREADME.md) for their scope and prerequisites.\n\n## Documentation\n\nStart with the [documentation index](docs\u002FREADME.md) for reading paths, or read\n[core concepts](docs\u002Fconcepts.md) for the Scene, Policy, Run and Submission model.\n\n| I want to… | Start here |\n| --- | --- |\n| Run a local example and inspect a decision | [Getting started](docs\u002Fgetting-started.md) |\n| Configure storage or a remote service | [Configuration and storage](docs\u002Fconfiguration.md), [Docker deployment](docs\u002Fdocker.md) |\n| Manage administrators and credentials | [Administrator guide](docs\u002Flocal-administrator.md) |\n| Write and publish a GuardrailSpec | [GuardrailSpec YAML reference](docs\u002Fguardrailspec-reference.md), [Scenes and Specs](docs\u002Fscenes-and-specs.md) |\n| Create Runs and submit evidence | [Runs and submissions](docs\u002Fruns.md) |\n| Call the API or automate with the CLI | [API overview](docs\u002Fapi.md), [CLI guide](cmd\u002Fguardrailctl\u002FREADME.md) |\n| Understand the implementation or extension plans | [Architecture](docs\u002Farchitecture.md), [extension boundaries](docs\u002Fextensions.md) |\n| Build, contribute or prepare a release | [Development](docs\u002Fdevelopment.md), [release notes](docs\u002Frelease-notes.md), [release verification](docs\u002Freleases.md) |\n\n## Contributing and support\n\nBug reports, documentation improvements, integration feedback and focused code\nchanges are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) for setup, issue\nguidance and the pull request workflow.\n\nUse [GitHub Issues](https:\u002F\u002Fgithub.com\u002Falibaba\u002Fopen-guardrail\u002Fissues) for questions\nand reproducible bug reports. Include your version and a minimal example with synthetic data.\nReport vulnerabilities privately through [SECURITY.md](SECURITY.md). Community\nparticipation follows our [Code of Conduct](CODE_OF_CONDUCT.md).\n\n## License\n\nOpenGuardrail is licensed under the [Apache License 2.0](LICENSE). Third-party\ncomponents retain their original terms; see the [notice inventory](third_party\u002FREADME.md)\nand [dependency review](docs\u002Fdependency-licenses.md).\n","OpenGuardrail 是一个面向 AI 代理与自动化工作流的基于证据的运行时安全护栏服务。它支持版本化策略定义、结构化证据提交与可审计的允许\u002F拒绝决策，通过 HTTP API 或 CLI 接入，确保操作前完成策略校验、证据验证与决策追溯。核心特点包括策略与证据强绑定、决策时效性控制、完整审计链（含策略版本、检查结果、原始证据及决策结果），并由执行工具二次验证决策有效性后才执行动作。适用于需在生产环境中对 AI 代理操作真实系统（如文件管理、API 调用、基础设施变更）实施细粒度、可验证、可回溯安全管控的场景。",2,"2026-11-24 04:40:55","CREATED_QUERY"]