Skip to main content Switch to mobile version docoreai 2.7.8 Autonomous AI Cost Governance, Built Privacy-First.
pip install docoreai==2.7.8 Copy PIP instructions
Autonomous AI Cost Governance with Visibility at Call-Level without Gateway
Cut LLM API costs 40–70% with privacy-first AI cost governance. Token prediction, budget pacing, runtime enforcement. Zero code changes. No prompt storage.
The Problem Enterprise AI Teams Face Today
Your team ships an AI feature. Usage grows. Then one of two things happens.
Option A — You log everything. Prompts, responses, full request bodies. Now your compliance team is blocking the rollout. Legal wants a data retention policy. Security calls it a liability. The AI pilot stalls.
Option B — You skip logging. No compliance risk, but now you're flying blind. Costs spike overnight with no warning. A single bad deployment burns through the monthly budget by Tuesday. There's no audit trail, no governance, no way to explain the bill.
And even when logging is solved, the spending problem remains. LLM costs do not self-regulate. Without active budget control, a traffic surge at 10 AM can exhaust the entire day's budget by noon. There are no native guardrails in any LLM provider SDK. No pacing, no prediction, no automatic intervention. You either overspend or you build all of that yourself.
Enterprise AI teams have been forced to choose between privacy and visibility — and then left to solve cost control entirely on their own. DoCoreAI eliminates all three problems.
DoCoreAI sits between your application and any LLM provider — OpenAI, Anthropic, Google, Groq, AWS Bedrock — and acts as an autonomous cost and governance layer. It instruments every LLM call your application makes: tracking cost, tokens, latency, and governance decisions — without ever capturing prompt content, response content, or user data.
It learns your actual usage patterns. It predicts what each request genuinely needs. It replaces the wasteful default token ceiling with a precise ML prediction. It paces your budget intelligently across the full day and across the full week, accounting for day-of-week traffic patterns. It trims redundant context before requests leave your environment — shrinking token counts without changing what the model sees. When its own accuracy degrades, it retrains automatically. Your prompts never leave your network.
This is not observability. Observability shows you what happened after the bill arrives. DoCoreAI predicts, paces, and controls spend before overruns occur — autonomously, on every request.
Projected outcome: 40–70% reduction in LLM spend, based on token waste patterns observed across 20+ enterprise AI deployments.
▶ Watch the demo on YouTube
Architecture — Privacy by Design
DoCoreAI runs as a sidecar in the same Python environment as your application. It monkey-patches all active LLM SDK calls automatically at startup — no imports, no wrappers, no changes to your existing code. Every request passes through governance checks, token prediction, budget validation, pacing adjustment, and soft limit injection before the LLM call is made. After the response arrives, actuals are compared to predictions and fed back into the learning loop.
No gateway. No proxy sits between your application and the LLM. DoCoreAI intercepts calls at the SDK level — meaning zero additional latency on the network path, and no new security surface for compliance teams to audit.
Fails open by design. If DoCoreAI encounters any error, the LLM call proceeds normally. Governance never blocks your application.
1 — Autonomous Cost Governance
The pacing engine distributes your daily budget intelligently across 24 hours, adjusted for your deployment's actual peak patterns by hour of day and day of week. When spend runs ahead of pace, token ceilings tighten automatically. When spend is behind, headroom opens up. Your budget works for you across the full month — not just the first Tuesday.
2 — Privacy-First by Architecture
Only metadata is ever collected: timestamp, model name, token count, estimated cost, latency, and governance decision. Prompt text, response content, and user identifiers are never captured, never stored, never transmitted. Compliance teams can approve deployment on day one. Security teams can audit the local metadata database directly on request.
3 — Agentic & Multi-Turn Governance (v2.4.0)
Framework attribution — LangChain, CrewAI, and OpenAI Agents SDK runs are automatically identified and tagged in telemetry, so governance reports show cost by framework alongside cost by model. DoCoreAI automatically detects agentic workflows and multi-turn conversations. Each session is tracked as a logical unit — with its own budget allocation, cost accumulation, and governance ceiling. Tool-calling agents and long-running conversations are governed as coherent workloads, not disconnected individual calls. A single agentic pipeline that makes 20 LLM calls is tracked as one governed session with one combined cost.
4 — Intelligent Daily Pacing (v2.2.0)
Two-layer pacing derived from your observed usage patterns. Intraday: the system learns which hours of the day carry the most spend and shapes the budget curve accordingly — a business-hours-heavy deployment gets more headroom at 2 PM, not a flat hourly split. Interday: day-of-week multipliers mean Tuesday's higher traffic gets more budget than Sunday's quiet period — from the same monthly envelope, distributed correctly.
5 — Self-Improving Prediction Engine
A LightGBM model trained on your deployment's actual telemetry predicts the completion token count for each incoming request. When prediction accuracy degrades — detected by the hourly drift monitor — the system automatically retrains on recent data, runs an A/B test against the previous champion model, and promotes the winner without any human action. Your governance engine gets smarter the longer it runs.
6 — Executive Reporting Suite (v2.2.0)
Seven built-in reports cover every governance stakeholder:
Report 1 — Governance Maturity Scorecard — Five-axis radar chart: cost control, model accuracy, PII hygiene, adoption coverage, deployment experience
Report 2 — Governance Dividend — Daily and cumulative spend saved by active governance vs. uncontrolled baseline
Report 3 — AI Adoption Velocity — How quickly AI governance is spreading across your environments
Report 4 — Executive AI Briefing — CFO-ready one-page summary with Claude-generated governance narrative
Report 5 — Training & Model Health Panel — Live view of training progress, prediction accuracy, and A/B test status
Report 6 — Budget Trajectory Forecast — Real-time intraday spend curve with projected budget hit time
Report 7 — AI Spend Forecast (v2.1 roadmap) — 1M / 3M / 6M / 12M spend projections using historical patterns
How the Cost Reduction Works
The default max_tokens on most LLM calls is set to 2,000 or higher — a safe ceiling, not a real estimate. Most responses need a fraction of that. You pay for the ceiling.
DoCoreAI replaces that ceiling with a prediction.
At 100,000 daily calls, that single optimisation saves approximately $174/day — $63,510/year per deployment. Before pacing, soft limits, or session governance are applied.
Requirements: Python 3.12+ · pip · A free org token from docoreai.com
Supported platforms: Windows (actively tested). macOS and Linux — testing in progress; the codebase is pure Python and is expected to work. Report any platform issues at docoreai.com/docs.
Step 1 — Install DoCoreAI in the same environment as your application:
pip install docoreai Step 2 — Generate your org token at docoreai.com and configure:
Step 3 — Start DoCoreAI alongside your application:
docoreai start DoCoreAI automatically intercepts all LLM SDK calls in your environment. No changes to your application code are required. No restarts. No imports.
No prompt content. No response content. Just the signal that matters.
Training window: DoCoreAI observes your real usage patterns for 14 days (or 30,000 prompts — whichever comes first) before activating full ML-driven governance. During this window, the per-call ceiling and daily hard cap are enforced immediately. The adaptive pacing and prediction engine activate after training completes.
Ctrl+C # Graceful shutdown — active requests complete, patches cleanly removed Federal & Enterprise Deployment
For air-gapped, government, or private-cloud deployments where data must not leave the environment, DoCoreAI provides a federal mode.
docoreai-fed start Container / Docker deployment: DoCoreAI is available as a base Docker image for container-based deployments (Azure Container Apps, AWS ECS, Kubernetes). See the deployment template for a production-ready Dockerfile and entrypoint.
Enterprise telemetry routing — Azure Log Analytics: For deployments with data-residency requirements, telemetry can be routed directly to Azure Log Analytics instead of (or alongside) the DoCoreAI cloud dashboard. Configure via environment variables — no code changes required. Contact your DoCoreAI administrator for setup.
The DoCoreAI cloud dashboard is live and operational. Telemetry syncs from your local environment to your dashboard automatically on every call.
For the CTO or CFO reviewing AI spend:
Daily cost vs. budget — real-time spend curve against your ceiling, by hour
Governance Dividend — how much DoCoreAI has saved vs. uncontrolled baseline
Budget trajectory — projected time to budget hit, with severity colour coding
Provider and model breakdown — cost attribution across the full stack
For the VP Engineering or engineering manager:
Adoption velocity — what percentage of environments are governed
Session tracking — agentic workflow cost and multi-turn conversation cost as coherent units
Pacing events — throttle decisions logged with rationale
For the compliance or governance officer:
PII detection events — what was caught, when, and what action was taken
Governance decision log — auditable record of every enforcement event
Maturity scorecard — five-axis governance health at a glance
For the developer monitoring prediction quality:
Model health panel — prediction accuracy (MAE) trending over time
Drift events — when the model degraded and what triggered retraining
A/B test results — champion vs. challenger performance, promotion or rollback
DoCoreAI provides the evidence layer that AI governance consulting engagements currently lack.
Assessment methodology today relies on interviews, document reviews, and manual cost analysis — because there is no infrastructure that surfaces real AI usage data without creating a compliance liability. Clients cannot give consultants access to their LLM logs. The governance analysis is shallow because the evidence base is thin.
DoCoreAI changes what is available to bring to the table:
Real-time cost attribution by team, project, and environment — not estimates derived from invoices
Governance decision logs — what was enforced, when, and why — auditable and exportable
Token waste quantification — the exact dollar value of inefficiency, per model, per environment
PII detection events — evidence of where sensitive data was caught before reaching the LLM
Budget pacing history — demonstrates autonomous governance operating continuously, not just assessed once
The Executive AI Briefing report (Report 5) is designed specifically for this context — a CFO-ready one-page summary with a Claude-generated governance narrative, exportable as a PDF slide for board presentations.
Preventing budget exhaustion — SaaS platforms A marketing campaign triggers a customer surge. Without pacing, the daily budget is exhausted by 11 AM and the service is throttled for 13 hours. DoCoreAI detects the spike, applies graduated token ceiling reductions, and keeps the service running for the full 24 hours on the same budget.
Agentic pipeline cost control — AI-native products A document processing agent makes 15–20 LLM calls per user request. Each call is individually small, but the session total is significant. DoCoreAI tracks the entire agentic workflow as one governed session — allocating a session budget, accumulating cost across turns, and throttling if the session approaches its ceiling.
Enterprise compliance — regulated industries A healthcare or financial services team needs full AI observability but cannot log prompt content. DoCoreAI's metadata-only telemetry delivers complete cost and governance visibility with zero prompt retention. Nothing that touches a compliance boundary ever leaves the local environment.
Handling day-of-week traffic variance — enterprise deployments Monday carries three times the LLM traffic of Sunday. A flat daily budget means Monday throttles at 4 PM and Sunday has unused headroom. DoCoreAI's interday pacing learns the weekly pattern and distributes the weekly budget proportionally — Monday gets more, Sunday gets less, and the weekly envelope is respected.
Works out of the box with any combination. No provider-specific configuration required — DoCoreAI detects and wraps all active SDKs automatically at startup.
OpenAI — GPT-4o, GPT-4 Turbo, GPT-4, GPT-3.5, and all variants
Anthropic — Claude 3.5, Claude 3, and newer — including system prompt token tracking
Google — Gemini 1.5 Pro, Gemini Pro, and Gemini Ultra
AWS Bedrock — All foundation models via a dedicated adapter: Anthropic Claude, Amazon Titan, Meta Llama, Mistral, Cohere. Model ID format differences handled automatically.
Groq — Llama, Mixtral, and all Groq-hosted models
Ollama — Local model deployments
Multi-LLM orchestration: LangChain, CrewAI (v1.x — LiteLLM-backed), OpenAI Agents SDK, and custom orchestration frameworks are all supported transparently. DoCoreAI patches at the SDK level — whatever framework sits above it, the governance fires on every call.
Privacy vs. Visibility — How DoCoreAI Solves Both
# Install pip install docoreai # Configure with your org token (generate free at docoreai.com) docoreai config # Start docoreai start # Stop (graceful — patches cleanly removed, active requests complete) Ctrl+C v2.3.7 is the current release. Production use is welcomed and encouraged — real deployment data is what makes the prediction models improve fastest. Report issues and get support at docoreai.com/docs.
Full documentation, configuration reference, and integration guides:
Covers: training window configuration · auto-retrain settings · A/B testing · soft limits · pacing engine · session governance · budget modes · retention policies · multi-provider setup · troubleshooting · developer API reference.
The architecture and methodology underpinning DoCoreAI — including the privacy-first telemetry design, the LightGBM-based token prediction pipeline, and the autonomous pacing engine — are documented in a peer-reviewed technical whitepaper establishing prior art:
doi.org/10.5281/zenodo.20774715
The whitepaper covers: SDK-level interception without gateway dependency · metadata-only telemetry design · learned budget distribution · drift detection and automatic retraining · compliance architecture for regulated industries.
We are actively working with enterprise teams who are running LLMs in production and need real cost governance — not just dashboards.
If your organisation is deploying AI at scale and wrestling with budget predictability, compliance constraints, or the need for defensible governance evidence for your board or audit committee, this is built for your problem.
What design partners receive: direct founder access · custom configuration support · early access to enterprise features · input into the product roadmap · white-glove onboarding and integration support.
What we ask in return: honest feedback · real deployment data to improve the prediction models · a willingness to co-develop the enterprise use case.
Python 3.12 · LightGBM · SQLite · scikit-learn · wrapt · cloud-detect · Prophet (forecast roadmap) · WordPress REST API · Chart.js · PHP 8.x
20+ enterprise AI deployments informing the design
40–70% projected LLM cost reduction
3 commands to production-ready governance
15 minutes average integration time
DoCoreAI — because your compliance team and your engineering team should both be able to say yes.
Other/Proprietary License (CC BY-NC-ND 4.0)
llm observability ai cost control llm budget management privacy-first ai zero prompt storage ai governance token tracking llmops ai observability budget pacing enterprise ai llm monitoring prompt monitoring anthropic openai groq google gemini ollama llm cost reduction ai spending docoreai
Development Status 4 - Beta
Intended Audience Developers
License Other/Proprietary License
Operating System OS Independent
Programming Language Python :: 3.12
Topic Scientific/Engineering :: Artificial Intelligence
Software Development :: Libraries :: Python Modules
Release files for docoreai 2.7.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 882.6 kB
Release files / docoreai-2.7.8.tar.gz
Release files / docoreai-2.7.8-py3-none-any.whl
Security for docoreai 2.7.8
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Dec 3, 2026 2 release files No provenance
Dec 2, 2026 2 release files No provenance
Dec 1, 2026 2 release files No provenance
Nov 30, 2026 2 release files No provenance
Nov 29, 2026 2 release files No provenance
Nov 28, 2026 2 release files No provenance
Nov 27, 2026 2 release files No provenance
Nov 26, 2026 2 release files No provenance
Nov 25, 2026 2 release files No provenance
Nov 24, 2026 2 release files No provenance
Nov 23, 2026 2 release files No provenance
Nov 22, 2026 2 release files No provenance
Nov 20, 2026 2 release files No provenance
Oct 28, 2026 2 release files No provenance
Oct 27, 2026 2 release files No provenance
Sep 28, 2026 2 release files No provenance
Sep 24, 2026 2 release files No provenance
Sep 23, 2026 2 release files No provenance
Aug 17, 2026 2 release files No provenance
Aug 12, 2026 2 release files No provenance
Aug 11, 2026 2 release files No provenance
Jun 18, 2026 2 release files No provenance
Jun 8, 2026 2 release files No provenance
Jun 5, 2026 2 release files No provenance
Aug 4, 2025 2 release files No provenance
Aug 2, 2025 2 release files No provenance
Apr 22, 2025 2 release files No provenance
Apr 20, 2025 2 release files No provenance
Apr 14, 2025 2 release files No provenance
Apr 11, 2025 2 release files No provenance
Apr 10, 2025 2 release files No provenance
Apr 9, 2025 2 release files No provenance
Apr 2, 2025 2 release files No provenance
Mar 27, 2025 2 release files No provenance
Mar 26, 2025 2 release files No provenance
Mar 23, 2025 2 release files No provenance
Mar 20, 2025 2 release files No provenance
Mar 17, 2025 2 release files No provenance
Mar 16, 2025 2 release files No provenance
Mar 15, 2025 2 release files No provenance
Mar 12, 2025 2 release files No provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation




