Inspiration
We sell into B2B revenue teams and live in the corporate gifting world: ~$250B a year moves through it, and most of it lands in the bin. Every deal gets the same branded notebook, because choosing a gift a recipient actually likes is hard — and generic LLMs can't help. They'll happily write a lovely note about a gift they invented, but they have no idea what a "RevOps leader at B2B SaaS" audience actually loves. The hackathon's premise — agents can reason but are culturally blind — described our exact pain, so the idea came fast: give a gifting agent real cultural grounding with Qloo.
What it does
Gifting Agent turns deal context into a gift + note, through a five-step loop that is fully visible on screen:
- PLAN — strategy from deal state alone. A $250 close-won celebration plans differently than a $120 post-outage apology.
- TOOL — three live Qloo calls: segment affinity tags, seed-entity resolution, then cross-domain taste neighbours of the seed.
- SELECT — candidates must fit the budget AND the gift history; a domain already sent is skipped.
- CHECK — self-checks each candidate out loud (budget / freshness / evidence) and re-plans visibly on failure.
- COMPOSE — the note, in the occasion's tone, opening on shared cultural ground.
And when every domain its budget reaches is already used, it refuses to send and escalates to a human rather than repeat a gift — a repeat weakens the relationship, and the agent knows it.
How we built it
Cloudflare Worker (free tier): static demo UI served as an asset, /api/* as the agent loop in TypeScript calling Qloo's REST API directly with X-Api-Key — never in the browser, never committed. Affinity data describes groups, not individuals: input is segment-level, and anything shaped like an email or phone number is rejected before any call. Every pick cites the exact Qloo evidence behind it; if Qloo is unreachable, bundled fixtures keep the demo running and the UI honestly labels the run DEMO DATA. Thread state is browser-owned (localStorage) and sent with each request, so the server answers deterministically from what it is given.
Challenges we ran into
- Workers isolates don't share memory. Our first version kept thread state server-side and counters drifted between requests — one request saw "1 touch," the next saw 3. We made the server stateless: the client owns state, the server is pure.
- Qloo's untyped
/v2/insightsreturns zero entities. We probed every entity type individually and foundfilter.typeis required, andplacereturns museums and attractions — which turned out to be a gift for gifting (experiences!). - Parallel bursts to Qloo flake. Six concurrent insight calls intermittently failed mid-test. We switched to per-domain calls with graceful degradation: a domain without an entity neighbour falls back to citing the segment's affinity tags instead of inventing.
- Every API-shaped error taught us the real response shapes. The fix loop was: observe the actual JSON, unwrap, redeploy.
Accomplishments that we're proud of
- Fully live and hosted: judges can run the whole loop in about two minutes with no login.
- The agent's reasoning is legible — the trace shows plan -> Qloo tool calls -> selection -> self-check -> composition, so you can audit why a gift was chosen.
- Guardrails that act: budget ceilings, history-aware selection, and a visible refusal-to-repeat escalation.
- Privacy by design, not as an afterthought.
What we learned
- Qloo's taste graph is genuinely cross-domain — resolving one seed into experiences, music, film, brands and books is what makes a gifting agent possible at all.
- On Workers, design for statelessness first; memory between requests is a trap.
- Agent quality is mostly guardrail quality: knowing when not to send is the feature.
What's next for Gifting Agent
- An optional LLM layer that composes free-form note variations grounded on the cited Qloo evidence, with the same trace around it.
- A feedback loop: record whether the recipient loved it, and let gift-domain strategy learn per segment.
- Portfolio mode: plan gifts across an entire deal portfolio with per-deal budgets and a shared "taste diversity" constraint across accounts.
- CRM/webhook integrations so deal stages arrive automatically instead of being picked in the demo.
Built With
- agentic-ai
- cloudflare-workers
- css
- html
- localstorage
- qloo
- qloo-api
- rest-api
- taste-ai
- typescript
- wrangler
Log in or sign up for Devpost to join the conversation.