Skip to content
/

Agentify

agentify · koriyoshi2041/agentify · ★ 28 · last commit 2026-03-16

Primitive shape
No installable primitives
00

Summary

Agentify — Summary

Agentify is an "Agent Interface Compiler" — a CLI that reads an OpenAPI specification (Swagger 2.0 or OpenAPI 3.x) and generates up to 9 agent-consumable output formats: MCP server (with Dockerfile), CLAUDE.md, AGENTS.md, .cursorrules, Skills, llms.txt, GEMINI.md, A2A Card (Google Agent-to-Agent protocol), and a standalone CLI tool. The core value proposition is eliminating the N×M synchronization problem: as APIs evolve, maintaining separate CLAUDE.md, AGENTS.md, MCP server, and skill files by hand becomes impossible — Agentify regenerates all formats from one source of truth (the OpenAPI spec). The tool uses a pluggable emitter architecture with an intermediate representation (AgentifyIR), security scanning on both input (blocks eval/exec/Function injection) and output (scans generated code before writing), and a tiered generation strategy based on API scale (small: one tool per endpoint; medium: Tool Search + Lazy Loading; large: Code Execution + Docs Search). Tested on real APIs from 13 endpoints (Notion) to 1,093 endpoints (GitHub REST API). Compared to seeds, Agentify is unique in the catalog — it is the only tool that generates agent interface primitives (commands, skills, CLAUDE.md, MCP servers) as build artifacts from a formal API specification, treating agent interfaces the way code generators treat database schemas or protocol buffers.

01

Overview

Agentify — Overview

Origin

Created by koriyoshi2041. Published as agentify-cli on npm. The CLAUDE.md reveals an extensive pre-development research phase: 4 research reports, 7 expert reviews, 2 UX studies, and a 14-week milestone roadmap documented in the repository.

Philosophy

From the README:

"Your API has new users it doesn't know about yet — AI agents. Claude Code reads CLAUDE.md. Cursor reads .cursorrules. Codex and Copilot read AGENTS.md. And if you want your API callable as a tool, you need an MCP server. That's a lot of files to write and keep in sync with your API spec. Agentify reads your OpenAPI spec and writes them all."

Vision Statement (from CLAUDE.md)

The CLAUDE.md reveals the broader product vision:

  • Tagline: "One command. Every agent speaks your product."
  • Core experience: npx agentify-cli transform <openapi-url> → complete Agent interface suite
  • 5-level product maturity model (L0-L4): L4 = Agent-Native with full interface suite. "L4 currently doesn't exist; Agentify fills the gap."
  • Time window concern: "Market intelligence researcher updated: Speakeasy $37.5M funding — window narrowed to 3-5 months" (March 2026)

Design Principles

  1. Security Day 1: Input sanitization blocks eval/exec/Function constructor; output code is scanned before writing
  2. Pluggable emitters: Each output format is a separate emitter implementing a simple emit(ir, options) interface
  3. Tiered generation: API scale determines strategy — not every endpoint needs its own tool for large APIs
  4. No ts-morph: Handlebars templates over ts-morph (removed per expert review — "15MB dependency, Handlebars is enough")
  5. Flat IR: Simple AgentifyIR intermediate representation rather than Capability Graph (deferred to Phase 2)

Tested APIs

API Endpoints Result
Notion 13 PASS
Petstore (Swagger 2.0) 20 PASS
httpbin (non-compliant) 73 PASS
Slack Web API 174 PASS
Stripe 452 PASS
GitHub REST API 1,093 PASS
02

Architecture

Agentify — Architecture

Distribution

  • Type: npm package
  • Binary: agentify-cli (via npx agentify-cli)
  • Version analyzed: 0.4.1
  • Runtime required: Node.js 18+
  • Language: TypeScript (strict mode)
  • Dependencies: Commander.js, Zod, @apidevtools/swagger-parser, @modelcontextprotocol/sdk, Handlebars, Vitest

Install Method

npx agentify-cli transform https://petstore.swagger.io/v2/swagger.json

Directory Tree

