create-headless-agent

Scaffold a TypeScript headless agent project with Bun and the OpenRouter SDK.

209|33|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/OpenRouterTeam/skills --skill create-headless-agent
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-headless-agent
Source: https://github.com/OpenRouterTeam/skills/tree/main/skills/create-headless-agent
Command: npx skills add https://github.com/OpenRouterTeam/skills --skill create-headless-agent

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Building a production-ready headless AI agent requires wiring together model calls, tool execution, session persistence, retry logic, and multiple entry points (CLI, HTTP, MCP). This Skill eliminates that boilerplate by generating a complete, Bun-native TypeScript project with best-practice defaults.

Core Features & Use Cases

  • Zero-Boilerplate Scaffolding: Generates a complete TypeScript project with the OpenRouter Agent SDK, Zod validation, Bun configuration, and 12+ built-in tools (file read/write/edit, glob, grep, shell, etc.).
  • Multiple Entry Points: Choose from CLI, library module, HTTP server with SSE streaming, or MCP server — all wired and ready to run.
  • Production Hardening: Includes retry with backoff, session persistence, output schema validation, structured event logging, and webhook notifications out of the box.
  • Use Case: A developer building a CI pipeline agent that processes pull requests can generate a headless agent, add a custom review tool, and deploy it as an HTTP service in under five minutes.

Quick Start

Invoke this Skill from your AI coding agent, answer the interactive checklist to select your desired entry points and tools, and it will generate a complete headless agent project that you can run immediately with a single command.

Frequently Asked Questions about create-headless-agent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a TypeScript AI agent with Bun and OpenRouter?

Scaffolding a TypeScript AI agent with Bun and OpenRouter is done by generating a complete project that eliminates manual wiring of model calls and tool execution. This produces a Bun-native project with the OpenRouter SDK, Zod validation, and built-in tools ready to run immediately.

Can I build an AI agent API server with SSE streaming in TypeScript?

Yes, you can build an AI agent API server with SSE streaming in TypeScript. Scaffolding a headless agent project provides multiple deployment entry points wired and ready, including an HTTP server with SSE streaming, a CLI, a library module, and an MCP server mode.

What is a headless AI agent and when do I need one?

A headless AI agent is a programmatic agent that operates without a terminal UI, designed for CLI tools, API servers, queue workers, and batch processing pipelines. You need one for automated workflows requiring model calls, tool execution, and session persistence without direct human interaction.

Does the OpenRouter SDK support retry logic and session persistence for agents?

Yes, the OpenRouter SDK supports retry logic and session persistence for agents. Scaffolding a headless agent project with this SDK includes production hardening out of the box, such as retry with backoff, session persistence, output schema validation, and structured event logging.

What's the best way to generate a TypeScript MCP server?

The best way to generate a TypeScript MCP server is by scaffolding a headless AI agent project. This instantly wires the MCP server entry point alongside other deployment modes, integrating model calls, tool execution, and Zod schema validation without manual boilerplate.