← Playbooks

Starter pack

Passport JSON

Paste into PUT /v1/agents/:id/passport.

[
  {
    "scope": "finances",
    "level": "observe",
    "resource_type": "business",
    "resource_id": "{{business:tharan}}"
  },
  {
    "scope": "forecast",
    "level": "observe",
    "resource_type": "business",
    "resource_id": "{{business:tharan}}"
  },
  {
    "scope": "ads",
    "level": "execute",
    "resource_type": "business",
    "resource_id": "{{business:tharan}}",
    "limits": {
      "max_amount_minor_per_action": 50000,
      "max_amount_minor_per_day": 200000,
      "max_amount_minor_per_month": 1000000,
      "max_change_pct_per_day": 10,
      "currency": "PLN"
    }
  },
  {
    "scope": "subscriptions",
    "level": "observe",
    "resource_type": "all"
  },
  {
    "scope": "decisions",
    "level": "execute",
    "resource_type": "business",
    "resource_id": "{{business:tharan}}"
  },
  {
    "scope": "goals",
    "level": "observe",
    "resource_type": "business",
    "resource_id": "{{business:tharan}}"
  }
]

#Pakiet startowy: SaaS z reklamami (marketing + finance)

Dla kogo: SaaS z płatnościami Stripe i kampaniami Google/Meta; agent pilnuje pacingu, CAC i budżetów dziennych w granicach ±10 %, resztę proponuje.

Passport: szablon marketing (ads:execute z limitami 500/2 000/10 000 PLN i ±10 %/dzień) + finance (observe) dla jednego biznesu:

[
  { "template_id": "marketing", "business_id": "{{business:tharan}}", "limits_currency": "PLN" },
  { "template_id": "finance", "business_id": "{{business:tharan}}" }
]

(dwa wywołania POST /v1/agents/:id/passport/from-template, drugi zastępuje granty, więc w praktyce: finance dla agenta obserwującego, marketing dla agenta reklamowego; ten pakiet zakłada jednego agenta z grantami jak w nagłówku.)

#System prompt (skopiuj)

You are the marketing and finance agent of a SaaS in Operlance. Every morning: get_daily_brief(business_id), get_business_context(business_id), get_ad_performance(business_id). Compare planned, reserved and actual ad spend (three separate numbers) and pacing against the month. Before changing any daily budget: create_decision with expected revenue and a 7-day horizon, simulate_scenario with DAILY budgets, then propose_ad_budget_change. Within 10 % per day your change is executed as a plan (201) and still logged as an approval; above that it waits for the owner (202). Never split a change into smaller ones to stay under a limit; never touch other businesses or personal. When CAC or attributed revenue is unavailable, say so and ask for the integration with request_data instead of guessing. Report numbers with currency, coverage and data_class.

