How mrdatascientist/finops-agentos works
FinOps-AgentOS is a prototype policy-gated inference control plane. Its main workflow accepts a typed task at the FastAPI gateway, asks the router and fail-closed policy engine for an eligible route, and returns a dry-run plan by default; explicitly enabled inference dispatches to a provider and records illustrative usage. The Stormscope demo converts synthetic risk evidence into an explanation task without changing the authoritative risk score. Offline evaluation exercises route planning, while metrics and example dashboards expose prototype observability. The graph reflects sampled call sites and README capabilities; unsampled observability wiring is shown only as documented, optional integration.
Main entry points: api.py FastAPI gateway · client.py Provider clients · main.py App factory · engine.py Route policy
Components 18
API Control Plane
- App factory
app/main.py - FastAPI gateway
app/gateway/api.py - Typed API contracts
app/models.py - Runtime settings
app/config.py
Policy and Routing
- Policy router
app/routing/router.py - Route policy
app/policies/engine.py
Inference and Accounting
- Provider clients
app/providers/client.py - Usage ledger
app/accounting/ledger.py
Stormscope Integration
- Risk contract
integrations/stormscope/contract.py - Task adapter
integrations/stormscope/adapter.py - Synthetic demo
integrations/stormscope/demo.py
Evaluation and Observability
- Offline policy evaluation
app/evaluation/offline.py - Evaluation contracts
app/evaluation/contracts.py - Prometheus example
observability/prometheus - Grafana dashboard
observability/grafana
Other components
- Backend caller
- Ollama service
- Azure OpenAI
Connections 21
- Backend caller → FastAPI gateway: submits task
README.md - App factory → FastAPI gateway: registers routes
app/main.py - App factory → Usage ledger: creates ledger
app/main.py - App factory → Runtime settings: loads settings
app/main.py - FastAPI gateway → Typed API contracts: accepts contracts
app/gateway/api.py - FastAPI gateway → Policy router: requests decision
app/gateway/api.py - Policy router → Route policy: chooses route
app/routing/router.py - Route policy → Runtime settings: checks settings
app/policies/engine.py - Route policy → Typed API contracts: returns decision
app/policies/engine.py - FastAPI gateway → Provider clients: dispatches inference
app/gateway/api.py - Provider clients → Ollama service: posts request
app/providers/client.py - Provider clients → Azure OpenAI: posts request
app/providers/client.py - Provider clients → Runtime settings: reads settings
app/providers/client.py - FastAPI gateway → Usage ledger: records estimate
app/gateway/api.py - FastAPI gateway → Prometheus example: exposes metrics
README.md - Prometheus example → Grafana dashboard: feeds dashboards
README.md - Synthetic demo → Risk contract: builds task
integrations/stormscope/demo.py - Risk contract → Task adapter: creates task
integrations/stormscope/contract.py - Synthetic demo → FastAPI gateway: posts route plan
integrations/stormscope/demo.py - Offline policy evaluation → FastAPI gateway: posts route plans
app/evaluation/offline.py - Offline policy evaluation → App factory: creates app
app/evaluation/offline.py