{"id":50307217,"url":"https://github.com/opencost/opencost-ai","last_synced_at":"2026-05-28T17:30:34.123Z","repository":{"id":351883345,"uuid":"1119101251","full_name":"opencost/opencost-ai","owner":"opencost","description":"Holds code/config/docs related to ongoing AI sidecar or module development for the OpenCost ecosystem","archived":false,"fork":false,"pushed_at":"2026-04-27T14:32:49.000Z","size":507,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-27T16:23:16.324Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/opencost.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","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":"2025-12-18T18:39:49.000Z","updated_at":"2026-04-27T14:34:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/opencost/opencost-ai","commit_stats":null,"previous_names":["opencost/opencost-ai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/opencost/opencost-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencost%2Fopencost-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencost%2Fopencost-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencost%2Fopencost-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencost%2Fopencost-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencost","download_url":"https://codeload.github.com/opencost/opencost-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencost%2Fopencost-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33619964,"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-05-28T02:00:06.440Z","response_time":99,"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":[],"created_at":"2026-05-28T17:30:31.876Z","updated_at":"2026-05-28T17:30:34.110Z","avatar_url":"https://github.com/opencost.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# opencost-ai\n\n\u003e **Status: v0.1.0.** First tagged release. Gateway binary, Helm\n\u003e chart, and air-gap install flow ship as signed artefacts (cosign +\n\u003e SPDX SBOM + SLSA v1.0 provenance). See `CHANGELOG.md` for the v0.1\n\u003e contract and `docs/architecture.md` §11 for the shipped-vs-spec\n\u003e delta. The prototype in `legacy/prototype-flask/` is frozen and\n\u003e must not be built.\n\nA Kubernetes-native, air-gap-deployable, open-source AI assistant for\n[OpenCost](https://www.opencost.io/). It lets platform and FinOps\nteams ask cost questions in natural language without sending cluster\ndata to a third-party LLM provider.\n\n## What this is\n\nA small Go HTTP gateway (`cmd/gateway`) in front of\n[`jonigl/ollama-mcp-bridge`](https://github.com/jonigl/ollama-mcp-bridge),\nwhich brokers a local [Ollama](https://ollama.com/) runtime and the\n[OpenCost MCP server](https://www.opencost.io/) (built-in as of\nOpenCost v1.118).\n\n```\nclient  →  opencost-ai-gateway  →  ollama-mcp-bridge  →  Ollama\n                                                       →  OpenCost MCP :8081\n```\n\nThe gateway adds authentication, audit, rate limiting, prompt\nguardrails, and a stable `/v1/*` HTTP contract around the\nintentionally-unauthenticated Ollama `/api/chat` surface exposed by\nthe bridge.\n\n## What this is not\n\n- Not a general chatbot. It answers OpenCost-derived cost questions.\n- Not a cost-recommendation engine. v0.1 exposes existing data through\n  natural language; it does not prescribe.\n- Not hosted. No SaaS in the open-source project.\n- Not multi-cluster or federated. One OpenCost instance per\n  deployment.\n\n## Documentation\n\n| Doc                          | Purpose                                                              |\n|------------------------------|----------------------------------------------------------------------|\n| `docs/architecture.md`       | Intent, target architecture, resolved decisions. §11 is the delta between the spec and what actually shipped in v0.1. |\n| `docs/api.md`                | Operator-facing HTTP reference for every `/v1` route.                |\n| `docs/prompts.md`            | The intended system prompt and its rationale.                        |\n| `docs/security.md`           | STRIDE threat model and operator audit checklist.                    |\n| `docs/air-gap-install.md`    | End-to-end offline install flow.                                     |\n| `CHANGELOG.md`               | Release-by-release changes.                                          |\n| `SECURITY.md`                | Vulnerability reporting policy.                                      |\n\nIf the code diverges from `docs/architecture.md`, the code is wrong;\nif the intent is wrong, update the design doc in the same PR.\n\n## Repository layout\n\n```\nopencost-ai/\n├── CLAUDE.md                  # instructions for Claude Code sessions\n├── CHANGELOG.md\n├── LICENSE                    # Apache-2.0\n├── README.md\n├── cmd/gateway/               # main.go — wire-up only\n├── internal/                  # server, auth, bridge, audit, ratelimit,\n│                              # config, metrics, requestid\n├── pkg/apiv1/                 # exported wire types, no behaviour\n├── deploy/helm/opencost-ai/   # Helm chart: gateway + bridge + ollama\n├── scripts/air-gap/           # ORAS export/push/pull, crane mirror\n├── test/integration/          # gateway integration test\n├── test/airgap/               # iptables egress-block e2e harness\n├── docs/                      # architecture, api, prompts, security, air-gap\n└── legacy/                    # archived Flask + pexpect prototype (do not build)\n```\n\n## Installation\n\nAir-gap clusters: `docs/air-gap-install.md`. Connected clusters:\n\n```sh\nkubectl create namespace opencost-ai\nkubectl label namespace opencost-ai \\\n  pod-security.kubernetes.io/enforce=restricted\n\nkubectl -n opencost-ai create secret generic opencost-ai-auth \\\n  --from-literal=token=\"$(openssl rand -hex 32)\"\n\nhelm install opencost-ai ./deploy/helm/opencost-ai \\\n  --namespace opencost-ai \\\n  --set gateway.auth.existingSecret=opencost-ai-auth\n```\n\nVerify the image signature and SBOM before deploying — see\n`docs/security.md` §6.\n\n## License\n\nApache-2.0. See `LICENSE`.\n\n## Contributing\n\nSee `CONTRIBUTING.md` for DCO sign-off, GPG-signed commits, branch and\ncommit conventions, and the security checklist. Security issues go\nthrough `SECURITY.md`, not the public issue tracker.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencost%2Fopencost-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencost%2Fopencost-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencost%2Fopencost-ai/lists"}