Inspiration
Group gifts are messy. Someone fronts the money, chases friends in the group chat, and if not enough people pay, the whole plan stalls. I wanted to see if an AI agent could take care of the boring, awkward parts, and do it in a way people could actually trust with their money.
What it does
Pool is an AI agent for group gifts. You tell it what you need, like "Gift for my friend Priya, a woman who loves hiking, $150 budget." The agent searches real products through Channel3, picks one within budget, and creates a funding pool with a deadline.
Friends contribute through PayPal. Each contribution is an authorization, which is a hold on their money and not a charge. When the holds add up to the goal, the app captures every payment. If the deadline passes and the goal wasn't met, every hold is released and nobody pays a cent. Every step is written to an activity log you can see in the app.
How we built it
- The agent: Amazon Bedrock (Nova Lite) with three tools: search products, create a pool, and check pool status.
- Products: Channel3 gives the agent real products with prices from multiple retailers, and I use the cheapest in-stock offer.
- Payments:the PayPal sandbox (Orders API with authorize, capture, and void).
- App and data:Python, Streamlit, SQLAlchemy, and SQLite, hosted on Render.
- Tests:7 Pytest tests cover the safety check.
The design choice I care about most is that the AI can't move money. It has no tool for capturing or voiding payments. Those actions only run from plain code, after a check that the pool is open, every authorization is present and unique, and the total meets the goal. Prices come from Channel3, not from the model, and a pool has to fit the user's budget.
Challenges we ran into
- PayPal has no escrow.I solved it with authorize now and capture later, so money is only taken when the goal is reached.
- The model made small mistakes.It once picked men's boots for a gift for Priya, leaked its internal reasoning into the answer, and told users everyone could pay up to the full budget. I fixed these with a clearer prompt, output cleanup, and hard checks in code.
- Timeouts after deploying.PayPal's sandbox sometimes answered slowly from my hosted server, so I added longer timeouts, retries, and token caching.
- Credentials and redirects.I moved from a root login to a limited IAM user, and I had to make PayPal return buyers to the right address in each environment.
Accomplishments that we're proud of
- The agent can't touch the money. It can search products, create a pool, and check status, but it has no tool that captures or voids a payment. Those actions only run from plain code, after a check that the pool is open, every authorization is unique, and the total meets the goal.
- It works end to end with real services. The live app uses Amazon Bedrock for the agent, Channel3 for real product search, and the PayPal sandbox for authorizing, capturing, and voiding payments. I tested both paths: a funded pool captures every payment, and a missed goal releases every hold.
- Nobody is charged unless the group succeeds. PayPal has no escrow, so I used authorize-now, capture-later to get the same result.
- 7 automated tests cover the safety check: underfunded, closed, duplicate, and missing-authorization cases.
- A clear activity log. Every step the agent and the app take is recorded and shown, so you can see what happened and why.
- I finished it and shipped it. It runs on a live URL, with a public repo, a README, and an MIT license, all built and deployed in a few weeks.
What we learned
Letting an AI decide is very different from letting an AI act. Giving the agent only safe tools, and putting simple, testable code between its decisions and any money movement, made the whole system easier to trust and easier to debug.
What's next for Pool: AI Agent for Group Gifts
- A real checkout step after a pool is funded
- Invitations to friends by link, text, or email
- Reminders before the deadline
Built With
- amazon-bedrock
- channel3
- paypal
- pytest
- python
- render
- sqlalchemy
- sqlite
- streamlit