agentify/
├── src/
│   ├── cli.ts                # CLI entry point (Commander.js)
│   ├── index.ts              # Library export
│   ├── types.ts              # AgentifyIR intermediate representation
│   ├── parser/               # OpenAPI parsing + input sanitization
│   ├── generator/            # Pluggable emitters
│   │   ├── strategies/       # Tiered generation strategies (small/medium/large)
│   │   └── [emitter files]
│   └── security/             # Security scanner
├── test/                     # Vitest tests (136 tests)
├── docs/
│   └── demo.gif
├── self/                     # Self-generated documentation (dog-fooding)
├── CLAUDE.md                 # Extensive project CLAUDE.md (178 lines)
├── AGENTS.md                 # Concise project AGENTS.md
└── package.json

Pipeline

OpenAPI Spec (URL or file)
    |
    v
  PARSE → SANITIZE → ANALYZE → COMPILE → EMIT → SCAN → OUTPUT
             |            |          |        |       |
         Strip unsafe  Detect     Build IR  Run    Security
         patterns      domains,   (typed)   emit-  scan all
                       auth,                ters   generated
                       API scale                   code

Intermediate Representation (AgentifyIR)

type AgentifyIR = {
  title: string;
  description: string;
  baseUrl: string;
  version: string;
  auth: AuthConfig;
  apiScale: 'small' | 'medium' | 'large';
  domains: Domain[];
  capabilities: ParsedCapability[];
}

Tiered Generation Strategy

API Size Endpoints Strategy
Small <30 Direct tool mapping — one tool per endpoint
Medium 30-100 Tool Search + Lazy Loading
Large 100+ Code Execution + Docs Search

Emitters (9 output formats)

Format Output Used by
MCP Server Full TypeScript + Dockerfile Claude, ChatGPT, Copilot
CLAUDE.md Markdown Claude Code
AGENTS.md Markdown Codex, Copilot, Cursor, Gemini CLI
.cursorrules Plain text Cursor IDE
Skills Markdown Agent platforms
llms.txt Plain text LLM search engines
GEMINI.md Markdown Gemini CLI
A2A Card JSON/YAML Google Agent-to-Agent protocol
CLI TypeScript binary Standalone command-line tool
03

Components

Agentify — Components

CLI Commands

Command Purpose
agentify-cli transform <url-or-file> Transform OpenAPI spec → agent interfaces

transform Options

Option Purpose
-f <formats> Pick specific formats (e.g. mcp claude.md agents.md)
-o <dir> Custom output directory
-n <name> Custom project name
# Transform all 9 formats
npx agentify-cli transform https://petstore.swagger.io/v2/swagger.json

# Select specific formats
npx agentify-cli transform ./my-api.yaml -f mcp claude.md agents.md

# Generate standalone CLI tool
npx agentify-cli transform ./my-api.yaml -f cli -o my-api-cli

# Custom output directory and name
npx agentify-cli transform https://api.example.com/openapi.json -o ./output -n my-project

Emitter Interface

All emitters implement a simple interface:

import type { Emitter, AgentifyIR, EmitterOptions, EmitterResult } from "../types";

export class MyFormatEmitter implements Emitter {
  readonly name = "my-format";
  readonly format = "my-format";

  async emit(ir: AgentifyIR, options: EmitterOptions): Promise<EmitterResult> {
    return { format: this.format, filesWritten: [...], warnings: [] };
  }
}

Output Example (Petstore, all formats)

  Agentify v0.4.1
  Agent Interface Compiler

  +-- 20 endpoints detected -> SMALL API strategy
  +-- 3 domains identified (pet, store, user)
  +-- Auth: apiKey (SWAGGER_PETSTORE_API_KEY)
  +-- Strategy: Direct tool mapping — one tool per endpoint

  > Generated mcp + claude.md + agents.md + cursorrules + llms.txt + gemini.md + skills + a2a (15 files)
  > Output: ./swagger-petstore-mcp-server
  > Security scan: PASSED

Security Features

  • Input sanitization: Blocks patterns: eval, exec, Function constructor, require/import in OpenAPI descriptions
  • Prompt injection detection: Scans for injection patterns in API descriptions
  • Output code scanning: All generated TypeScript is scanned before being written to disk
  • Auto-normalization: Non-compliant specs (like httpbin) are auto-normalized with warnings