#Pierwszy dzień: kolejność tools

  1. Onboarding.
{
 "data": {
  "about": "Operlance is the shared financial source of truth for the owner's businesses, built for AI agents as first-class users. Every amount is {amount_minor, currency} with provenance and data coverage. The human owner stays the final authority: you act only through explicit, revocable grants, and anything outside them ends as an approval request.",
  "my_passport": {
   "agent": {
    "id": "<id-19>",
    "name": "starter/saas-ads agent",
    "kind": "custom"
   },
   "grants": [
    "ads:execute@business:<business:tharan> ≤ ±%/day=10,day=200000,month=1000000,action=50000 PLN",
    "decisions:execute@business:<business:tharan>",
    "finances:observe@business:<business:tharan>",
    "forecast:observe@business:<business:tharan>",
    "goals:observe@business:<business:tharan>",
    "subscriptions:observe@all"
   ],
   "expires_at": null,
   "token_expires_at": "2026-12-17T…Z"
  },
  "businesses_accessible": [
   {
    "id": "<business:clothing>",
    "name": "Clothing",
    "currency": "EUR",
    "projects": [
     {
      "id": "<project:Drop 01>",
      "name": "Drop 01"
     },
     {
      "id": "<project:Drop 02>",
      "name": "Drop 02"
     }
    ]
   },
   {
    "id": "<business:klima>",
    "name": "Klima",
    "currency": "PLN",
…
  1. Kontekst i Ads.
{
 "data": {
  "business": {
   "id": "<business:tharan>",
   "name": "THARAN",
   "currency": "USD"
  },
  "projects": [
   {
    "id": "<project:iOS>",
    "name": "iOS"
   },
   {
    "id": "<project:US Ads>",
    "name": "US Ads"
   },
   {
    "id": "<project:Web App>",
    "name": "Web App"
   }
  ],
  "summary_30d": {
   "from": "2026-08-20",
   "to": "2026-09-18",
   "revenue_minor": 2228800,
   "costs": {
    "planned_minor": 636253,
    "reserved_minor": 500000,
    "actual_minor": 997430,
    "variance_minor": 361177
   },
   "result_minor": 1231370,
   "recurring_burn_minor": 997430,
   "runway_days": 114,
   "revenue_delta_minor": 0,
   "top_cost_changes": [
    {
     "category": "ads",
     "actual_minor": 658767,
     "delta_minor": 29004
…
{
 "data": {
  "period": {
   "from": "2026-09-01",
   "to": "2026-09-18"
  },
  "currency": "USD",
  "totals": {
   "spend": {
    "planned_minor": 600000,
    "reserved_minor": 277280,
    "actual_minor": 626000,
    "variance_minor": 26000
   },
   "metrics": {
    "impressions": 506000,
    "clicks": 10100,
    "conversions": 199,
    "conversion_value_minor": 1355000,
    "cpa_minor": 3146,
    "cpc_minor": 62,
    "ctr": 0.02,
    "roas": 2.16
   },
   "pacing": {
    "period_elapsed_pct": 94.4,
    "budget_used_pct": 104.3,
    "status": "on_track",
    "projected_exhaustion_on": "2026-09-17",
    "reasons": [
     {
      "code": "budget_exhausted",
      "message": "Budżet wykorzystany w 104.3%."
     }
    ]
   },
   "unallocated_reserved_minor": 0
  },
  "platforms": [
   {
…
  1. Symulacja przesunięcia 300 zł/dzień (bez zapisu).
{
 "data": {
  "scope": {
   "kind": "business",
   "business_id": "<business:tharan>"
  },
  "currency": "USD",
  "horizon_days": 30,
  "from": "2026-09-18",
  "to": "2026-10-18",
  "changes": [
   {
    "kind": "change_ad_budget",
    "platform": "google_ads",
    "current": {
     "amount_minor": 90000,
     "currency": "PLN"
    },
    "proposed": {
     "amount_minor": 120000,
     "currency": "PLN"
    }
   },
   {
    "kind": "change_ad_budget",
    "platform": "meta_ads",
    "current": {
     "amount_minor": 80000,
     "currency": "PLN"
    },
    "proposed": {
     "amount_minor": 50000,
     "currency": "PLN"
    }
   }
  ],
  "baseline": {
   "closing_cash_minor": 5462773,
   "min_cash_minor": 3778671,
   "net_minor": 1662773,
…
  1. Decyzja i propozycja (+33 % → 202).
{
 "status": "executed",
 "data": {
  "id": "<id-43>",
  "owner_id": "<id-44>",
  "type": "agent_action",
  "state": "actual",
  "status": "confirmed",
  "amount_minor": 0,
  "currency": "USD",
  "direction": null,
  "business_id": "<business:tharan>",
  "personal": false,
  "project_id": null,
  "occurred_on": "2026-09-18",
  "category": null,
  "description": "Move 300 PLN/day from Meta to Google",
  "subscription_id": null,
  "reservation_id": null,
  "integration_id": null,
  "external_id": null,
  "supersedes_event_id": null,
  "provenance": {
   "reason": "journal",
   "source": {
    "type": "AI_AGENT",
    "agent_id": "<id-19>",
    "approval_id": null,
    "external_id": null,
    "integration_id": null
   },
   "confidence": 0.9,
   "data_class": "agent_reported",
   "recorded_at": "2026-09-18T…Z"
  },
  "payload": {
   "action": "create_decision",
   "params": {
    "refs": [],
    "title": "Move 300 PLN/day from Meta to Google",
…
{
 "status": "pending_approval",
 "approval_id": "<id-46>",
 "coverage": {
  "coverage_pct": 0.74,
  "domains": {
   "revenue": {
    "status": "accurate",
    "sources": [
     "STRIPE_API"
    ],
    "last_sync_at": "2026-09-18T…Z"
   },
   "ad_spend": {
    "status": "accurate",
    "sources": [
     "GOOGLE_ADS_API",
     "META_API"
    ],
    "last_sync_at": "2026-09-18T…Z"
   },
   "subscriptions": {
    "status": "incomplete",
    "sources": [
     "HUMAN",
     "SYSTEM"
    ],
    "last_sync_at": null
   },
   "operating_costs": {
    "status": "mostly_covered",
    "sources": [
     "AI_AGENT",
     "ANTHROPIC_API",
     "HUMAN",
     "OPENAI_API",
     "STRIPE_API"
    ],
    "last_sync_at": "2026-09-18T…Z"
   },
…
  1. Owner odrzuca w tym pakiecie (żeby seed został czysty).
{
 "status": 200,
 "data": {
  "id": "<id-46>",
  "owner_id": "<id-44>",
  "agent_id": "<id-19>",
  "action": "propose_ad_budget_change",
  "params": {
   "reason": "Google CAC lower than Meta: move 300 PLN/day",
   "current": {
    "currency": "PLN",
    "amount_minor": 90000
   },
   "platform": "google_ads",
   "proposed": {
    "currency": "PLN",
    "amount_minor": 120000
   },
   "business_id": "<business:tharan>"
  },
  "reason": "Google CAC lower than Meta: move 300 PLN/day",
  "amount_minor": 30000,
  "currency": "PLN",
  "business_id": "<business:tharan>",
  "personal": false,
  "status": "rejected",
  "decided_by": "<id-44>",
  "decided_at": "2026-09-18T…Z",
  "decision_note": "starter pack",
  "expires_at": "2026-09-25T…Z",
  "result_ref": null,
  "idempotency_key": "starter-saas-p1",
  "created_at": "2026-09-18T…Z",
  "kind": "write"
 },
 "request_id": "req_<id-48>"
}

#Oczekiwane approvals

Zmiany budżetu powyżej 10 %/dzień i powyżej 500 PLN na akcję; każda prośba o dane lub dostęp. Zmiany w limitach są wykonywane od razu i widoczne w audycie jako auto-approved.

#Czego agent nie zrobi

Nie zapisze kosztów ani rezerwacji, nie wyda więcej niż 2 000 PLN dziennie i 10 000 PLN miesięcznie (403 limit_exceeded), nie dotknie realnych kont reklamowych w MVP (zapis planu), nie zobaczy Clothing/Klima ani personal.