create-agent-adapter

Create a Staple agent adapter with server, UI, and CLI modules.

2|Updated Mar 29, 2026
One-click install
npx skills add https://github.com/rishith-c/staple --skill create-agent-adapter-rishith-c
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-agent-adapter
Source: https://github.com/rishith-c/staple/tree/main/.agents/skills/create-agent-adapter
Command: npx skills add https://github.com/rishith-c/staple --skill create-agent-adapter-rishith-c

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide provides a blueprint for building a new Staple agent adapter, detailing the required interfaces, file structure, and registration steps so developers can connect a new AI runtime to Staple.

Core Features & Use Cases

  • Defines the adapter surface (server, UI, and CLI) and the wiring points for execution, parsing, and configuration.
  • Documents the registration process across server, UI, and CLI registries to ensure the adapter is discoverable by all clients.
  • Describes the recommended project layout, environment handling, and session management patterns for robust long-running runs.

Quick Start

Scaffold a new adapter package under packages/adapters, implement server/ui/cli modules, and register it in all three registries.

Frequently Asked Questions about create-agent-adapter

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

FAQPage Schema
How do I build an agent adapter to connect a new runtime to Staple?

To build a Staple agent adapter, scaffold a package under packages/adapters and implement server, UI, and CLI modules. You must define type, label, models, and agentConfigurationDoc in the root, then export a sessionCodec and conform to the four-export package.json schema.

What files and modules are required to scaffold a Staple adapter?

Scaffolding a Staple adapter requires implementing server/execute.ts, server/parse.ts, server/index.ts, alongside UI and CLI modules. The root must define type, label, models, and agentConfigurationDoc, plus export a sessionCodec for bridging orchestration with the runtime.

How do I register a new agent adapter so it is discoverable by Staple clients?

Registering a new agent adapter requires adding it to the server, UI, and CLI registries. This three-part registration process ensures the adapter is fully discoverable by all Staple clients across the orchestration layer.

When do I need to create a custom adapter for an AI runtime?

You need a custom adapter when building support for a new AI tool or runtime that Staple does not yet bridge. This includes local CLIs, HTTP endpoints, or custom processes that require integration with Staple's orchestration layer.

Does a Staple adapter require specific session management patterns for long-running runs?

Yes, the adapter blueprint describes recommended project layout, environment handling, and session management patterns. Implementing these patterns ensures robust handling of long-running runs across the connected runtime.

What is the package.json schema requirement for a Staple agent adapter?

A Staple agent adapter must conform to a specific four-export package.json schema. This schema standardizes the module structure so the server, UI, and CLI components integrate correctly with Staple's orchestration layer.