Tests

136 tests (Vitest). Integration tests use live Petstore API.

Self-Documentation (Dog-Fooding)

The self/ directory contains Agentify's own generated interface — the tool uses its own CLI to document itself.

05

Prompts

Agentify — Prompts

Agentify generates prompt files (CLAUDE.md, AGENTS.md, skills, .cursorrules) as build artifacts from OpenAPI specs. The "prompts" it produces are AI tool configuration files, not internal agent instructions.

Excerpt 1 — Generated CLAUDE.md (Petstore Example)

Generated output for the Petstore API:

# Swagger Petstore API Integration

**Version**: 1.0.7
**Base URL**: https://petstore.swagger.io/v2

## Authentication
- **API Key**: Set `SWAGGER_PETSTORE_API_KEY` environment variable
- Header: `api_key`

## Available Operations

### Pet Domain (10 operations)
- Add a new pet to the store: `POST /pet`
- Update an existing pet: `PUT /pet`
- Finds Pets by status: `GET /pet/findByStatus`
- Find pet by ID: `GET /pet/{petId}`
- [...]

### Store Domain (4 operations)
- Place an order: `POST /store/order`
- Find purchase order by ID: `GET /store/order/{orderId}`
- [...]

## Usage
This API is available as an MCP server. Configure Claude Code to use
`swagger-petstore` MCP for direct API access without manual coding.

Technique: API-first context injection. Rather than describing how the agent should code, the generated CLAUDE.md tells the agent what the API does — a reference document for API-aware code generation.

Excerpt 2 — Generated Skills Output

For each domain group, Agentify generates skill files:

---
name: petstore-pet-operations
description: Pet management operations for the Swagger Petstore API
---

# Pet Operations

Use these operations to manage pets in the Petstore:

## Add a new pet
**Endpoint**: POST /pet
**Auth**: Required (api_key header)
**Input**:
  - body: Pet object (id, name, photoUrls, status)

## Find pets by status
**Endpoint**: GET /pet/findByStatus
**Auth**: Required
**Parameters**:
  - status: "available" | "pending" | "sold"

Technique: Domain-scoped operation inventory. Groups related API operations into skills by detected domain, reducing token cost for AI tools that need to call specific API operations.

Excerpt 3 — Generated MCP Tool (TypeScript)

{
  name: "add_pet",
  description: "Add a new pet to the store",
  inputSchema: {
    type: "object",
    properties: {
      name: { type: "string", description: "Pet's name" },
      photoUrls: { type: "array", items: { type: "string" } },
      status: { 
        type: "string", 
        enum: ["available", "pending", "sold"],
        description: "Pet status in the store"
      }
    },
    required: ["name", "photoUrls"]
  }
}

Technique: Schema-faithful tool generation. The MCP tool's inputSchema is generated directly from the OpenAPI request body schema via Zod, preserving required fields, types, and enum values without manual mapping.

09

Uniqueness

Agentify — Uniqueness

differs_from_seeds

Agentify has no direct analog among the 11 seeds. It is the only tool in the catalog that treats agent interface files (CLAUDE.md, AGENTS.md, MCP servers, skills, .cursorrules) as compiled build artifacts derived from a formal API specification — analogous to how OpenAPI code generators produce client SDKs. Seed frameworks (superpowers, BMAD-METHOD, spec-driver) author CLAUDE.md/skills by hand to encode workflow conventions; Agentify generates them programmatically from API schema. The closest conceptual parallel is taskmaster-ai (which also uses a formal schema — task JSON — as input), but taskmaster-ai manages task execution while Agentify manages interface generation. Unlike all seeds, Agentify is a developer tool for API owners, not for AI agent users — it solves the "make my API accessible to AI agents" problem, not the "make my AI agent work better" problem.

