{"id":50718174,"url":"https://github.com/open-bias/open-bias","last_synced_at":"2026-06-26T22:00:39.150Z","repository":{"id":339072175,"uuid":"1159447558","full_name":"open-bias/open-bias","owner":"open-bias","description":"Open Source Reliability Harness: Make your agents follow rules. One line of code to‎ ‎enforce, trace, and improve. ‎ ‎ ","archived":false,"fork":false,"pushed_at":"2026-05-23T05:54:44.000Z","size":6942,"stargazers_count":113,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-05-23T07:30:02.423Z","etag":null,"topics":["agentic-ai","ai-audit","ai-compliance","ai-firewall","ai-governance","ai-guardrails","ai-policy","ai-safety","ai-security","content-safety","guardrails","llm-guardrails","llm-monitoring","llm-proxy","llm-safety","llm-security","policy-engine","prompt-injection","responsible-ai","rule-engine"],"latest_commit_sha":null,"homepage":"https://www.openbias.dev","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/open-bias.png","metadata":{"files":{"readme":"README.ja.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-16T18:34:51.000Z","updated_at":"2026-05-23T06:17:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/open-bias/open-bias","commit_stats":null,"previous_names":["open-sentinel/open-sentinel","open-bias/open-bias"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/open-bias/open-bias","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-bias%2Fopen-bias","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-bias%2Fopen-bias/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-bias%2Fopen-bias/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-bias%2Fopen-bias/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-bias","download_url":"https://codeload.github.com/open-bias/open-bias/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-bias%2Fopen-bias/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34834415,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-26T02:00:06.560Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","ai-audit","ai-compliance","ai-firewall","ai-governance","ai-guardrails","ai-policy","ai-safety","ai-security","content-safety","guardrails","llm-guardrails","llm-monitoring","llm-proxy","llm-safety","llm-security","policy-engine","prompt-injection","responsible-ai","rule-engine"],"created_at":"2026-06-09T21:00:25.962Z","updated_at":"2026-06-26T22:00:39.144Z","avatar_url":"https://github.com/open-bias.png","language":"Python","funding_links":[],"categories":["*Ops for AI"],"sub_categories":["LLMOps"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/banner.png\" alt=\"Open Bias — Open Source Reliability Harness\" width=\"900\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://pypi.org/project/openbias\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/openbias?color=blue\" alt=\"PyPI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pepy.tech/projects/openbias\"\u003e\u003cimg src=\"https://static.pepy.tech/personalized-badge/openbias?period=total\u0026units=INTERNATIONAL_SYSTEM\u0026left_color=BLACK\u0026right_color=GREEN\u0026left_text=downloads\" alt=\"PyPI Downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/openbias\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/openbias\" alt=\"Python\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/open-bias/open-bias/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/open-bias/open-bias\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/open-bias/open-bias/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/open-bias/open-bias?style=social\" alt=\"GitHub Stars\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"README.md\"\u003eEnglish\u003c/a\u003e · \u003ca href=\"README.zh-CN.md\"\u003e简体中文\u003c/a\u003e · \u003cb\u003e日本語\u003c/b\u003e · \u003ca href=\"README.ko.md\"\u003e한국어\u003c/a\u003e\n\u003c/p\u003e\n\n# エージェントに、ちゃんとルールを守らせる。\n\n**AI エージェント向けのオープンソース信頼性ハーネス。** 設定ゼロ、レイテンシゼロ、どの LLM プロバイダーでもそのまま使えます。\n\nOpen Bias はアプリと LLM プロバイダーの間に入り、`RULES.md` に書いたルールを実行します。アプリの向き先をプロキシに変えるだけで、方針から外れた振る舞いをユーザー・ツール・本番システムに届く前に止められます。\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/terminal-playground.gif\" alt=\"Open Bias のターミナルプレイグラウンドで、実行時ポリシー適用を示している様子\" width=\"600\"\u003e\n\u003c/p\u003e\n\n---\n\n## クイックスタート\n\n```bash\npip install openbias\nexport ANTHROPIC_API_KEY=sk-ant-...    # もしくは OPENAI_API_KEY、GEMINI_API_KEY\nopenbias serve\n```\n\n既存のクライアントの向き先を `http://localhost:4000/v1` に変えるだけです。\n\n```python\nfrom openai import OpenAI\n\nclient = OpenAI(\n    base_url=\"http://localhost:4000/v1\",          # 変更はここだけ\n    api_key=\"sk-ant-...\"\n)\n\nresponse = client.chat.completions.create(\n    model=\"anthropic/claude-sonnet-4-5\",\n    messages=[{\"role\": \"user\", \"content\": \"Hello!\"}]\n)\n```\n\nOpen Bias にはスターター用の `RULES.md` が同梱されていて、デフォルトの評価器も自動で組み立てられます。設定ファイルは不要です。自分のルールを追加したいときは `RULES.md` を編集してください。エンジン・トレーシング・エンフォースメントの挙動をカスタマイズしたくなったら、`openbias.yaml` を追加します。\n\n---\n\n## 動きのイメージ\n\nあなたの `RULES.md`:\n```markdown\n- 割引は最大 15% まで。\n- 社内の価格、原価、利益率は一切明かさない。\n```\n\n**Open Bias なし:**\n\n```\nUser:   値引きしてくれないなら競合に乗り換えるよ。\nAgent:  それは困ります! 12 か月間 40% オフでいかがでしょう。\n        ここだけの話、原価はシート単価 2 ドルなので十分ペイします。\n```\n\n**Open Bias あり:**\n\n```\nUser:   値引きしてくれないなら競合に乗り換えるよ。\nAgent:  次回更新時に 15% オフをご提案できます。適用しておきましょうか?\n```\n\n---\n\nOpen Bias が役に立ったと思ったら、ぜひ [リポジトリに Star](https://github.com/open-bias/open-bias) をお願いします。ほかの開発者に届きやすくなります。\n\n---\n\n## なぜ選ばれているのか\n\n- **システムプロンプトや `AGENTS.md` は、スケールしてくると効かなくなる。** プロンプトにルールを足せば足すほど、モデルはどのルールも守らなくなっていきます。複雑なポリシー、マルチステップのワークフロー、エージェントをまたいだ制約は、「モデルが守ってくれるかどうか」に依存しない強制手段が必要です。\n- **Eval や可観測性は「何が起きたか」を教えてくれる。Open Bias はそれを未然に防ぐ。** Eval は事後に走り、ダッシュボードは失敗を見せてくれるだけ。Open Bias は本番のトラフィックをリアルタイムで評価し、悪い振る舞いがユーザーに届く前に `intervene`・`block`・`shadow` を発動します。\n- **`RULES.md` はチーム全員が触れるコントロール面。** ただの Markdown なので、リポジトリに置いて、PR でレビューし、デプロイごとに diff を取り、コードと同じようにバージョン管理できます。ベンダー管理のダッシュボードも、独自のポリシー DSL も、別で運用するシステムも要りません。\n- **関心事ごとに別のエンジンを差し替えられる。** ワークフローの強制、ドメイン固有のルール、コンテンツセーフティを、すべて同じ評価器でまかなう必要はありません。Open Bias は複数のエンジンを並行して動かせます。高速な分類には小さな専用モデル、ニュアンスの要るポリシーには Judge LLM、コンテンツセーフティには NVIDIA の NeMo、といった使い分けが可能です。チェックのたびにメインプロバイダーのトークンを焼く必要はありません。\n- **デフォルトでレイテンシはゼロ。** クリティカルでない違反は非同期で評価し、次のターンで補正を適用します。クリティカルな違反はその場でブロックして修正します。プロキシがボトルネックになることはありません。\n\n---\n\n## なぜ作ったのか\n\nエージェントに「やるな」と言ったのに、やった。\n\nLLM の上でプロダクトを作っている開発者なら、誰もがぶつかる問題です。ルールを足し、ガードレールをプロンプトに積み増しても、リストが長くなるほどモデルは守ってくれなくなります。\n\n- 「ユーザーデータを絶対に削除するな」と書いたのに、次のターンでエージェントが `DROP TABLE users` を叩く。\n- 「社内価格を共有するな」と書いたのに、顧客向けの返信に書いてしまう。\n- 「アカウント操作の前に本人確認せよ」と書いたのに、確認をすっ飛ばしていきなり操作する。\n- ルールを 10 個追加したら、最初の 5 個を無視しはじめる。\n\nこれは開発者のスキルの問題でも、プロンプトの工夫不足でもありません。モデルは指示を「制約」ではなく「コンテキスト」として扱います。いくらプロンプトエンジニアリングを重ねても、お願いを保証に変えることはできません。\n\nガードレールはコンテンツをフィルタします。可観測性は起きたことを見せてくれます。Open Bias は実行時に振る舞いそのものを強制します。本番のトラフィックをポリシーに照らして評価し、違反があればユーザーに届く前に動きます。\n\n---\n\n## しくみ\n\nOpen Bias はアプリと LLM プロバイダーの間に入り、すべてのリクエストとレスポンスを `RULES.md` と突き合わせて評価します。\n\n```\n┌──────────┐       ┌─────────────────────────────────────────────────────────────┐       ┌──────────────┐\n│          │──────▶│                         OPEN BIAS                           │──────▶│              │\n│ Your App │       │                                                             │       │ LLM Provider │\n│          │◀──────│  ┌───────────────────────────────────────────────────────┐  │◀──────│              │\n└──────────┘       │  │                        Proxy                          │  │       └──────────────┘\n                   │  │                                                       │  │\n                   │  │  ┌─────────────────┐         ┌─────────────────────┐  |  │\n                   │  │  │  PRE_CALL Hook  │         │   POST_CALL Hook    │  │  │\n                   │  │  │                 │         │                     │  │  │\n                   │  │  │ • apply pending │         │ • run sync engines  │  │  │\n                   │  │  │   async results │         │ • start async       │  │  │\n                   │  │  │ • run pre sync  │         │   engines (applied  │  │  │\n                   │  │  │   engines       │         │   next request)     │  │  │\n                   │  │  └───────┬─────────┘         └──────────-┬─────────┘  │  │\n                   │  └──────────┼───────────────────────────────┼────────────┘  │\n                   │             │                               │               │\n                   │             ▼                               ▼               │\n                   │  ┌───────────────────────────────────────────────────────┐  │\n                   │  │                    Interceptor                        │  │\n                   │  │  Maps EvaluationResult → enforcement action           │  │\n                   │  │                                                       │  │\n                   │  │  ┌──────────-─┐  ┌────────────-─┐  ┌─────────────┐    │  │\n                   │  │  │  BLOCK     │  │  INTERVENE   │  │  SHADOW     │    │  │\n                   │  │  │  stop req  │  │  modify next │  │  log \u0026 pass │    │  │\n                   │  │  │  return    │  │  turn or     │  │  through    │    │  │\n                   │  │  │  error     │  │  replay resp │  │             │    │  │\n                   │  │  └───────────-┘  └─────────────-┘  └─────────────┘    │  │\n                   │  └───────────────────────────────────────────────────────┘  │\n                   │             │                                               │\n                   │             ▼                                               │\n                   │  ┌───────────────────────────────────────────────────────┐  │\n                   │  │                  Policy Engines                       │  │\n                   │  │  ┌────────┐  ┌────────┐  ┌────────┐  ┌────────┐       │  │\n                   │  │  │ Judge  │  │  NeMo  │  │  FSM   │  │  LLM   │       │  │\n                   │  │  │        │  │        │  │ (exp.) │  │ (exp.) │       │  │\n                   │  │  └────────┘  └────────┘  └────────┘  └────────┘       │  │\n                   │  └───────────────────────────────────────────────────────┘  │\n                   │             │                                               │\n                   │  ┌──────────┴────────────────────────────────────────────┐  │\n                   │  │ RULES.md → Compiler → engine config  │ OTel Tracing   │  │\n                   │  └───────────────────────────────────────────────────────┘  │\n                   └─────────────────────────────────────────────────────────────┘\n```\n\nリクエストごとに 3 つのフックが動きます。**pre-call** は保留中の介入を適用し(マイクロ秒オーダー)、**LLM call** はリクエストを手を加えずプロバイダーに転送し、**post-call** はレスポンスを評価します。クリティカルな違反は同期的に捕まえてブロックできます。クリティカルでない違反は非同期に評価し、次のターン向けに補正をキューイングするので、レイテンシには響きません。\n\nすべてのフックは fail-open で、タイムアウトも設定可能です。プロキシがボトルネックになることはありません。\n\nトレースビュー:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/traces.png\" alt=\"リクエスト、評価器の判定、エンフォースメント判断を示す Open Bias の概念図\" width=\"520\"\u003e\n\u003c/p\u003e\n\nポリシー介入のイメージ:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/deviation-playground-without-byline.gif\" alt=\"ドリフトがポリシー境界を越えると介入し、準拠状態へ戻る様子を示す Open Bias の deviation GIF\" width=\"900\"\u003e\n\u003c/p\u003e\n\nターンごとのドリフト推移:\n\n- ターン 1-2: 通常経路。\n- ターン 3: ドリフト開始。\n- ターン 4-5: 介入を適用。\n- ターン 6-7: ポリシー準拠へ復帰。\n\n---\n\n## エンジン\n\n| エンジン | しくみ | クリティカルパスのレイテンシ |\n|--------|-----------|----------------------|\n| `judge` | サイドカーの LLM がコンパイル済みルールを 1 つずつ評価 | **0ms**(非同期、次ターンで介入) |\n| `nemo` | NVIDIA NeMo Guardrails によるコンテンツセーフティと対話レール | **200〜800ms** |\n| `fsm` | LTL-lite の時相制約を持つ状態機械 | *実験的* |\n| `llm` | LLM ベースの状態分類とドリフト検知 | *実験的* |\n\nエンジンの詳細ドキュメント: [docs/engines.md](docs/engines.md)\n\n---\n\n\u003c!-- Uncomment after launch:\n## Featured In\n[\u003cimg src=\"badge\" alt=\"Hacker News\"\u003e]() [\u003cimg src=\"badge\" alt=\"Product Hunt\"\u003e]()\n--\u003e\n\n## ロードマップ\n\nv0.4.1 は beta リリースです。プロキシ層、複数エバリュエータのパイプライン、Judge と NeMo のエンジン、ルールコンパイラ、リプレイ/改善ツール、JSONL トレース、OpenTelemetry トレーシングはひと通り動きます。残る 2 つのエンジン(FSM、LLM)は実験的な位置付けです。設定ゼロで起動でき、必要に応じて YAML を追加できます。\n\n---\n\n## ドキュメント\n\n- [設定リファレンス](docs/configuration.md) -- すべての設定項目を型・デフォルト値・説明つきで網羅\n- [継続的改善](docs/continuous-improvement.md) -- トレースのキャプチャ、リプレイ、比較、レビュー、承認フロー\n- [評価エンジン](docs/engines.md) -- 各エンジンのしくみ、使いどころ、トレードオフ\n- [アーキテクチャ](docs/architecture.md) -- システム設計、データフロー、コンポーネント間の連携\n- [開発者ガイド](docs/developing.md) -- セットアップ、テスト、拡張ポイント、デバッグ\n- [サンプル](examples/)\n---\n\n## コントリビュート\n\nOpen Bias をもっと良くするために、ぜひ力を貸してください。Issue を立てる、PR を送る、使い方を共有する、どんな形でも歓迎です。\n\n---\n\n## ライセンス\n\nApache 2.0\n\nこのプロジェクトがチームの役に立ったら、[GitHub](https://github.com/open-bias/open-bias) で Star をつけてもらえると、より多くの開発者に届きます。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-bias%2Fopen-bias","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-bias%2Fopen-bias","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-bias%2Fopen-bias/lists"}