Workflows / Demo

An agent that follows the policy

The same expense claim, run by a durable AI agent that checks the bill against a plain-language policy.

Watch on YouTube Get the code

The use case

Ann claims 420.50 for a team dinner with a customer. The agent reads the bill, checks it against the company's expense policy written in plain language, asks Ann who attended, and hands her manager, Jane, its assessment: the wine is left out, the per-person amount is under the limit, and the total matches. Payment waits for Ivy in finance to release it. The agent checks; people decide.

Real claims need judgment: is the wine reimbursable, who was at the dinner, does the bill match
Ann filed, uploaded and answered; the agent read the bill, did the sums and asked; Jane approved; Ivy released the money

What it shows

Durable agentBill reading from an imageAsking the employeeHuman task with the agent's assessmentApproval-gated paymentICP monitoring

Run it

You need Docker with Compose (about 6 GB of memory for Docker) and a WSO2 model provider token for the agent: in WSO2 Integrator, run Configure default WSO2 Model Provider, then copy the token into config/model.toml as the README describes.

git clone https://github.com/hasithaa/workflow-demo-agentic-claim-system
cd workflow-demo-agentic-claim-system
docker compose up -d --build

Open http://localhost:8080 and sign in as Ann, Jane or Ivy (ann@, jane@, ivy@example.com, password demo12345).

Built with ballerina/workflow 1.0.2 · Ballerina 2201.14.1 · ICP 2.1.0

Learn more

The workflow docs explain each building block. See all demos.