Wire Desk
A treasury agent that plans payments. It cannot send a wire until the treasurer approved that wire on their phone.
This page is a draft. The code exists, and not all of it has been run for this page yet. The page says what was checked.
Scenario
A treasurer asks the agent to pay a supplier. The model plans the transfer and calls the wire tool. The graph does not run the tool: it first asks the treasurer, with the amount and the recipient in the request. The payments API accepts only a token that carries that approval.
People and agents
| Who | Role in the application | Identity in LumoAuth |
|---|---|---|
| Treasurer | Asks for payments and approves each wire. | A user with the LumoAuth app enrolled. |
| Wire agent | Plans payments. | A registered agent with the switch "May act on behalf of users". |
| Payments API | Sends the wire. | A resource that verifies the token and the approved detail. |
Flows
| Flow | What happens | What LumoAuth does |
|---|---|---|
| Plan | The model decides to call wire_transfer. | Nothing yet. |
| Ask | The ask_human node sends the request. | Delivers it to the phone and waits up to 120 seconds. |
| Approve | The treasurer approves. | Returns the approval to the agent. |
| Send | The tool node calls the payments API. | The API verifies a token that is bound to the agent and approved for this amount and recipient. |
| Deny | The treasurer denies. | The agent gives the denial to the model, which tells the treasurer. |
Parts
| Part | Built with | Job |
|---|---|---|
| Agent | LangGraph, the Python SDK | The graph with its approval node. |
| Payments API | FastAPI, lumoauth[fastapi] | require_access_token with DPoP, and the check of the approved detail. |
What the seed script creates
- The agent.
- The payments API as a resource.
- A test treasurer.
Walkthrough
- Enroll the phone of the test treasurer.
- Ask for a wire and approve it.
- Ask for a wire and deny it.
- Ask for a wire and let it expire.
- Read the three outcomes in the audit log.
Before you run it
- An agent may send 10 requests in 5 minutes for one person.
- Check that your plan includes acting for users in the plans matrix.
Where the code is today
wire_agent.py in the Python SDK holds the agent and the approval node. The payments API is the part to build.