DEVELOPER DOCS

REST API

Savings & Optimization

On this page

Recommendation engines that identify spend and latency you can remove without changing outcomes. These are advisory only — Evigauge never actuates a change to your agents.


Savings recommendations

HTTP
GET /v1/observ/orgs/{org}/workspaces/{ws}/savings/recommendations

Workspace-wide savings opportunities, ranked by estimated monthly value. Covers prompt caching and context optimization.

Auth: API key or JWT · Role: viewer

Query parameters

NameTypeRequiredDefaultDescription
limitinteger➖50Max recommendations returned

Response 200 — not schema-modelled

JSON
{
  "recommendations": [
    {
      "kind": "prompt_caching",
      "scope": "checkout-agent",
      "rationale": "A 4.1k-token system prompt is resent on every call; 82% of calls share it verbatim.",
      "estimated_monthly_savings_usd": 214.60,
      "affected_trace_count": 8120,
      "confidence": "high"
    }
  ],
  "total_estimated_monthly_savings_usd": 214.60
}

Examples

recs = evigauge.get("/v1/observ/orgs/{org}/workspaces/{ws}/savings/recommendations",
                    params={"limit": 10})
print(f"Total opportunity: ${recs['total_estimated_monthly_savings_usd']:,.2f}/mo")
for r in recs["recommendations"]:
    print(f"  [{r['confidence']}] {r['kind']}: ${r['estimated_monthly_savings_usd']:.2f}/mo")

Savings for one trace

HTTP
GET /v1/observ/orgs/{org}/workspaces/{ws}/savings/trace/{trace_id}

The savings analysis narrowed to a single trace.

Auth: API key or JWT · Role: viewer

Path parameters

NameTypeRequiredDescription
orgstring✅Organization slug
wsstring✅Workspace slug
trace_idstring✅Trace ID

Examples

s = evigauge.get(f"/v1/observ/orgs/{{org}}/workspaces/{{ws}}/savings/trace/{trace_id}")
print(s)

Optimization flags

HTTP
GET /v1/observ/orgs/{org}/workspaces/{ws}/optimization/flags

Open optimization flags raised across the workspace.

Auth: API key or JWT · Role: viewer

Response 200 — not schema-modelled

JSON
{
  "flags": [
    {
      "flag_id": "f_01J8...",
      "kind": "over_provisioned_model",
      "severity": "medium",
      "first_seen": "2026-08-28T09:14:00Z",
      "occurrence_count": 412,
      "summary": "Extraction step uses a frontier model for a deterministic task."
    }
  ]
}

Examples

flags = evigauge.get("/v1/observ/orgs/{org}/workspaces/{ws}/optimization/flags")
for f in flags["flags"]:
    print(f"[{f['severity']}] {f['kind']} ×{f['occurrence_count']}")

Over-provisioned traces

HTTP
GET /v1/observ/orgs/{org}/workspaces/{ws}/optimization/over-provisioned

Traces that used more model capability than the task required — the concrete evidence behind an over_provisioned_model flag.

Auth: API key or JWT · Role: viewer

Examples

op = evigauge.get("/v1/observ/orgs/{org}/workspaces/{ws}/optimization/over-provisioned")
print(op)