Payment agent

TrueLayer sandbox · test money only

An AI agent making account‑to‑account payments on Open Banking rails.

It sends money straight from one bank account to another, with no card involved. Before it sends anything, it checks that the name you typed really owns the account, and it stops and asks you whenever a rule says a person should decide.

When it does pay, your bank still asks you to confirm it is really you, exactly as it would if you had made the payment yourself.

Every payment runs on the TrueLayer sandbox with test money. The payee check is simulated, since TrueLayer's Verification of Payee service is not available to developers yet. Everything else is a real API call.

The instruction

42.00 GBP to Pinguin Pfannkuchen GmbH

The bank holds a name for each account. This one is checked against it.

Over 1,000 the agent always asks a human.

Try making it refuse

The route

Every box is a node in the graph and every arrow an edge it can take. Running a payment lights the path it walked and dims the branches it turned down, with the rule that made each turn written beside the arrow.

Reading the graph…

  1. Read the instruction

  2. Check the payee against the account

  3. Check the consent is still valid

  4. Score the risk

  5. Ask a human

  6. Create the payment

  7. Confirm with the bank

Every number below is read from the running system.

The graph shape comes from the compiled graph, the eval results from the last recorded experiment. Nothing here is typed into the page by hand.

The graph

9 nodes, 15 edges, 10 of them conditional

Built with LangGraph. The conditional edges are the product rules: a failed payee check routes to a stop before consent is read, an amount over the ceiling routes to a human. The pause is interrupt(), resumed with Command(resume=…), so the earlier checks never run twice.

Read the graph definition
loading…

The evals

13 of 13 cases passing

13 scenarios in a versioned LangSmith dataset, scored by 5 evaluators. Each case asserts where the run ended and which nodes it must never have touched, because the question worth asking of an agent with a payment API is whether it ever reached the node that moves money.

    The pause, and where it lives

    postgres

      A paused run is written to a checkpointer, so an approval arriving later resumes it in a different process entirely. On this deployment that is Neon Postgres in Frankfurt. Run it locally without a database and it falls back to memory, which is why the eval suite needs no configuration.

      Every eval case, and the guarantee it protects
      CaseSplitProtectsResult

      What is real here, and what is not

      Real
      OAuth against TrueLayer, request signing, POST /v3/payments, the status read back from the provider afterwards, and the bank's own authentication screen.
      Simulated
      The payee check, because TrueLayer's Verification of Payee service is expected in H2 2026 and is not available on a developer account today. It runs behind an adapter, so the real service replaces one file when it ships. Consent records and payee history are also stand-ins.
      Never real
      The money. Sandbox only.
      Every decision this agent has made

      Recorded in an append-only ledger

      Built with Claude Code. The graph, its routing rules and a 13-scenario eval suite are in the repository.