Metadata-Version: 2.4
Name: maas_finops_sdk
Version: 1.0.0
Summary: MAAS FinOps SDK: A zero-latency physics engine for LLM prompt caching optimization.
Author: MAAS Enterprise
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: requires-python

MAAS FinOps SDK

The zero-latency token physics and routing engine for Large Language Models.

MAAS FinOps is the foundational FinOps layer of the MAAS PlayBook OS. It intercepts your LLM API calls, calculates real-time token physics, and dynamically triggers Context Caching (like Google Vertex) only when it is mathematically optimal.

Cut your multi-agent API bills by up to 40% with zero changes to your agent's internal logic.

🚀 Installation

pip install maas-finops-sdk


🧠 The "Drop-In" Integration

You do not need to rewrite your LangChain, CrewAI, or custom agent loops. Just wrap your native LLM call with the MAAS Router.

from maas_finops_sdk import MaasRouter
from google import genai

# 1. Initialize the Router
finops_router = MaasRouter(
    api_key="sk_live_your_api_key", 
    mode="live" 
)

client = genai.Client()

# 2. Wrap your native API call
# The router automatically calculates optimal cache thresholds via
# asynchronous Bayesian Optimization (Optuna) and returns the native response.
response = await finops_router.execute(
    agent_id="Financial_Analyst_Bot",
    run_id="user_session_9921",       
    provider="google",
    client=client,                    
    model="gemini-1.5-pro",
    messages=user_messages
)

print(response.text)


📊 Live Telemetry

The SDK operates fully asynchronously. It will never block or slow down your agent's execution. Telemetry and token physics are streamed silently to your MAAS Dashboard, allowing you to visualize your Bathtub Curves and live savings.
