Two agents, one wallet: a memory graph that stops duplicate spends
Описание и применение
Два ИИ‑агента с общей платежной властью могут потратить одни и те же средства дважды из‑за ограниченной памяти. Внедрение общего графа памяти в FalkorDB позволяет агентам проверять наличие уже заявленного объёма, отменять полномочия и выдавать доказательства отказа. После исправления ограничений по суммам, срокам и устойчивости к сбоям все тесты прошли.
Задача
When two AI agents share spending authority, each can unknowingly spend the same amount twice because their memory is limited to their own context window.
Результат
The graph prevented duplicate spends, enforced revocation, and provided receipt‑based provenance for refusals. After fixing cumulative caps, expiry, and crash‑resilience, all seven benchmark cases passed.
Рабочий процесс
- 1. Agent A spends $120 on cloud‑gpu against a shared $500 permit pool; the graph records the claim.
- 2. Agent B attempts the same spend; it queries the graph, finds A’s claim, and refuses the spend citing the claim ID.
- 3. Revoking the permit node causes both agents to fail closed, with no live authority and no exceptions.
- 4. The graph is cleared before each run to avoid stale state.
Доказательства
Give two AI agents the same spending authority and they will, sooner or later, pay for the same thing twice.
Before any spend, an agent asks the graph three questions: Has this scope already been claimed? Is this authority still live? What did the last agent learn about this merchant?
Agent B tries the same spend — and asks the graph first. It finds A's claim and refuses: duplicate scope, already claimed, citing the claim's ID as provenance.
The demo graph ends at 9 nodes / 11 edges; the final audited suite passes 17/17 slice tests and 5/5 Falkor-backed tests.
Clear the graph before every run. A second run on a dirty graph still passes but the counts drift (13 nodes / 19 edges) — stale state lies quietly, so the runbook wipes first, every time.
First run: 4 of 7. Then I fixed the three misses and ran the identical frozen set again: 7 of 7.
- Дата записи: 2026-10-18T00:41:01.221Z