Inspiration
Every founder hits the same wall: a decision too big to wing, too expensive to outsource. A consulting firm gets it right months and six figures later; a normal AI chat just agrees with you. We wanted the rigor of a senior strategy team available in minutes, so the answer holds up in the room where it matters.
What it does
Tegy is the strategy team you don't have. Drop in whatever you've got, notes, call recordings, a half-built deck, no clean brief required. Tegy picks the right method for the problem, lays your real options side by side, weighs them on what actually matters, and stops to ask when the answer hinges on something you haven't checked. You walk away with a board-ready deck, a financial model, an investment memo, a pricing playbook, or an action plan.
How we built it
Tegy has two halves: a product surface and a strategy brain. The product runs entirely on Cloudflare's edge. The frontend is Vite, React, and TypeScript with Tailwind and shadcn/ui.
Every request hits a Cloudflare Worker at app.tegy.io that handles auth against D1-backed sessions, then routes agent work to a Cloudflare Container, one versioned named container per chat, running the agent API on Node 22.
The reasoning engine is Codex app-server, reaching its model provider through Cloudflare AI Gateway and OpenRouter.
Three product modes map to fixed models and reasoning effort, so a quick gut-check and a board-grade analysis don't burn the same compute.
Durability was the hard architectural bet. The container batches turn events into a Cloudflare Queue independently of the browser; the Worker drains them into a D1 ledger, and the browser reconciles from that ledger rather than owning execution. A turn survives a disconnected tab. Attachments live in R2 and get materialized into a sandbox for tool use, with native image input and bounded audio transcription. Capacity is capped with a retryable 503 and a warning/critical/recovery monitor wired to alerts. Secrets are managed with SOPS/age; analytics run through a self-hosted PostHog proxy.
The strategy brain is what makes the answers defensible. It's a plugin of 20 expert-persona agents across four domains, business strategy, product, GTM, and M&A, each running a discipline-specific operating procedure rather than free-forming.
Ask a business-strategy question and the agent halts at two hard gates (mode and problem-statement agreement), states a null hypothesis, builds a MECE framework to test it, populates the cells from a catalog of roughly sixty named frameworks (Porter, Rumelt, Christensen, Wardley, Dunford, and others), runs a devil's-advocate pass, applies a 14-check rigor review, and delivers in a fixed five-section format. Product, GTM, and M&A agents each follow their own multi-step waterfall with upstream-dependency gates, so skills compose correctly or block until they can.
Two governance layers sit above all of it: 18 ambient rules enforcing MECE, hypothesis-driven reasoning, evidence tiers, and checkpoint discipline; and always-on audit skills that fire on every artifact. That's the machinery behind "it argues with itself first", the adversarial second pass isn't a prompt trick, it's a separate agent with a rigor checklist.
Challenges we ran into
Getting the model to push back rather than agree by default. Routing a messy, unstructured problem to the right framework without hardcoding. Building the self-critique layer so it strengthens answers instead of hedging them.
Accomplishments that we're proud of
An engine that reasons about which approach fits before solving, shows its work, and defends a recommendation. A product that turns a pile of raw context into a decision you can take into a fundraise or a board meeting.
What we learned
The value isn't the answer, it's the defensibility of the answer. Users trust output they can trace: named frameworks, surfaced assumptions, an adversarial pass on the logic.
What's next for Tegy
Deeper business-context learning across a portfolio, more output formats, and holding one consistent rigor bar across every decision a team owns.
Built With
- cloudflare-ai-gateway
- cloudflare-containers
- cloudflare-d1
- cloudflare-queues
- cloudflare-r2
- cloudflare-workers
- codex
- hono
- ndjson
- ndjson-streaming
- node.js
- openrouter
- polar
- posthog
- python
- react
- shadcn-ui
- sops
- tailwindcss
- typescript
- vite
- wrangler
Log in or sign up for Devpost to join the conversation.