request_reallocation
Reallocate unused token budget from lower-priority idle agents to an agent that needs more tokens, respecting priority and minimum reserves. Returns a plan with donors, amounts, and any shortfall.
Instructions
The core allocation-decision tool. Given an agent that needs additional tokens right now, run the library's priority-weighted borrowing logic to pull spare budget from eligible donor agents - starting with the lowest-priority, most-idle ones - and apply it for real. A donor is only eligible if its priority is <= the needy agent's priority (budget never flows from a more important agent to a less important one) and it never gives up tokens below its own protected min_reserve. Returns a concrete plan: which agents gave up how many tokens, which agent received them, why each donor was eligible, and how much of the requested amount could not be covered (if any). This performs a real reallocation against the live ledger, not a dry-run simulation - call get_remaining_budget first if you only want to inspect state without moving tokens.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes | The agent that needs additional budget right now. | |
| tokens_needed | Yes | How many additional tokens this agent needs beyond what it currently has remaining. |