Change plan authority
card-plan-changes
Authority
- Ceiling
- 40 per calendar day
- Used
- 9
- Remaining
- 31
Holder
- Agent
support-agent
Scope
- Domain
- subscription-plan-change · production
- Can do
CHANGE_PLAN- Only when
- ACTIVE
- Expiry
- 15 Feb 2027
Connect this card to your agent Your agent has to ask KIFF before it acts. That is a change to your agent's code, best made with your coding agent or with a KIFF engineer.
Recommended
With your coding agent
Paste this into Claude Code, or another coding agent, in the repository where your agent runs. It already contains this card's agent name, domain and limit.
Connect my agent to its KIFF card, so the agent asks KIFF before it acts and only acts when KIFF allows it.
Card: card-plan-changes
Agent name, sent as actor_id: support-agent
Domain: subscription-plan-change
Action: CHANGE_PLAN (change subscription plans)
Limit: 40 per calendar day, counted per authorized action
Steps:
1. Find the place in this codebase where the agent performs this action. Explain it to me before changing anything.
2. Just before it runs, call POST https://api.kiff.dev/v1/proposals/decide with header "Authorization: Bearer $KIFF_CLOUD_API_KEY" and this JSON body:
{"action_name": "CHANGE_PLAN", "actor_id": "support-agent", "domain": "subscription-plan-change", "entity_id": "<the subscription id>", "entity_type": "Subscription", "parameters": {"target_plan":"<target_plan>"}}
3. Run the action only when the response's "outcome" is "allowed". On anything else, do not run it and surface "reasons" and "message" (for example mandate_limit_reached means the card's limit would be exceeded).
4. KIFF decides against the entity's current state, so the system must also report that entity's events to POST https://api.kiff.dev/v1/events/raw?domain=subscription-plan-change. Check with me which events we already emit.
5. Read the key from the environment variable KIFF_CLOUD_API_KEY and never hard-code it. Ask me for it. The key must hold the "support" role, or KIFF refuses the action on permissions before it checks the card (I can create one with that role on the card's page in KIFF). It must also be the key issued for support-agent: KIFF refuses a key issued for another agent (actor_not_key_holder), and a key not issued for any agent wherever a card is drawn on (key_not_bound_to_agent).
6. Add a test for the allowed and the refused path.
Reference: https://kiff.dev/docs/five-line-integration and https://kiff.dev/llms.txtYour agent also needs its own API key: one with the support role that can act only as support-agent. A key from the API keys page is not tied to this agent and is refused.
With a KIFF engineer
For your first cards, a KIFF engineer can set this up with you: find where your agent acts, connect it, and check the first real decisions together.
Ask for guided setupTry it now
Send one real request as support-agent on a new test subscription. It draws one plan change from today's balance and shows up in this card's statement.