AI Agent Starter Kit
Build deterministic, tool-calling AI agents with structured outputs, memory, and cost guardrails.
Architecture Overview & Problem Solved
A clean, framework-light TypeScript skeleton for building reliable AI agents without heavy abstraction bloat. Includes tool-calling loops, JSON schema output enforcement, SQLite/Turso conversation memory, and automatic retry with exponential backoff.
This starter kit releases on 2026-10-15. Enter your email to receive an instant launch notification and a 20% discount code.
Tested Compatibility Versions
Node.js 20.10+ • TypeScript 5.5+ • OpenAI SDK v4+ • Anthropic SDK v0.30+
External API Costs
Requires your own OpenAI or Anthropic API key. Includes token-budget middleware to cap spend.
Secrets & Credentials Handling
Uses strict environment variable validation via Zod before agent initialization.
Known Limitations
Designed for server-side Node.js/Next.js execution; not intended for unauthenticated browser calls.
What's Included in the Package
- Complete TypeScript Agent Runner with tool registry & max-iteration guardrails
- 6 pre-built tools (Web Fetcher, SQL Read-Only Query, JSON Validator, GitHub PR Reader, Calculator, Webhook Caller)
- Turso / SQLite conversation state & token-usage logger
- Comprehensive architecture guide & prompt evaluation suite
Installation & Setup Instructions
- 01Clone or extract the starter kit and run npm install.
- 02Copy .env.example to .env and add OPENAI_API_KEY or ANTHROPIC_API_KEY.
- 03Register your custom tools in src/agents/tools.ts with typed input schemas.
- 04Run npm run agent:demo to execute the multi-step research and verification loop.
{
"goal": "Analyze PR #42 diff and output structured security review",
"maxSteps": 4,
"model": "claude-3-7-sonnet"
}{
"approved": true,
"riskScore": "low",
"findings": ["Parameterized SQL verified in src/db/index.ts"],
"tokensUsed": 1420
}export async function runAgentLoop(goal: string, tools: Record<string, AgentTool>, maxSteps = 5) {
for (let step = 1; step <= maxSteps; step++) {
const decision = await callModelWithTools(goal, tools);
if (decision.type === "final_answer") {
return { status: "completed", step, output: decision.payload };
}
const tool = tools[decision.toolName];
if (!tool) throw new Error(`Unknown tool requested: ${decision.toolName}`);
await tool.execute(decision.arguments);
}
throw new Error("MAX_STEPS_EXCEEDED: Agent halted safely by budget guardrail.");
}Version Changelog
Added dual-provider router for Claude and GPT-4o structured outputs.
Product FAQ & Licensing
Does this require LangChain?
No. It is written in clean, dependency-light TypeScript so you can debug every single line.