Overview

Want to know how this project was built? Read the article written by Ricardo Mello.

What this is

A simple Warehouse Management System: goods come in, goods go out, and stock gets replenished. The twist is the last part — nobody asks for the replenishment. When an outbound invoice is executed, an AI agent wakes up on its own, looks at the stock, reads the rules agreed with the depositor and decides whether to reorder.

How it works

Inbound
—
⟶
Inventory
—
⟶
Outbound
—
⟵⟶
The agent triggers itself here
Executing an outbound invoice publishes an OutboundInvoiceCompleted event after the transaction commits. There is no “run agent” button.
↓
Replenishment Agent
—
ANALYSIS POLICY DECISION REPLENISHMENT NOTIFICATION
↓
Human approves
then the e-mail goes out

Start here

New product

Products

CodeNameId

New depositor

Depositors

IdCodeNameEmail

Inventory

Product codeDepositorQuantity

New inbound invoice

Inbound invoices

NumberDepositorStatus

New outbound invoice

Outbound invoices

NumberDepositorStatus

Stock movements

DateTypeProduct codeDepositorQuantityInvoice

Agreed policies

What the agent retrieves

Replenishments

IdDepositorMessageStatus

Agent runs