Positioning

  • Primary differentiator: OpenAPI-to-agents compiler. The only tool that reads a formal API spec and generates all agent interface formats as first-class artifacts, including Google A2A cards and standalone CLI tools.
  • Secondary differentiator: Input and output security scanning. No other tool in the batch scans OpenAPI spec descriptions for prompt injection patterns before generating agent interfaces — a real supply-chain security concern for public APIs.
  • Target user: API developers and companies who want to make their existing APIs accessible to Claude, Cursor, Copilot, and other AI coding tools without writing CLAUDE.md and MCP servers by hand.

Observable Failure Modes

  1. Context window problem for large APIs: The CLAUDE.md notes: "GitHub MCP = 93 tools = 55K tokens" — even with tiered generation, large APIs generate context-heavy outputs that may hit Claude's context window.
  2. Format staleness on API updates: Generated files must be regenerated when the OpenAPI spec changes; no watch mode or change detection in v0.4.1.
  3. Early-stage competitive pressure: CLAUDE.md explicitly notes market intelligence: "Speakeasy $37.5M funding — window narrowed to 3-5 months" (March 2026). The tool is racing established API tooling vendors.
  4. A2A Card niche: Google A2A protocol is early-stage; the value of this output format depends on ecosystem adoption.
  5. Stars indicate early awareness (28): Despite 136 tests and real-world API validation, community adoption is early-stage.
04

Workflow

Agentify — Workflow

Primary Workflow: One-Command API-to-Agents

# Generate all 9 formats from a remote OpenAPI spec
npx agentify-cli transform https://api.example.com/openapi.json

# Output directory: ./api-name-mcp-server/
# Generated files:
#   mcp-server/          # Full TypeScript MCP server + Dockerfile
#   CLAUDE.md            # Claude Code config
#   AGENTS.md            # Multi-tool agent config
#   .cursorrules         # Cursor config
#   skills/              # Agent skills
#   llms.txt             # LLM search engine config
#   GEMINI.md            # Gemini CLI config
#   a2a-card.json        # Google A2A protocol card
#   cli/                 # Standalone CLI tool

Phase-to-Artifact Map

Phase Artifact
PARSE AgentifyIR (in-memory)
SANITIZE Validated/normalized spec
ANALYZE Domain detection, auth detection, API scale
COMPILE Typed IR with capabilities
EMIT Generated files per format
SCAN Security scan report
OUTPUT Files written to output directory

Selective Format Generation

# Only MCP + Claude.md + AGENTS.md
npx agentify-cli transform ./api.yaml -f mcp claude.md agents.md

# Only CLI tool
npx agentify-cli transform ./api.yaml -f cli -o my-api-cli

CI/CD Integration Pattern

# .github/workflows/agent-interfaces.yml
- name: Generate agent interfaces
  run: npx agentify-cli transform ./openapi.yaml -o ./agent-interfaces
- name: Commit generated files
  run: git add agent-interfaces/ && git commit -m "chore: update agent interfaces"

Approval Gates

None — fully automated generation. Output is written to disk without confirmation.

Re-generation on API Changes

Run agentify-cli transform again to regenerate all interfaces when the OpenAPI spec changes. There is no watch mode (v0.4.1).

Custom Emitter Development

// 1. Implement Emitter interface
// 2. Register in emitter registry
// 3. Pass format name to -f flag
06

Memory Context

Agentify — Memory & Context

State Storage

Agentify maintains no persistent state beyond the generated output files. Each invocation is fully independent.

Generated Artifacts

Artifact Format Persistence
MCP server directory TypeScript + Dockerfile Until user deletes
CLAUDE.md Markdown Until regenerated
AGENTS.md Markdown Until regenerated
.cursorrules Plain text Until regenerated
skills/ Markdown Until regenerated
a2a-card.json JSON Until regenerated

No Session State

Agentify is a stateless compiler — it reads the OpenAPI spec on every invocation and outputs files. There is no caching of previous runs, no diff tracking, and no version management.

Context for Generated MCP Server

The generated MCP server (TypeScript) may maintain its own session context when running as a live MCP server, but this is outside Agentify's scope.

AgentifyIR (In-Memory Only)

The Intermediate Representation (AgentifyIR) exists only in memory during compilation. It is not persisted to disk.

Regeneration Pattern

On API spec change: re-run agentify-cli transform → new files overwrite previous output. No merge logic — clean regeneration.

07

Orchestration

