Quickstart
Run your first sovereign AI agent in under 60 seconds with npx liate.
Prerequisites
Liate runs on Bun — the all-in-one JavaScript runtime. No Python, no Node.js version conflicts, no Docker.
# Install Bun (macOS / Linux)
curl -fsSL https://bun.sh/install | bash
# Windows
powershell -c "irm bun.sh/install.ps1 | iex"
# Verify
bun --version # Should print 1.x.x1. Install Liate
npx liateThat's it. npx liate is the single command that installs, initializes, and runs the full Liate framework — zero global install required.
2. Set Your API Key (BYOK)
Liate is Bring Your Own Key (BYOK). Your API keys are stored locally in ~/.liate/.env — never sent to any Liate server.
# Add your Sarvam AI key (India's sovereign LLM — default)
echo "SARVAM_API_KEY=sk_live_your_key_here" >> ~/.liate/.env
# Or use OpenAI / Anthropic / Google
echo "OPENAI_API_KEY=sk-your_key_here" >> ~/.liate/.env
echo "ANTHROPIC_API_KEY=sk-ant-your_key_here" >> ~/.liate/.env3. Create Your First Agent
Option A — TypeScript Class (Recommended)
Create agent.ts — the Class-as-an-Agent pattern:
import { LiateAgent, LiateModel, LiateTools } from 'liate';
export class MyFirstAgent extends LiateAgent {
L = new LiateModel('sarvam/sarvam-105b');
I = { memory: 'sessions/my-first-agent' };
A = {
name: 'my-first-agent',
intent: 'You are a helpful assistant. Be concise and accurate.',
};
T = new LiateTools({
time: {
command: 'uvx',
args: ['mcp-server-time'],
tools: ['get_current_time'],
},
});
E = { SARVAM_API_KEY: '$SARVAM_API_KEY' };
}Option B — Declarative JSON
Or create a liate.json — the 5-Pillar sovereign agent specification:
{
"L": "sarvam/sarvam-105b",
"A": {
"name": "my-first-agent",
"intent": "You are a helpful assistant. Be concise and accurate."
},
"T": {
"time": {
"command": "uvx",
"args": ["mcp-server-time"],
"tools": ["get_current_time"]
}
},
"E": {
"SARVAM_API_KEY": "$SARVAM_API_KEY"
}
}4. Run Your Agent
# Run via CLI
npx liate run agent.ts
# Or run JSON spec
npx liate run liate.json --prompt "What time is it in India right now?"Response:
[li8 ENGINE] Starting 5-Pillar Agent: "my-first-agent"
[L-Pillar] Model Engine: sarvam/sarvam-105b
[T-Pillar] MCP Server "time" connected with 2 tool(s)
[FINAL ANSWER] Good Evening! 🌙 The current time in India (IST) is 6:04 PM.
--- RESULT ---
Good Evening! 🌙 The current time in Bengaluru, India is **6:04 PM IST**.5. Add Liate to Your IDE (MCP Window)
Add Liate's MCP Window to Cursor, Claude Code, Antigravity, or Windsurf:
{
"mcpServers": {
"liate": {
"command": "npx",
"args": ["liate"]
}
}
}This unlocks liate_docs, liate_classes, liate_class_gen, liate_run, liate_create, liate_hub, and more — directly in your AI chat.
