Inspiration
Kenyan coffee and tea exporters often sell on credit to buyers in the US, the Middle East and China. When a buyer pays late, someone has to chase them, and that job falls on people who are already running the business.
The time difference makes it harder. A buyer's working day is the middle of the night in Nairobi, so by the time they're ready to talk, the exporter is asleep. Then there's tone. Too soft and the invoice sits unpaid for another month. Too sharp and you lose a buyer you've spent years building a relationship with.
We wanted something that does the repetitive part of collections all the time, and brings the exporter in only when a real decision has to be made.
What it does
Recoverly is a set of AI agents that manage an overdue invoice from start to finish.
You upload a contract and an invoice to Slack. Recoverly pairs them and pulls out the buyer, the amount, the due date and the contract terms. From then on, a Strands agent checks every open case every 15 minutes.
For ordinary cases, roughly 7 to 14 days overdue with no dispute and a moderate balance, it sends a polite reminder by email on its own. Anything riskier becomes a card in Slack with the evidence and a clear choice: approve, revise or reject. That covers disputes, large balances, phone calls, final notices and arbitration letters. Nothing with legal or relationship consequences goes out without a person approving it.
Every email includes a payment link for that specific case. The buyer can pay by card through Paystack, in stablecoins or by wire. When the payment is confirmed, Recoverly matches it to the case, updates the balance, closes the case and posts a receipt to Slack and email.
How we built it
- Agent: the core is a Strands agent with a small set of tools. It lists the cases that need action, sends a routine reminder, or asks an operator to decide. A scheduler runs it every 15 minutes, and it's packaged to deploy on Amazon Bedrock AgentCore.
- Specialists: separate modules handle document intake, buyer history, message tone, demand letters, voice calls and payments.
- App and messaging: Flask handles the webhooks and the payment page. Slack is where operators work, Resend sends the email, and Twilio with Fish Audio handles approved phone calls.
- Payments: Paystack payments are confirmed by a signed webhook, and a separate watcher confirms stablecoins transfers by reading each transfer's memo.
- Storage: case state lives in JSON files with file locks, which kept the prototype easy to inspect and debug.
Challenges we ran into
Deciding what the agent may do alone. Early on it was tempting to let the model choose everything. We ended up with fixed rules the model can't override: automatic sends are limited to low-risk reminders, and everything else has to go through a person.
Never emailing a buyer twice. Retries, repeated button clicks and overlapping scheduler runs could all send the same email twice. Every outgoing email is now keyed on a hash of the recipient and content, and a lock is held around each case.
Slack's 3-second limit. Slack expects a reply to a button click within 3 seconds, and sending an email can take longer than that. We had to watch how much work happens before Recoverly answers Slack.
Accomplishments that we're proud of
- A full working flow: a real invoice goes from a Slack upload to an approved demand letter in Gmail, then a card payment, then an automatically closed case.
- Human judgment stays with humans: the agent handles the routine work, and people make the calls that could damage a relationship.
What we learned
- Rules before model: agents are most useful when their limits are explicit. Checking the rules in code first, and using the model for judgment and wording, worked better than one open-ended prompt.
- Reliability decides trust: in collections, a duplicate email or a payment matched to the wrong case costs more trust than a slow reply. The duplicate-send and matching safeguards mattered more than any single feature.
- The market shapes the product: local currency settlement and time zones aren't edge cases for African exporters. They're everyday reality.
What's next for Recoverly
- Mobile money and more currencies
- Buyer replies: understand payment promises and disputes in buyer emails, and update the case automatically.
- Production setup: move from JSON files to PostgreSQL, add operator accounts, and run the agent on AgentCore full time.
- Pilot: test it with a small group of Kenyan coffee and tea exporters.
Log in or sign up for Devpost to join the conversation.