AI model routing platform OpenRouter just released a TypeScript SDK (beta) called @openrouter/agent, along with a companion scaffolding tool called create-agent-tui. The killer feature? Tell Claude Code or Cursor to "build me an agent," and it generates a complete terminal AI assistant project. Think Claude Code, but fully yours — customizable interface, tools, and model choice. And it runs immediately.
The generated project comes pre-equipped with tools for file read/write/edit, shell command execution, regex search, web search, and more. You can optionally enable sub-agent spawning, task planning, user input, and other advanced capabilities. The terminal UI offers three input styles and four tool display modes. Conversations are automatically saved as JSONL for easy replay.
Under the hood, OpenRouter's routing provides access to over 300 models, and you can switch models at runtime with a slash command. The SDK itself handles model calls, tool execution, streaming output, and stopping conditions (step limits, cost limits). Developers only write the shell — the agent loop is abstracted away. The architecture borrows from Claude Code's tool permission design and Codex CLI's layered configuration.