{"id":46039455,"url":"https://github.com/anulum/director-ai","last_synced_at":"2026-04-13T03:24:41.665Z","repository":{"id":338652291,"uuid":"1158612139","full_name":"anulum/director-ai","owner":"anulum","description":"Real-time LLM hallucination guardrail — NLI + RAG fact-checking with token-level streaming halt. Drop-in for any LLM backend.","archived":false,"fork":false,"pushed_at":"2026-03-25T18:52:35.000Z","size":27923,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-25T19:10:12.046Z","etag":null,"topics":["ai-safety","coherence","deberta","factual-consistency","hallucination-detection","llm","llm-guardrail","machine-learning","nli","python","rag"],"latest_commit_sha":null,"homepage":"https://anulum.github.io/director-ai/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anulum.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":"AUDIT_2026-03-11.md","citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":"SUPPORT.md","governance":"GOVERNANCE.md","roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":".zenodo.json","notice":"NOTICE.md","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"anulum","custom":["https://www.anulum.li/licensing"]}},"created_at":"2026-02-15T16:53:34.000Z","updated_at":"2026-03-25T18:52:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"db64db26-987b-4eee-96f2-7ae3e4b50b8c","html_url":"https://github.com/anulum/director-ai","commit_stats":null,"previous_names":["anulum/director-ai"],"tags_count":46,"template":false,"template_full_name":null,"purl":"pkg:github/anulum/director-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anulum%2Fdirector-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anulum%2Fdirector-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anulum%2Fdirector-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anulum%2Fdirector-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anulum","download_url":"https://codeload.github.com/anulum/director-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anulum%2Fdirector-ai/sbom","scorecard":{"id":1244491,"data":{"date":"2026-03-07T05:06:45Z","repo":{"name":"github.com/anulum/director-ai","commit":"e2251dc5ace8d1be5209400fd4fccd58f071f58b"},"scorecard":{"version":"v5.3.0","commit":"c22063e786c11f9dd714d777a687ff7c4599b600"},"score":4.9,"checks":[{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: Dependabot: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#dependency-update-tool"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#code-review"}},{"name":"CI-Tests","score":-1,"reason":"no pull request found","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#ci-tests"}},{"name":"Maintained","score":0,"reason":"project was created within the last 90 days. Please review its contents carefully","details":["Warn: Repository was created within the last 90 days."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#maintained"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#security-policy"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/publish.yml:74","Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yml:13","Warn: topLevel 'security-events' permission set to 'write': .github/workflows/codeql.yml:16","Info: topLevel 'contents' permission set to 'read': .github/workflows/docker.yml:11","Warn: topLevel 'packages' permission set to 'write': .github/workflows/docker.yml:12","Info: topLevel 'contents' permission set to 'read': .github/workflows/docs.yml:16","Info: found token with 'none' permissions: .github/workflows/pre-commit.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/publish.yml:11","Warn: topLevel 'contents' permission set to 'write': .github/workflows/release.yml:11","Info: topLevel permissions set to 'read-all': .github/workflows/scorecard.yml:12","Info: topLevel 'contents' permission set to 'read': .github/workflows/wheels.yml:12"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#token-permissions"}},{"name":"SAST","score":10,"reason":"SAST tool detected: CodeQL","details":["Info: SAST configuration detected: CodeQL","Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#sast"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU Affero General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#license"}},{"name":"CII-Best-Practices","score":5,"reason":"badge detected: Passing","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#cii-best-practices"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v3.2.0-stable not signed: https://api.github.com/repos/anulum/director-ai/releases/294176444","Warn: release artifact v3.0.0-stable not signed: https://api.github.com/repos/anulum/director-ai/releases/294141129","Warn: release artifact v3.0.0 not signed: https://api.github.com/repos/anulum/director-ai/releases/294141369","Warn: release artifact v2.7.1 not signed: https://api.github.com/repos/anulum/director-ai/releases/292749796","Warn: release artifact v2.6.0 not signed: https://api.github.com/repos/anulum/director-ai/releases/292345897","Warn: release artifact v3.2.0-stable does not have provenance: https://api.github.com/repos/anulum/director-ai/releases/294176444","Warn: release artifact v3.0.0-stable does not have provenance: https://api.github.com/repos/anulum/director-ai/releases/294141129","Warn: release artifact v3.0.0 does not have provenance: https://api.github.com/repos/anulum/director-ai/releases/294141369","Warn: release artifact v2.7.1 does not have provenance: https://api.github.com/repos/anulum/director-ai/releases/292749796","Warn: release artifact v2.6.0 does not have provenance: https://api.github.com/repos/anulum/director-ai/releases/292345897"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/docker.yml:23"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#packaging"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":4,"reason":"dependency not pinned by hash detected -- score normalized to 4","details":["Warn: containerImage not pinned by hash: Dockerfile:19: pin your Docker image by updating python:3.11-slim to python:3.11-slim@sha256:d6e4d224f70f9e0172a06a3a2eba2f768eb146811a349278b38fff3a36463b47","Warn: containerImage not pinned by hash: Dockerfile:31: pin your Docker image by updating python:3.11-slim to python:3.11-slim@sha256:d6e4d224f70f9e0172a06a3a2eba2f768eb146811a349278b38fff3a36463b47","Warn: containerImage not pinned by hash: Dockerfile.gpu:19: pin your Docker image by updating python:3.11-slim to python:3.11-slim@sha256:d6e4d224f70f9e0172a06a3a2eba2f768eb146811a349278b38fff3a36463b47","Warn: containerImage not pinned by hash: Dockerfile.gpu:35: pin your Docker image by updating python:3.11-slim to python:3.11-slim@sha256:d6e4d224f70f9e0172a06a3a2eba2f768eb146811a349278b38fff3a36463b47","Warn: containerImage not pinned by hash: Dockerfile.gpu:50: pin your Docker image by updating python:3.11-slim to python:3.11-slim@sha256:d6e4d224f70f9e0172a06a3a2eba2f768eb146811a349278b38fff3a36463b47","Warn: containerImage not pinned by hash: discord-bot/Dockerfile:1: pin your Docker image by updating python:3.12-slim to python:3.12-slim@sha256:ccc7089399c8bb65dd1fb3ed6d55efa538a3f5e7fca3f5988ac3b5b87e593bf0","Warn: pipCommand not pinned by hash: Dockerfile:27","Warn: pipCommand not pinned by hash: Dockerfile.gpu:26-31","Warn: pipCommand not pinned by hash: Dockerfile.gpu:26-31","Warn: pipCommand not pinned by hash: discord-bot/Dockerfile:4","Warn: pipCommand not pinned by hash: benchmarks/gpu_bench_setup.sh:12","Warn: pipCommand not pinned by hash: benchmarks/gpu_bench_setup.sh:13","Warn: pipCommand not pinned by hash: training/upcloud_setup.sh:18","Warn: pipCommand not pinned by hash: training/upcloud_setup.sh:19","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:125","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:155","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:196","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:214","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:173","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:237","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:32","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:59","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:62","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:82","Warn: pipCommand not pinned by hash: .github/workflows/docs.yml:37","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:30","Warn: pipCommand not pinned by hash: .github/workflows/release.yml:31","Warn: downloadThenRun not pinned by hash: .github/workflows/wheels.yml:73","Info:  57 out of  57 GitHub-owned GitHubAction dependencies pinned","Info:  20 out of  20 third-party GitHubAction dependencies pinned","Info:   0 out of  21 pipCommand dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned","Info:   0 out of   6 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":0,"reason":"68 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-26jh-r8g2-6fpr","Warn: Project is vulnerable to: PYSEC-2024-219 / GHSA-279j-x4gx-hfrh","Warn: Project is vulnerable to: GHSA-34rf-p3r3-58x2","Warn: Project is vulnerable to: PYSEC-2024-197 / GHSA-37qc-qgx6-9xjv","Warn: Project is vulnerable to: GHSA-39mp-8hj3-5c49","Warn: Project is vulnerable to: PYSEC-2024-196 / GHSA-3c67-5hwx-f6wx","Warn: Project is vulnerable to: GHSA-3gf9-wv65-gwh9","Warn: Project is vulnerable to: PYSEC-2023-90 / GHSA-3qqg-pgqq-3695","Warn: Project is vulnerable to: PYSEC-2023-16 / GHSA-3x5j-9vwr-8rr5","Warn: Project is vulnerable to: GHSA-48cq-79qq-6f7x","Warn: Project is vulnerable to: PYSEC-2024-217 / GHSA-4q3c-cj7g-jcwf","Warn: Project is vulnerable to: PYSEC-2024-215 / GHSA-576c-3j53-r9jj","Warn: Project is vulnerable to: GHSA-5cpq-9538-jm2j","Warn: Project is vulnerable to: PYSEC-2023-249 / GHSA-6qm2-wpxq-7qh2","Warn: Project is vulnerable to: PYSEC-2024-184 / GHSA-6v6g-j5fq-hpvw","Warn: Project is vulnerable to: PYSEC-2024-213 / GHSA-77xq-6g77-h274","Warn: Project is vulnerable to: GHSA-7v2w-h4gh-w5cv","Warn: Project is vulnerable to: PYSEC-2024-214 / GHSA-89v2-pqfv-c5r9","Warn: Project is vulnerable to: PYSEC-2024-216 / GHSA-8c87-gvhj-xm8m","Warn: Project is vulnerable to: GHSA-8jw3-6x8j-v96g","Warn: Project is vulnerable to: GHSA-973g-55hp-3frw","Warn: Project is vulnerable to: GHSA-f3h9-8phc-6gvh","Warn: Project is vulnerable to: PYSEC-2022-229 / GHSA-f8xq-q7px-wg8c","Warn: Project is vulnerable to: GHSA-g6c9-f4xm-9j4x","Warn: Project is vulnerable to: GHSA-g9cj-cfpp-4g2x","Warn: Project is vulnerable to: PYSEC-2023-255 / GHSA-gqvf-3hgp-5hxv","Warn: Project is vulnerable to: PYSEC-2024-220 / GHSA-gvv6-33j7-884g","Warn: Project is vulnerable to: PYSEC-2024-198 / GHSA-hm3c-93pg-4cxw","Warn: Project is vulnerable to: GHSA-hmx6-r76c-85g9","Warn: Project is vulnerable to: GHSA-j2jg-fq62-7c3h","Warn: Project is vulnerable to: PYSEC-2024-199 / GHSA-j757-pf57-f8r4","Warn: Project is vulnerable to: GHSA-jmh7-g254-2cq9","Warn: Project is vulnerable to: GHSA-m842-4qm8-7gpq","Warn: Project is vulnerable to: GHSA-pfjf-5gxr-995x","Warn: Project is vulnerable to: GHSA-prpg-p95c-32fv","Warn: Project is vulnerable to: GHSA-qh6x-j82h-vpf9","Warn: Project is vulnerable to: GHSA-r364-m2j9-mf4h","Warn: Project is vulnerable to: PYSEC-2021-873 / GHSA-rhq2-3vr9-6mcr","Warn: Project is vulnerable to: PYSEC-2024-255 / GHSA-rvfh-h6c7-fc3c","Warn: Project is vulnerable to: GHSA-v4q9-qgqf-7jwp","Warn: Project is vulnerable to: PYSEC-2024-218 / GHSA-xh2x-3mrm-fwqm","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: GHSA-3749-ghw9-m3mg","Warn: Project is vulnerable to: PYSEC-2025-41 / GHSA-53q9-r3pm-6pq6","Warn: Project is vulnerable to: PYSEC-2024-252 / GHSA-5pcm-hx3q-hm94","Warn: Project is vulnerable to: GHSA-887c-mr87-cxwp","Warn: Project is vulnerable to: PYSEC-2024-251 / GHSA-pg7h-5qx3-wjr3","Warn: Project is vulnerable to: PYSEC-2024-250","Warn: Project is vulnerable to: PYSEC-2024-259","Warn: Project is vulnerable to: GHSA-37mw-44qp-f5jm","Warn: Project is vulnerable to: GHSA-37q5-v5qm-c9v8","Warn: Project is vulnerable to: PYSEC-2023-300 / GHSA-3863-2447-669p","Warn: Project is vulnerable to: GHSA-4w7r-h757-3r74","Warn: Project is vulnerable to: GHSA-59p9-h35m-wg4g","Warn: Project is vulnerable to: GHSA-6rvg-6v2m-4j46","Warn: Project is vulnerable to: GHSA-9356-575x-2w9m","Warn: Project is vulnerable to: GHSA-fpwr-67px-3qhx","Warn: Project is vulnerable to: PYSEC-2024-229 / GHSA-hxxf-235m-72v3","Warn: Project is vulnerable to: GHSA-jjph-296x-mrcr","Warn: Project is vulnerable to: GHSA-phhr-52qp-3mj4","Warn: Project is vulnerable to: GHSA-q2wp-rjmx-x6x9","Warn: Project is vulnerable to: PYSEC-2025-40 / GHSA-qq3j-4f4f-9583","Warn: Project is vulnerable to: PYSEC-2024-227 / GHSA-qxrp-vhvm-j765","Warn: Project is vulnerable to: GHSA-rcv9-qm8p-9p6j","Warn: Project is vulnerable to: PYSEC-2023-301 / GHSA-v68g-wm8c-6x7j","Warn: Project is vulnerable to: PYSEC-2024-228 / GHSA-wrfc-pvp9-mr9g"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#vulnerabilities"}},{"name":"Contributors","score":3,"reason":"project has 1 contributing companies or organizations -- score normalized to 3","details":["Info: found contributions from: anulum institute"],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#contributors"}}]},"last_synced_at":"2026-03-07T12:46:36.117Z","repository_id":338652291,"created_at":"2026-03-07T12:46:36.117Z","updated_at":"2026-03-07T12:46:36.117Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai-safety","coherence","deberta","factual-consistency","hallucination-detection","llm","llm-guardrail","machine-learning","nli","python","rag"],"created_at":"2026-03-01T06:01:46.209Z","updated_at":"2026-04-01T17:29:52.891Z","avatar_url":"https://github.com/anulum.png","language":"Python","funding_links":["https://github.com/sponsors/anulum","https://www.anulum.li/licensing"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/header.png\" width=\"1280\" alt=\"Director-AI — Real-time LLM Hallucination Guardrail\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eDirector-AI\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eReal-time LLM hallucination guardrail — NLI + RAG fact-checking with token-level streaming halt\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/anulum/director-ai/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/anulum/director-ai/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/anulum/director-ai/actions/workflows/pre-commit.yml\"\u003e\u003cimg src=\"https://github.com/anulum/director-ai/actions/workflows/pre-commit.yml/badge.svg\" alt=\"Pre-commit\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/anulum/director-ai/actions/workflows/codeql.yml\"\u003e\u003cimg src=\"https://github.com/anulum/director-ai/actions/workflows/codeql.yml/badge.svg\" alt=\"CodeQL\"\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/tests-3545_passed-brightgreen.svg\" alt=\"Tests\"\u003e\n  \u003ca href=\"https://pypi.org/project/director-ai/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/director-ai.svg\" alt=\"PyPI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/director-ai/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/dm/director-ai.svg\" alt=\"Downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/anulum/director-ai\"\u003e\u003cimg src=\"https://codecov.io/gh/anulum/director-ai/branch/main/graph/badge.svg\" alt=\"Coverage\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.python.org/downloads/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/director-ai.svg\" alt=\"Python\"\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/code%20style-ruff-261230.svg\" alt=\"Ruff\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/types-mypy-blue.svg\" alt=\"mypy\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/signing-Sigstore-purple.svg\" alt=\"Sigstore\"\u003e\n  \u003ca href=\"https://www.gnu.org/licenses/agpl-3.0\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-AGPL_v3-blue.svg\" alt=\"License: AGPL v3\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://huggingface.co/spaces/anulum/director-ai-guardrail\"\u003e\u003cimg src=\"https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Demo-orange.svg\" alt=\"HF Spaces\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://doi.org/10.5281/zenodo.18822167\"\u003e\u003cimg src=\"https://zenodo.org/badge/doi/10.5281/zenodo.18822167.svg\" alt=\"DOI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://anulum.github.io/director-ai\"\u003e\u003cimg src=\"https://img.shields.io/badge/docs-mkdocs-blue.svg\" alt=\"Docs\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.bestpractices.dev/projects/12102\"\u003e\u003cimg src=\"https://www.bestpractices.dev/projects/12102/badge\" alt=\"OpenSSF Best Practices\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://securityscorecards.dev/viewer/?uri=github.com/anulum/director-ai\"\u003e\u003cimg src=\"https://api.securityscorecards.dev/projects/github.com/anulum/director-ai/badge\" alt=\"OpenSSF Scorecard\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://api.reuse.software/info/github.com/anulum/director-ai\"\u003e\u003cimg src=\"https://api.reuse.software/badge/github.com/anulum/director-ai\" alt=\"REUSE\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## What It Does\n\nDirector-AI sits between your LLM and the user. It scores every output for\nhallucination before it reaches anyone — and can halt generation mid-stream if\ncoherence drops below threshold.\n\n```mermaid\ngraph LR\n    LLM[\"LLM\u003cbr/\u003e(any provider)\"] --\u003e D[\"Director-AI\"]\n    D --\u003e S[\"Scorer\u003cbr/\u003eNLI + RAG\"]\n    D --\u003e K[\"StreamingKernel\u003cbr/\u003etoken-level halt\"]\n    S --\u003e V{Approved?}\n    K --\u003e V\n    V --\u003e|Yes| U[\"User\"]\n    V --\u003e|No| H[\"HALT + evidence\"]\n```\n\n**Ten things make it different:**\n\n1. **Token-level streaming halt** — not post-hoc review. Severs output the moment coherence degrades.\n2. **Dual-entropy scoring** — NLI contradiction detection (DeBERTa) + RAG fact-checking against your knowledge base.\n3. **Meta-confidence** — the guardrail tells you how confident it is in its own verdict. Route low-confidence results to human review.\n4. **Structured output verification** — JSON schema validation, tool call fabrication detection, code hallucinated API detection. Zero dependencies (stdlib only).\n5. **Online calibration** — collects human feedback, automatically adjusts thresholds for your deployment. The longer you use it, the better it gets.\n6. **Contradiction tracking** — detects when an AI contradicts itself across conversation turns.\n7. **EU AI Act compliance** — automated Article 15 documentation. Accuracy metrics, drift detection, feedback loop detection, audit trails, per-model breakdown with confidence intervals. Ready for August 2026 enforcement.\n8. **Verification gems** — numeric consistency checks, reasoning chain verification, temporal freshness scoring, cross-model consensus, conformal prediction intervals. All stdlib-only, zero dependencies.\n9. **Agentic loop monitor** — detects circular tool calls, goal drift, and budget exhaustion in AI agent loops. The first guardrail that monitors agent execution, not just individual calls.\n10. **Adversarial self-test** — 25-pattern robustness suite tests your guardrail against zero-width chars, homoglyphs, encoding tricks, and prompt injection.\n\n### Scope\n\nPure Python core — no compiled extensions required. Optional Rust kernel (`pip install director-ai[rust]`) for SIMD-accelerated scoring. Works on any platform with Python 3.11+.\n\n| Layer | Packages | Install |\n|-------|----------|---------|\n| **Core** (zero heavy deps) | `CoherenceScorer`, `StreamingKernel`, `GroundTruthStore`, `HaltMonitor` | `pip install director-ai` |\n| **NLI models** | DeBERTa, FactCG, MiniCheck, ONNX Runtime | `pip install director-ai[nli]` |\n| **Vector DBs** | ChromaDB (`[vector]`), Pinecone (`[pinecone]`), Weaviate (`[weaviate]`), Qdrant (`[qdrant]`) | `pip install director-ai[vector]` |\n| **LLM judge** | OpenAI, Anthropic escalation | `pip install director-ai[openai]` |\n| **Observability** | OpenTelemetry spans | `pip install director-ai[otel]` |\n| **Server** | FastAPI + Uvicorn | `pip install director-ai[server]` |\n\n## Four Ways to Add Guardrails\n\n### A: Wrap your SDK (6 lines)\n\nDuck-type detection for five SDK shapes: OpenAI-compatible (OpenAI, vLLM, Groq,\nLiteLLM, Ollama), Anthropic, AWS Bedrock, Google Gemini, and Cohere.\n\n```python\nfrom director_ai import guard\nfrom openai import OpenAI\n\nclient = guard(\n    OpenAI(),\n    facts={\"refund_policy\": \"Refunds within 30 days only\"},\n)\nresponse = client.chat.completions.create(\n    model=\"gpt-4o-mini\",\n    messages=[{\"role\": \"user\", \"content\": \"What is the refund policy?\"}],\n)\n```\n\n### B: One-shot check (4 lines)\n\nScore a single prompt/response pair without an SDK client:\n\n```python\nfrom director_ai import score\n\ncs = score(\"What is the refund policy?\", response_text,\n           facts={\"refund\": \"Refunds within 30 days only\"},\n           threshold=0.3)\nprint(f\"Coherence: {cs.score:.3f}  Approved: {cs.approved}\")\n```\n\n### C: Zero code changes (2 lines)\n\nPoint any OpenAI-compatible client at the proxy:\n\n```bash\npip install director-ai[server]\ndirector-ai proxy --port 8080 --facts kb.txt --threshold 0.3\n```\n\nThen set `OPENAI_BASE_URL=http://localhost:8080/v1` in your app. Every response\ngets scored; hallucinations are rejected (or flagged with `--on-fail warn`).\n\n### D: FastAPI middleware (3 lines)\n\nGuard your own API endpoints:\n\n```python\nfrom director_ai.integrations.fastapi_guard import DirectorGuard\n\napp.add_middleware(DirectorGuard,\n    facts={\"policy\": \"Refunds within 30 days only\"},\n    on_fail=\"reject\",\n)\n```\n\nResponses on POST endpoints get `X-Director-Score` and `X-Director-Approved`\nheaders. Set `paths=[\"/api/chat\"]` to limit which endpoints are scored.\n\n## Installation\n\n```bash\npip install \"director-ai[nli]\"                    # recommended — NLI model scoring\npip install \"director-ai[nli,vector,server]\"       # production stack with RAG + REST API\npip install \"director-ai[nli,voice]\"               # voice AI with TTS adapters\npip install director-ai                            # heuristic-only (limited accuracy)\n```\n\nExtras: `[vector]` (ChromaDB), `[voice]` (ElevenLabs, OpenAI TTS, Deepgram), `[finetune]` (domain adaptation), `[ingestion]` (PDF/DOCX parsing), `[colbert]` (late-interaction retrieval).\nFramework integrations: `[langchain]`, `[llamaindex]`, `[langgraph]`, `[haystack]`, `[crewai]`, Semantic Kernel, DSPy/Instructor.\nKubernetes: [Helm chart](deploy/helm/director-ai/) with GPU toggle, HPA, Sigstore-signed releases.\nVoice AI: `VoiceGuard` (sync) and `AsyncVoiceGuard` + `voice_pipeline()` (async) — real-time token filter for TTS pipelines with ElevenLabs, OpenAI TTS, and Deepgram adapters ([guide](https://anulum.github.io/director-ai/guide/voice-ai/)).\n\nFull installation guide: [docs](https://anulum.github.io/director-ai/installation/).\n\n## Docker\n\nDockerfile included for self-hosted builds. Pre-built images not yet published to a registry.\n\n```bash\ndocker build -t director-ai .                                      # build locally\ndocker run -p 8080:8080 director-ai                                # CPU\ndocker build -f Dockerfile.gpu -t director-ai:gpu .                # GPU build\ndocker run --gpus all -p 8080:8080 director-ai:gpu                 # GPU\n```\n\n## Benchmarks\n\n### Accuracy — LLM-AggreFact (29,320 samples)\n\nScoring model: [`yaxili96/FactCG-DeBERTa-v3-Large`](https://huggingface.co/yaxili96/FactCG-DeBERTa-v3-Large) (0.4B params, MIT license).\n\n| Model | Balanced Acc | Params | Latency | Streaming |\n|-------|-------------|--------|---------|-----------|\n| Bespoke-MiniCheck-7B | **77.4%** | 7B | ~100 ms | No |\n| **Director-AI (FactCG)** | **75.8%** | 0.4B | **14.6 ms** | **Yes** |\n| MiniCheck-Flan-T5-L | 75.0% | 0.8B | ~120 ms | No |\n| MiniCheck-DeBERTa-L | 72.6% | 0.4B | ~120 ms | No |\n\n75.8% balanced accuracy comes from the FactCG-DeBERTa-v3-Large model (77.2% in\nthe [NAACL 2025 paper](https://arxiv.org/abs/2501.17144); our eval yields 75.86%\ndue to threshold tuning and data split version). Latency: 14.6 ms/pair measured\non GTX 1060 6GB with ONNX GPU batching (16-pair batch, 30 iterations, 5 warmup).\nDirector-AI's unique value is the *system*: NLI + KB + streaming halt.\n\nFull results: [`benchmarks/comparison/COMPETITOR_COMPARISON.md`](benchmarks/comparison/COMPETITOR_COMPARISON.md).\nPerformance trade-offs and E2E pipeline metrics: [docs](https://anulum.github.io/director-ai/guide/streaming/).\n\n## Domain Presets\n\n10 built-in profiles with preset thresholds (starting points — adjust for your data):\n\n```bash\ndirector-ai config --profile medical   # threshold=0.30, NLI on, reranker on\ndirector-ai config --profile finance   # threshold=0.30, w_fact=0.6\ndirector-ai config --profile legal     # threshold=0.30, w_logic=0.6\ndirector-ai config --profile creative  # threshold=0.40, permissive\n```\n\nDomain-specific benchmark scripts exist but have not yet been validated with measured results.\nRun them yourself (requires GPU + HuggingFace datasets):\n\n```bash\npython -m benchmarks.medical_eval   # MedNLI + PubMedQA\npython -m benchmarks.legal_eval     # ContractNLI + CUAD (RAGBench)\npython -m benchmarks.finance_eval   # FinanceBench + Financial PhraseBank\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eKnown Limitations \u0026 When Not to Use\u003c/strong\u003e\u003c/summary\u003e\n\n#### Accuracy\n\n- **Heuristic fallback is weak**: Without `[nli]`, scoring uses word-overlap heuristics (~55% accuracy). Use `strict_mode=True` to reject (0.9) instead of guessing.\n- **Summarisation FPR at 10.5%**: Reduced from 95% via bidirectional NLI + baseline calibration (v3.5). AggreFact-CNN: 68.8%, ExpertQA: 59.1% (structurally expected at 0.4B params).\n- **NLI-only scoring needs KB grounding**: Without a knowledge base, PubMedQA F1=62.1%, FinanceBench 80%+ FPR. Load your domain facts into the vector store.\n\n#### Performance\n\n- **ONNX CPU is slow**: 383 ms/pair without GPU. Use `onnxruntime-gpu` for production.\n- **Long documents need ≥16GB VRAM**: Legal contracts and SEC filings exceed 6GB during chunked NLI inference.\n\n#### Configuration\n\n- **Weights are domain-dependent**: Default `w_logic=0.6, w_fact=0.4` suits general QA. Adjust for your domain or use a built-in profile.\n- **Threshold defaults differ by API surface**: `guard()`/`score()` default to `threshold=0.3` (permissive). `DirectorConfig` defaults to `coherence_threshold=0.6` (conservative). Always set the threshold explicitly.\n\n#### Privacy\n\n- **LLM-as-judge sends data externally**: When `llm_judge_enabled=True`, truncated prompt+response (500 chars) are sent to the configured provider. Do not enable in privacy-sensitive deployments without user consent. The default NLI-only mode runs entirely locally with no external calls.\n\n\u003c/details\u003e\n\n## Citation\n\n```bibtex\n@software{sotek2026director,\n  author    = {Sotek, Miroslav},\n  title     = {Director-AI: Real-time LLM Hallucination Guardrail},\n  year      = {2026},\n  url       = {https://github.com/anulum/director-ai},\n  version   = {3.11.1},\n  license   = {AGPL-3.0-or-later}\n}\n```\n\n## License\n\nDual-licensed:\n\n1. **Open-Source**: [GNU AGPL v3.0](LICENSE) — research, personal use, open-source projects.\n2. **Commercial**: [Proprietary license](https://www.anulum.li/licensing) — removes copyleft for closed-source and SaaS.\n\nSee [Licensing](docs-site/licensing.md) for pricing tiers and FAQ.\n\nContact: [anulum.li](https://www.anulum.li) | [director.class.ai@anulum.li](mailto:director.class.ai@anulum.li)\n\n## Community\n\nJoin the [Director-AI Discord](https://discord.gg/JvMdKv49) for CI notifications, release announcements, and support. The Discord bot also provides `/version`, `/docs`, `/install`, `/status`, and `/quickstart` slash commands.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md). By contributing, you agree to AGPL v3 terms.\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.anulum.li\"\u003e\n    \u003cimg src=\"docs/assets/anulum_logo_company.jpg\" width=\"180\" alt=\"ANULUM\"\u003e\n  \u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://www.anulum.li\"\u003e\n    \u003cimg src=\"docs/assets/fortis_studio_logo.jpg\" width=\"180\" alt=\"Fortis Studio\"\u003e\n  \u003c/a\u003e\n  \u003cbr\u003e\n  \u003cem\u003eDeveloped by \u003ca href=\"https://www.anulum.li\"\u003eANULUM\u003c/a\u003e / Fortis Studio\u003c/em\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanulum%2Fdirector-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanulum%2Fdirector-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanulum%2Fdirector-ai/lists"}