Agentify — Orchestration

Multi-Agent Pattern

None — Agentify is a code generator, not an agent orchestrator.

Orchestration Pattern

none at the Agentify level. The MCP server it generates enables agent-to-tool orchestration, but Agentify itself is a one-shot build step.

Execution Mode

one-shot — transform command runs, generates files, exits.

Isolation Mechanism

none — writes to output directory, no sandboxing.

Multi-Model Usage

None — Agentify makes zero AI/LLM calls. All analysis is code-based (OpenAPI parsing, Zod schema validation).

Subagent Definition Format

None shipped — generates Skill files (skill-md format) as build artifacts.

Consensus Mechanism

None.

Prompt Chaining

No.

Cross-Tool Portability

Very high — generates artifacts for 9 different AI tool ecosystems from a single input. This is the broadest cross-tool output surface in the batch:

  • Claude Code (CLAUDE.md, MCP server)
  • Codex, Copilot, Cursor, Gemini CLI (AGENTS.md)
  • Cursor IDE (.cursorrules)
  • LLM search engines (llms.txt)
  • Gemini CLI (GEMINI.md)
  • Any MCP-compatible client (MCP server)
  • Google A2A protocol (A2A Card)
  • Any shell (standalone CLI)

Security Scope

Unique in the batch — Agentify scans both input (OpenAPI spec for injection patterns) and output (generated TypeScript) for security issues. This is a supply-chain security concern specific to code generation tools.

08

Ui Cli Surface

Agentify — UI & CLI Surface

CLI Binary

  • Binary name: agentify-cli
  • Is thin wrapper: No — full runtime (TypeScript/Node.js)
  • Install: npm install -g agentify-cli or npx agentify-cli
agentify-cli transform <url-or-file> [options]

Options:
  -f, --formats <formats...>   Output formats (mcp, claude.md, agents.md, cursorrules, 
                                skills, llms.txt, gemini.md, a2a, cli)
  -o, --output <dir>           Output directory (default: ./<api-name>-mcp-server)
  -n, --name <name>            Project name override

Local UI

None — CLI only with progress output to stdout:

  Agentify v0.4.1
  Agent Interface Compiler

  +-- 20 endpoints detected -> SMALL API strategy
  +-- 3 domains identified (pet, store, user)
  +-- Auth: apiKey (SWAGGER_PETSTORE_API_KEY)
  +-- Strategy: Direct tool mapping — one tool per endpoint

  > Generated mcp + claude.md + agents.md + cursorrules + llms.txt + gemini.md + skills + a2a (15 files)
  > Output: ./swagger-petstore-mcp-server
  > Security scan: PASSED

MCP Server

None shipped — generates MCP servers as output artifacts, does not host its own.

IDE Integration

None native — generates IDE-specific config files (.cursorrules, CLAUDE.md) as output.

Observability

  • Transform progress: domain detection, auth detection, API scale, strategy selection, file count
  • Security scan result: PASSED / FAILED + warnings
  • Warning output: auto-normalized non-compliant spec warnings

Demo

docs/demo.gif — animated terminal demo showing transform on Petstore spec.

Related frameworks

same archetype · same primary tool · same memory type

claude-mem (thedotmack) ★ 78k

Background worker service captures every tool call as an observation, AI-compresses sessions, and auto-injects relevant past…

pi (badlogic/earendil) ★ 55k

A minimal, hackable, multi-provider terminal coding agent that adapts to your workflows via npm-installable TypeScript Extensions…

Agent Skills (Addy Osmani) ★ 46k

Encodes senior-engineer software development lifecycle as 23 auto-routed skills and 7 slash commands for any AI coding agent.

wshobson/agents Plugin Marketplace ★ 36k

Single Markdown source for 83 domain-specialized plugins that auto-generates idiomatic artifacts for five AI coding harnesses.

TabbyML/Tabby ★ 34k

Self-hosted AI coding assistant server (alternative to GitHub Copilot) with admin dashboard, RAG-based completions, and multi-IDE…

Compound Engineering ★ 17k

Make each unit of engineering work compound into easier future work via brainstorm→plan→execute→review→learn cycles.