Passport JSON
Paste into PUT /v1/agents/:id/passport.
[
{
"scope": "finances",
"level": "observe",
"resource_type": "business",
"resource_id": "{{business:clothing}}"
},
{
"scope": "subscriptions",
"level": "recommend",
"resource_type": "business",
"resource_id": "{{business:clothing}}"
},
{
"scope": "allocations",
"level": "recommend",
"resource_type": "all"
},
{
"scope": "planned_expenses",
"level": "execute",
"resource_type": "business",
"resource_id": "{{business:clothing}}",
"limits": {
"max_amount_minor_per_action": 50000,
"currency": "PLN"
}
},
{
"scope": "budget_reserve",
"level": "execute",
"resource_type": "business",
"resource_id": "{{business:clothing}}",
"limits": {
"max_amount_minor_per_action": 50000,
"currency": "PLN"
}
},
{
"scope": "decisions",
"level": "execute",
"resource_type": "business",
"resource_id": "{{business:clothing}}"
}
]#Pakiet startowy: Sklep z dropami (ops + dev)
Dla kogo: marka odzieżowa sprzedająca w dropach; przed dropem agent planuje koszty (planned), rezerwuje budżet w limicie i pilnuje narzędzi (Postiz, Shopify) bez kupowania nowych.
Passport: szablon ops + dev dla Clothing (limity 500 PLN na akcję):
[
{ "template_id": "ops", "business_id": "{{business:clothing}}", "limits_currency": "PLN" },
{ "template_id": "dev", "business_id": "{{business:clothing}}", "limits_currency": "PLN" }
]
#System prompt (skopiuj)
You are the operations and planning agent of a clothing brand that sells in drops, in Operlance. Before a drop: get_business_context(business_id), get_available_capital, then plan every known cost with create_planned_expense (planned, never actual) and block the experiment budget with reserve_budget within your per-action limit (above it the owner approves). Tools: call plan_capacity before proposing any new subscription; a free Postiz seat beats a new tool. Cost splits between businesses and new subscriptions are recommendations (202). Keep planned, reserved and actual separate in every report and never overwrite a plan with an actual. Record the drop plan with create_decision (expected revenue, horizon 14 days) so the outcome is reviewed after the drop.
#Pierwszy dzień: kolejność tools
- Onboarding i kapitał.
{
"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/shop-drops agent",
"kind": "custom"
},
"grants": [
"allocations:recommend@all",
"budget_reserve:execute@business:<business:clothing> ≤ action=50000 PLN",
"decisions:execute@business:<business:clothing>",
"finances:observe@business:<business:clothing>",
"planned_expenses:execute@business:<business:clothing> ≤ action=50000 PLN",
"subscriptions:recommend@business:<business:clothing>"
],
"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",
…
{
"data": {
"free_capital_minor": 1083214,
"currency": "USD",
"components": {
"cash_known_minor": 1250000,
"committed_costs_minor": 0,
"reserved_budgets_minor": 150000,
"upcoming_subscriptions_minor": 16786
},
"horizon_days": 30,
"as_of": "2026-09-18",
"cash_as_of": "2026-09-18T…Z",
"cash_scope": "business",
"fx_used": [
{
"base": "PLN",
"quote": "USD",
"rate": "0.25116279",
"as_of": "2026-09-18",
"source": "mock"
}
]
},
"coverage": {
"coverage_pct": 0.4775,
"domains": {
"revenue": {
"status": "mostly_covered",
"sources": [],
"last_sync_at": null
},
"ad_spend": {
"status": "mostly_covered",
"sources": [],
"last_sync_at": null
},
"subscriptions": {
"status": "incomplete",
"sources": [
…
- Narzędzia: czy potrzebny jest nowy profil social?
{
"data": {
"plans": [
{
"unit": "social_profiles",
"amount": 1,
"business_id": "<business:clothing>",
"covered_by": {
"subscription_id": "<subscription:Postiz Pro>",
"subscription_name": "Postiz Pro",
"unit": "social_profiles",
"total": 10,
"used": 7,
"free": 3
},
"shortfall": 0,
"suggestion": "allocate",
"est_cost_minor": 0,
"currency": "PLN",
"note": "Postiz Pro has 3 free social_profiles; assign 1 instead of buying a new tool (total cost unchanged, share moves to the business)",
"proposed_allocations": [
{
"business_id": "<business:clothing>",
"share_bps": 3750
},
{
"business_id": "<business:klima>",
"share_bps": 2500
},
{
"business_id": "<business:tharan>",
"share_bps": 3750
}
]
}
],
"proposals": []
},
"coverage": {
"coverage_pct": 0.4775,
…
- Planowany koszt dropu (execute w limicie → 201).
{
"status": "executed",
"data": {
"id": "<id-26>",
"owner_id": "<id-27>",
"type": "planned_expense",
"state": "planned",
"status": "confirmed",
"amount_minor": 45000,
"currency": "PLN",
"direction": "out",
"business_id": "<business:clothing>",
"personal": false,
"project_id": null,
"occurred_on": "2026-10-10",
"category": "other",
"description": "Drop 01 photo session",
"subscription_id": null,
"reservation_id": null,
"integration_id": null,
"external_id": null,
"supersedes_event_id": null,
"provenance": {
"reason": "Drop 01 photo session",
"source": {
"type": "AI_AGENT",
"agent_id": "<id-19>",
"approval_id": null,
"external_id": null,
"integration_id": null
},
"confidence": 0.9,
"data_class": "planned",
"recorded_at": "2026-09-18T…Z"
},
"payload": {},
"created_at": "2026-09-18T…Z",
"agent_id": null,
"base_amount_minor": 11302,
"base_currency": "USD",
…
- Rezerwacja powyżej limitu → 202, Owner odrzuca (pakiet nie zostawia rezerwy).
{
"status": "pending_approval",
"approval_id": "<id-29>",
"coverage": {
"coverage_pct": 0.5575,
"domains": {
"revenue": {
"status": "mostly_covered",
"sources": [],
"last_sync_at": null
},
"ad_spend": {
"status": "mostly_covered",
"sources": [],
"last_sync_at": null
},
"subscriptions": {
"status": "incomplete",
"sources": [
"HUMAN",
"SYSTEM"
],
"last_sync_at": null
},
"operating_costs": {
"status": "incomplete",
"sources": [
"AI_AGENT"
],
"last_sync_at": null
},
"cash": {
"status": "incomplete",
"sources": [
"HUMAN"
],
"last_sync_at": null
}
}
},
…
{
"status": 200,
"data": {
"id": "<id-29>",
"owner_id": "<id-27>",
"agent_id": "<id-19>",
"action": "reserve_budget",
"params": {
"reason": "Drop 01 ads budget",
"purpose": "Drop 01 launch ads",
"category": "ads",
"currency": "PLN",
"period_end": "2026-10-31",
"business_id": "<business:clothing>",
"amount_minor": 300000,
"period_start": "2026-10-01"
},
"reason": "Drop 01 ads budget",
"amount_minor": 300000,
"currency": "PLN",
"business_id": "<business:clothing>",
"personal": false,
"status": "rejected",
"decided_by": "<id-27>",
"decided_at": "2026-09-18T…Z",
"decision_note": "starter pack",
"expires_at": "2026-09-25T…Z",
"result_ref": null,
"idempotency_key": "starter-shop-r1",
"created_at": "2026-09-18T…Z",
"kind": "write"
},
"request_id": "req_<id-31>"
}
- Plan dropu w dzienniku.
{
"status": "executed",
"data": {
"id": "<id-32>",
"owner_id": "<id-27>",
"type": "agent_action",
"state": "actual",
"status": "confirmed",
"amount_minor": 0,
"currency": "EUR",
"direction": null,
"business_id": "<business:clothing>",
"personal": false,
"project_id": null,
"occurred_on": "2026-09-18",
"category": null,
"description": "Drop 01 plan",
"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": "Drop 01 plan",
…
#Oczekiwane approvals
Rezerwacje i planowane koszty powyżej 500 PLN, każda nowa subskrypcja i zmiana podziału kosztu, jednorazowe wydatki (recommend).
#Czego agent nie zrobi
Nie zapisze actual (faktury idą z integracji lub od Ownera), nie zmieni Ads, nie zobaczy THARAN/Klima ani personal.