Agent skill · software engineering · openrouterteam
create-agent
Bootstrap a modular AI agent with OpenRouter SDK, extensible hooks, and optional Ink TUI
Why this skill is useful
Adds a complete setup guide with executable scripts and modular architecture for creating AI agents using OpenRouter SDK.
What it needs
Requires npm installed locally. Requires openrouter account access. About 9k tokens when loaded. Last updated 2026-01-31. 29 stars on the source repository.
What this skill does
Build a Modular AI Agent with OpenRouter This skill helps you create a modular AI agent with: Standalone Agent Core - Runs independently, extensible via hooks OpenRouter SDK - Unified access to 300+ language models Optional Ink TUI - Beautiful terminal UI (separate from agent logic) Architecture Prerequisites Get an OpenRouter API key at: https://openrouter.ai/settings/keys ⚠️ Security: Never commit API keys. Use environment variables. Project Setup Step 1: Initialize Project Step 2: Install Dependencies Step 3: Create tsconfig.json Step 4: Add Scripts to package.json File Structure Step 1: Agent Core with Hooks Create src/agent.ts - the standalone agent that can run anywhere: Step 2: Define Tools Create src/tools.ts: Step 3: Headless Usage (No UI) Create src/headless.ts - use the agent programmatically: Run headless: OPENROUTERAPIKEY=sk-or-... npm run start:headless Step 4: Ink TUI (Optional Interface) Create src/cli.tsx - a beautiful terminal UI that uses the agent with items-based streaming: Run TUI: OPENROUTERAPIKEY=sk-or-... npm start Understanding Items-Based Streaming The OpenRouter SDK uses an items-based streaming model - a key paradigm where items are emitted multiple times with the same ID but progressively updated content. Instead of accumulating chunks, you replace items by their ID. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills openrouterteam/create-agent