Inspiration

Inspiration This started with a real group chat. Fourteen of us, planning a trip to Ayia Napa. Two seafront villas shortlisted, a budget, a few people who needed to share beds, and a “boat day” everyone wanted. We spent three weeks and hundreds of messages and still nearly lost the villa because nobody would just decide. Every group has this chat. “Dinner Saturday?” → forty messages → silence → it dies. The information needed to decide is all there in the thread: the vetoes, the budgets, who picked last time, who never gets a say. Humans just won’t collapse it into a choice. The decision space is genuinely hard. With people, plausible venues and time slots, the group is implicitly searching a space of size

(every subset of people who might come), under conflicting constraints. We don’t stall because we’re lazy. We stall because group decision-making is combinatorial, and no one wants to be the one who chose wrong.

What it does

Settled is an AI agent that lives inside a group chat and ends the spiral: • Reads the messy thread plus what it remembers about the group (vetoes, diets, budgets, whose turn it is). • Decides one concrete plan: venue, time, who’s in, and cites the constraints it honoured. • Re-decides live. Drop a new constraint (“£10 each max”) and it re-reasons over the whole chat and changes its mind, showing a decision receipt: the old pick, why it was dropped, and the new winner. • Splits the bill across everyone who’s in, payable in one tap, posted back into the chat. • Keeps going. In the same chat it locks the villa, then the boat day, then dinner. A continuous coordinator, not a one-shot. Every decision is the model reasoning over the chat. If an if-statement could do it, it wouldn’t be the product.

How we built it

Frontend: Next.js 15 + React 19, hand-written CSS reskinned to look native to the Zymix superapp. Phone-first. • Brain: GLM-5.1 via ’s OpenAI-compatible API, behind one server route (/api/plan). The prompt is the IP: a strict JSON contract forcing constraints, considered, and a per-person split[]. • Reliability by design: the primary path renders a cached real GLM response, so the money-moment never depends on the network. Only the live “curveball” calls the model, and it falls back to a cached flip on timeout. • Deploy: Cloudflare Workers via the OpenNext adapter; secrets server-side.

Challenges we ran into

The model endpoint was unreachable. The default China endpoint () returns HTTP 000 from a UK network. The international works with the same key. 2. The WAF silently swallowed requests. curl worked; Node’s fetch hung forever. The edge WAF holds requests with no User-Agent. One header fixed a two-hour ghost. 3. GLM-5.1’s “thinking” mode was too slow to demo. Chain-of-thought streamed 60+ seconds of reasoning tokens and timed out. The response budget is roughly

and disabling reasoning sets , taking a ~60s call down to ~8s with the same decision quality. I then turned the remaining wait into the show: a live “GLM-5.1 deciding…” trace so judges watch it work instead of watching a spinner.

  1. Edge vs Node runtime, secret encoding, cold starts — the usual deploy gauntlet. OpenNext doesn’t support the edge runtime, so the route moved to Node; a shell pipe quietly corrupted the API-key secret (a clean printf fixed the 401).

Accomplishments that we're proud of

Building this!

What we learned

Real APIs fail in boring, invisible ways (geo-routing, WAF header checks, runtime mismatches). Reach for curl early to bisect “my code or the network.” • A reasoning model’s latency is a product decision, not a constant. Knowing when not to let it think matters as much as the prompt. • The best demo architecture caches its own critical path and spends its one live call on proving the thing is real. • Treat the prompt as a typed contract. Structured output is what turned a chatbot into an agent with a UI.

What's next for Settled

Make it usable for cross-platform

Built With

Share this project:

Updates