Documentation
Everything you need to build AI agents on edge.
1Getting Started
Install
npm install @carloscortezcloud/tinkuy-agent @carloscortezcloud/styrr-llmAdd sayay-guard for budget control. Add tiderag for RAG. Both optional.
Create a Tool
import { defineTool } from '@carloscortezcloud/tinkuy-agent';
const myTool = defineTool({
name: 'search',
description: 'Search for information',
parameters: { type: 'object', properties: { query: { type: 'string' } } },
execute: async (args) => { /* your logic */ },
});Create an Agent
import { Agent } from '@carloscortezcloud/tinkuy-agent';
import { StyrRouter } from '@carloscortezcloud/styrr-llm';
const agent = new Agent({
router: new StyrRouter({ apiKey: process.env.OPENROUTER_API_KEY, models: [{ id: 'nvidia/nemotron-3-ultra-550b:free' }] }),
tools: [myTool],
systemPrompt: 'You are a helpful assistant.',
});
const result = await agent.run('Find info about serverless');
console.log(result.text);2Architecture
User prompt
|
v
Agent (Tinkuy) ─── uses ──→ Router (Styrr)
| |
|─── optional ──→ Guard (Sayay) |
| |
v v
Tool Loop: Model Chain:
LLM → tool_calls model_1 → 429? → model_2 → 404? → model_3
execute tools (auto-fallback)
feed results back
repeat until text response
|
v
Final answer + metadata3Packages
Multi-model router with ordered fallback.
Sayay @carloscortezcloud/sayay-guardPer-user budget guardrails. Warn, degrade, block.
Tinkuy @carloscortezcloud/tinkuy-agent200-line agent tool loop. Provider-agnostic.
TideRAG @carloscortezcloud/tideragCF-native RAG pipeline. $0/mo.
?FAQ
Do I need all 4 packages?
No. Use Tinkuy + Styrr as minimum (agent + routing). Sayay is optional (budget). TideRAG is optional (knowledge base). Each is independent.
Does it work with Strands Agents or LangChain?
Yes. Styrr can be used as a model provider for Strands or ChatModel for LangChain. Sayay can be a Strands Plugin. They complement, not compete.
Is it really free forever?
The packages are Apache 2.0 (free forever). Infrastructure cost depends on Cloudflare free tier limits (5M vectors, 100K req/day). For most projects this is plenty.
Can I use it without Cloudflare?
Styrr, Sayay, and Tinkuy work anywhere (Node, Deno, Bun, Lambda). Only TideRAG requires CF Workers (Vectorize + Workers AI + D1 are CF services).
How is this different from LangChain?
Tinkuy is 200 lines with 0 deps. LangChain is a full platform with many dependencies. Use Tinkuy when you want the smallest possible agent on edge. Use LangChain when you need a complete ecosystem with persistence, streaming, and multi-agent.