Architecture
The SSTTQ stack — how Styrr, Sayay, Tinkuy, TideRAG, Qhaway, and NanGraph fit together. Designed for cost-awareness from day one.
The Almost-Zero Stack
Tinkuy Labs is an ecosystem of 6 TypeScript packages for building AI agents on edge infrastructure at near-zero cost. Each package is independent — use one or all.
How They Connect
Tinkuy ← Styrr
Tinkuy calls router.call(messages, tools) on each iteration. Styrr returns { text, modelUsed, toolCalls }. The Router interface is a single method.
Tinkuy → Sayay
Before each LLM call, Tinkuy calls guard.check(userId, estimatedCost). If budget exceeded, the agent stops or degrades.
Tinkuy + TideRAG (as Tool)
TideRAG wraps as a Tinkuy tool. The agent calls rag.query(question) when it needs knowledge. Uses Cloudflare free tier.
Qhaway ← Tinkuy (via Hooks)
Qhaway auto-instruments via Tinkuy hooks. Every LLM call is traced with cost, latency, and tokens.
Tinkuy + NanGraph (as Tool)
NanGraph wraps as a Tinkuy tool for architecture analysis: blast radius, cost chain, SPOF. The graph-first engine (Ñan × BYaML v2 / SOFE Architecture Graph) validates and measures the agent’s own stack.
Philosophy
Zero Dependencies
Every package uses fetch() only. No axios, no langchain.
Edge-Native
Designed for Cloudflare Workers. Works in Deno, Bun, Node, Lambda.
Cost-Aware by Default
Sayay guards every dollar. Qhaway traces every call. Styrr falls back to free models.
Composable
Each package is independent. Interoperate through minimal interfaces. Apache 2.0.
When to Use Each Package
| Package | Use When |
|---|---|
| Styrr | You need multi-model fallback routing |
| Sayay | You need per-user budget enforcement |
| Tinkuy | You need a minimal tool-loop agent |
| TideRAG | You need RAG on Cloudflare free tier |
| NanGraph | You need blast radius / cost chain / SPOF over your architecture |
| Qhaway | You need agent observability |
Deployment Topologies
All-in-One Worker
All packages in a single Cloudflare Worker. Simplest deployment. ~5ms cold start. $0/mo.
Separate Services
Styrr Hosted API as separate service. Agent on Workers. TideRAG on own Worker. Qhaway metrics server.