Infrastructure · India · INR settlement

    Agents are economic actors.
    They need financial rails.

    MetricAI sits in front of your model calls. It meters every request, binds spend to agents and sessions, and produces numbers you can bill against. Built for production ledgers, not demos.

    Live/Proxy trace
    // Route the SDK through MetricAI. One line.
    client = metricai.wrap(openai, { project_key: "pk_live__" })
    
    → POST /v1/chat/completions  intercepted  session=ses_8k2m

    ₹ figures illustrative — wiring is real.

    First 3 Months FREE

    No credit card required

    500+

    Teams

    Production agent workloads tracked

    ₹10Cr+

    AI Spend Tracked

    Metered across providers and sessions

    99.9%

    Uptime

    Proxy and settlement infrastructure

    T METERING·SESSION ATTRIBUTION·GST-READY LINE ITEMS·PROVIDER COST RECONCILIATION·MCP PAYMENT RAILS·RATE LIMITS BY AGENT·AUDIT-GRADE REQUESTS
    T METERING·SESSION ATTRIBUTION·GST-READY LINE ITEMS·PROVIDER COST RECONCILIATION·MCP PAYMENT RAILS·RATE LIMITS BY AGENT·AUDIT-GRADE REQUESTS

    The old model breaks under agents.

    A static API key and a monthly OpenAI invoice tell you nothing about who burned what. Loops and tool chains turn small mistakes into large bills.

    Before

    • Long-lived API keys. No per-actor limits. Revocation is coarse.
    • Agents retry and recurse. Spend spikes while product metrics look flat.
    • Finance sees one provider total. Engineering cannot answer margin per customer.

    Agent economy

    • Every completion flows through a proxy you control. Keys never touch the client.
    • Usage is tagged with session, agent_id, and end_user.
    • Rupee-denominated lines roll into invoices your CFO can defend in review.

    How traffic flows.

    Your application keeps the same SDK surface. MetricAI terminates TLS, normalizes provider quirks, and emits metering events you can bill on.

    Your app

    Agents, backends, workers. Anything that calls chat or completions today.

    MetricAI proxy

    Auth, metering, attribution, settlement. One choke point for policy.

    LLM providers

    OpenAI-compatible and first-party routes. Provider keys stay server-side.

    No provider credentials in the browser
    Request-level audit trail
    Idempotent settlement hooks
    Designed for Indian tax reporting workflows

    Platform

    Everything you need to run AI at scale.

    Observability, routing, and billing infrastructure built for India's agent economy.

    Cost Tracking

    Real-time spend by agent, session, and model. INR-native ledgers finance can reconcile.

    Multi-Provider

    OpenAI, Anthropic, Bedrock, and more through one proxy. Keys stay server-side.

    Smart Routing

    Auto-select the best model per request with fallbacks, rules, and A/B testing.

    Alerts

    Cost, error, and latency thresholds with email, Slack, and dashboard notifications.

    Team

    Invite members, assign roles, and share dashboards across your organization.

    Analytics

    Margin analysis, latency trends, tool overhead, and session-level debugging.

    Billing

    Outcome-based billing.

    Tokens are inputs. Customers pay for results. MetricAI keeps both: provider cost from the wire, and commercial outcomes you define. Finance gets a line that maps to a contract clause.

    // Bill on completion, not raw tokens
    
    await metricai.record_outcome({
    
      session_id: "ses_8k2m",
    
      outcome: "ticket_resolved",
    
      value_inr: 49.00,
    
    });

    Surface vs. depth

    One record_outcome call
    • Token normalization across providers
    • Streaming completion accounting
    • Session and agent attribution
    • Idempotency and replay safety
    • Ledger events for downstream ERP
    • GST-ready amount breakdowns

    Economics

    Agent-level profitability.

    Same product surface, different burn profiles. MetricAI rolls provider cost to the agent that triggered it. You see who subsidizes whom.

    agent_support_tier1

    ₹+18,420

    Recommendation
    Ship more. Margin covers retries.

    agent_onboarding

    ₹0

    Recommendation
    Breaking even. Cap prompts or shorten the system message.

    agent_research

    ₹−6,900

    Recommendation
    Disable browse tool or require approval.

    Protocol

    Stripe for MCP servers.

    Tool vendors need pricing that survives partial failures and double posts. MetricAI treats MCP calls like payment intents: correlated, auditable, and priced in INR before they hit your general ledger.

    // Agent A pays Agent B for an MCP tool call (sketch)
    
    POST /v1/mcp/transfer
    
    {
    
      "payer_agent": "agent_sales",
    
      "payee_server": "mcp_crm_acme",
    
      "correlation_id": "corr_9x1",
    
      "amount_inr": "12.50",
    
      "memo": "lookup_customer_record"
    
    }

    Where the agent economy goes.

    We are not optimizing for a hero demo. The work is plumbing: identifiers on every call, deterministic metering, and contracts that survive an audit.

    India adds GST discipline and rupee settlement expectations. MetricAI is written with that operating context from day one.

    Live

    OpenAI-compatible proxy

    Meter chat and completions. Tag sessions and agents. Export usage for billing.

    Building

    Settlement pipeline

    INR line items, tax metadata, and hooks into invoicing. Fewer spreadsheet bridges.

    Roadmap

    Cross-agent clearing

    Net positions between internal agents and external MCP vendors on one statement.

    Roadmap

    Policy engine

    Hard budgets per agent, circuit breakers on runaway loops, approval gates on spend.

    Get started.

    Integration is deliberately boring. If you already call OpenAI from the server, you are one wrapper away from metered traffic.

    1. 01

      Create a project

      You get a project key and proxy host. Keys are rotatable without redeploying provider secrets to clients.

    2. 02

      Wrap the SDK

      One wrapper call. Headers carry session and agent identifiers. Streaming responses are still supported.

    3. 03

      Route traffic

      Point staging first. Compare provider invoices to MetricAI totals. Discrepancies should be explainable in one query.

    4. 04

      Close the loop

      Pull usage exports or webhooks into your billing system. Outcome lines are explicit events, not guesses.

    pip install metricai-sdk
    
    from metricai import wrap
    from openai import OpenAI
    
    base = OpenAI()
    client = wrap(base, project_key="pk_live__")
    
    # All completions are metered and attributed
    r = client.chat.completions.create(
        model="gpt-4o",
        messages=[{"role": "user", "content": "..."}],
        extra_headers={
            "X-MetricAI-Session": "ses_8k2m",
            "X-MetricAI-Agent": "agent_support_tier1",
        },
    )
    First 3 Months FREE

    Start tracking AI costs in minutes.

    Full observability access. No credit card required. Five-minute setup with our SDK.

    No credit card required · 5-minute setup

    Request beta access.

    We are onboarding teams that already run agent workloads in production and need metering they can take to finance. Short form below. No automated drip.