Membangun untuk AI Agents: Perjalanan Apidog CLI

Apidog CLI adalah alat command-line untuk pengujian dan manajemen API.

Oliver Kingsley

Oliver Kingsley

8 July 2026

Membangun untuk AI Agents: Perjalanan Apidog CLI

Apidog untuk Perusahaan

Penerapan On-Premises

SSO & RBAC

Sesuai SOC 2

Jelajahi Apidog Enterprise

Ini adalah seri 10 bagian yang berbagi bagaimana Apidog mengembangkan Apidog CLI, sebuah tool command-line untuk testing API dan manajemen lifecycle API. Baca secara berurutan atau langsung ke post yang menarik bagi Anda:

Judul Fokus
1 Kami Membangun 126 MCP Tools. Tapi Ini Bukan Solusi Terbaik untuk Agent Penemuan masalah
2 Mengapa Kami Mengembangkan Apidog CLI yang Baru Pengembangan arsitektur
3 Aturan Emas: CLI Menghasilkan Facts, Model Bertindak pada Facts Filosofi core
4 agentHints: Mengajar CLIs untuk Berbicara dengan Agents Output terstruktur
5 SKILL: Mengirim Pengalaman Operasional sebagai Code Pengalaman operasional
6 Angka Tidak Berbohong: 30% Kurang Tool Calls, 25% Kurang Tokens Hasil kuantitatif
7 Dari PRD ke Loop Testing: Workflow Agent Lengkap dengan Apidog CLI Tutorial praktis
8 Mengapa CI/CD Compatibility Tidak Bisa Ditawar untuk Agent Tools Perspektif DevOps
9 AI Branch: Perubahan Project yang Lebih Aman dengan AI Agents Lapisan keamanan
10 Spec-First adalah Masa Lalu. Selamat Datang Skill-First. Visi & masa depan
Kami Membangun 126 MCP Tools. Kemudian Kami Menemukan Ini Bukan Solusi Terbaik untuk Bekerja pada Pengembangan API dengan Agents.

Ketika MCP (Model Context Protocol) menjadi hotspot industri pada awal 2025, pertanyaan yang dihadapi setiap produk API sangat sederhana: "Apakah Anda punya MCP?"

Untuk Apidog, kami menjawab ya. Kami membangun MCP Server yang lengkap—tidak hanya demo sederhana. MCP client akan menginisialisasi session, server akan generate sessionId, dan menyimpan state session melalui Redis. Ini adalah sistem session level protocol. Kami membagi tools ke dalam kategori: tools native project, tools domain built-in, dan 126 tools yang di-generate otomatis dari definisi endpoint OpenAPI.

Apidog MCP terus bekerja dan melayani users yang membutuhkan integrasi MCP. Ini menyediakan koneksi tools terstandardisasi mengikuti protocol MCP, yang berharga untuk ecosystem.

Tapi ketika kami masuk ke task nyata yang melibatkan workflow R&D kompleks, kami menemukan limitations. Ketika user bilang "bantu saya tambahkan test untuk endpoint ini dan jalankan verification", Agent menghadapi dinding tools random—memutuskan mana yang digunakan, dalam sequence apa, dengan validation apa.

Kami sadar: MCP unggul dalam menghubungkan tools, tapi task R&D kompleks membutuhkan lebih dari tool connection—they need executable engineering processes.

Insight itu membawa kami mengembangkan Apidog CLI sebagai pendekatan yang lebih baik—one yang menangani development workflow lebih baik.

button

Apidog CLI Apa?

Apidog CLI

Apidog CLI adalah tool command-line untuk testing API yang memungkinkan Anda menjalankan test scenarios, manage API documentation, dan automate testing workflows langsung dari terminal atau CI/CD pipelines. Dibangun khusus untuk AI agents manage resource API, ini melampaui CLI tradisional untuk API testing—menyediakan output terstruktur, schema validation, dan next-step guidance yang agents butuhkan untuk execute workflow kompleks secara aman. Baik Anda menjalankan automated API tests di GitHub Actions, generating test cases dari code dengan Claude Code, atau maintaining test scenarios across projects, Apidog CLI berfungsi sebagai bridge antara AI agents dan infrastructure testing API Anda.

Quick Start: Coba Apidog CLI + SKILL

Jika Anda ingin mencoba pendekatan yang dijelaskan dalam seri ini, ini cara memulai:

# Install Apidog CLI
npm install -g apidog-cli@latest

# Install companion SKILL for AI Agents
apidog skill install

# Check version (need 2.2.5+ for new capabilities)
apidog -v

# Authenticate

Atau minta AI Agent Anda untuk menginstall:

Read the instructions and help me install Apidog CLI:

Task Pertama Anda dengan Agent

Setelah instalasi, berikan Agent Anda task kecil dan low-risk:

Use Apidog CLI to help me create my first API endpoint in Apidog.
First, check my Apidog CLI setup and list the projects I can access.
Ask me which project to use. After I confirm, create a simple GET /health
endpoint named Health Check with a 200 response example. Validate any
structured input before writing, then read the endpoint back and summarize

Ini memberi Anda starting point konkret: Agent checks setup, bertanya sebelum writing, membuat API definition kecil, validates sebelum writing, dan confirms saved result.

Arsitektur Core

LayerResponsibility
ApidogManage aset API dan test (docs, schemas, mocks, tests, reports)
CLIMenyediakan execution deterministic (read, validate, write, run)
SKILLMenyediakan task judgment dan operation paths (8 companion Skills)
AI BranchIsolate changes untuk human review sebelum merge
AgentsMemahami goals, call commands, adjust berdasarkan feedback

Loop yang Lebih Aman untuk Agent-Driven Testing

Dengan AI Branch sebagai outer security layer, workflow lengkap terlihat seperti ini:

┌─────────────────────────────────────────────────────────────────────┐
│                        AI BRANCH (Lapisan Keamanan)                  │
│  ┌──────────────┐     ┌──────────────┐     ┌──────────────┐         │
│  │  Read Assets │────▶│  Generate    │────▶│  Validate    │         │
│  │  (CLI get)   │     │  (Agent)     │     │  (cli-schema)│         │
│  └──────────────┘     └──────────────┘     └──────────────┘         │
│                                                │                    │
│                                                ▼                    │
│  ┌──────────────┐     ┌──────────────┐     ┌──────────────┐         │
│  │  Run Tests   │◀────│  Read Back   │◀────│    Write     │         │
│  │  (apidog run)│     │  (CLI get)   │     │  (to AI Br.) │         │
│  └──────────────┘     └──────────────┘     └──────────────┘         │
│          │                                                          │
│          ▼                                                          │
│  ┌──────────────────────────────────────┐                           │
│  │         Human Review & Merge          │                           │
│  │   (User confirms before main branch)  │                           │
│  └──────────────────────────────────────┘                           │

Loop ini penting karena banyak resource Apidog terstruktur. Test cases dan test scenarios termasuk request data, assertions, variable extraction, pre/post processors, step order, dan environment references. Jika Agent guessing structure, errors kecil menyebabkan failed writes, incomplete display, atau tests yang tidak bekerja sesuai expected.

Let Agent generate, let CLI validate, dan let AI Branch isolate changes sampai human review.


Overview Journey Apidog CLI

Seri ini documents bagaimana kami mengembangkan Apidog CLI sebagai strategi yang lebih baik untuk workflow R&D API.

Apidog MCP terus menyediakan standardized tool connections—itu valuable dan kami maintain. Tapi untuk tasks yang melibatkan multi-step workflows, validation gates, dan structured execution, kami menemukan CLI + SKILL offers experience yang lebih baik.

Kami tidak hanya menambahkan commands ke CLI lama, dimana users menjalankan automatic API tests integrating dengan CI/CD mereka. Kami systematically introduced Apidog's core capabilities ke CLI, making it workflow layer untuk developers, scripts, dan AI Agents.

Key difference adalah dimana complexity lives:

Hasil: safer Agent workflows untuk complex tasks, fewer tool calls, less token waste, dan better error recovery—sedangkan MCP remains available untuk users yang prefer approach itu.

Map Journey Apidog CLI

┌─────────────────────────────────────────────────────────────────┐
│                    THE APIDOG CLI + SKILL JOURNEY               │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  [Problem Discovery]                                            │
│     │                                                           │
│  ┌───┐                                                          │
│  │ 1 │ We Built 126 MCP Tools. Then We Found                    │
│  └───┘ a Better Approach for Workflows.                         │
│     │                                                           │
│     ▼                                                           │
│  [Architecture Development]                                     │
│  ┌───┐                                                          │
│  │ 2 │ Why We Developed a Brand-new Apidog CLI                  │
│  └───┘                                                          │
│     │                                                           │
│     ├──────────────────┬──────────────────┐                     │
│     ▼                  ▼                  ▼                     │
│  [Core Philosophy]  [Technical Design]                          │
│  ┌───┐              ┌───┐              ┌───┐                    │
│  │ 3 │ CLI Produces │ 4 │ agentHints:  │ 5 │ SKILL: Shipping    │
│  └───┘ Facts        └───┘ Teaching     └───┘ Operational        │
│     │              │    CLIs           │    Experience          │
│     │              │                  │                         │
│     └──────────────┴──────────────────┘                         │
│                        │                                        │
│                        ▼                                        │
│               [Validation & Practice]                           │
│               ┌───┐        ┌───┐                                │
│               │ 6 │───────│ 7 │                                 │
│               └───┘ Numbers│   PRD to Testing                   │
│                   │        │   Loop                             │
│                   ▼        ▼                                    │
│               [Foundation]   [Security Layer]                    │
│               ┌───┐        ┌───┐                                │
│               │ 8 │───────│ 9 │                                 │
│               └───┘ CI/CD  │   AI Branch                       │
│                   │        │                                    │
│                   └────────┘                                    │
│                        │                                        │
│                        ▼                                        │
│                   [Vision]                                      │
│                   ┌────┐                                        │
│                   │ 10 │ Spec-First → Skill-First               │
│                   └────┘                                        │
│                                                                 │

Quick Journey Navigation

Part 1: Problem Discovery

Kami Membangun 126 MCP Tools. Kemudian Kami Menemukan Solusi yang Lebih Baik untuk API Development Workflows dengan AI Agents.

MCP menyediakan standardized tool connections—tapi untuk R&D workflows kompleks, kami menemukan limitations. Agents menghadapi wall of random tools ketika tasks involved multi-step processes. Post ini explores four structural challenges dan mengapa CLI + SKILL lebih baik untuk workflow-heavy tasks.


Part 2: Architecture Development

2. Mengapa Kami Mengembangkan Apidog CLI yang Baru

Kami tidak abandon MCP—kami built CLI + SKILL untuk handle apa yang MCP tidak optimize: complex workflows dengan validation gates dan structured execution. Post ini compares execution chains dan explains bagaimana CLI + SKILL distributes complexity ke engineering system sedangkan MCP continues serving its purpose.


Part 3: Core Philosophy

3. Aturan Emas: CLI Menghasilkan Facts, Model Bertindak pada Facts

Core principle: tidak make model memorize semua rules—let rules be executed at the right places. Post ini introduces `cli-schema validate`, quality gate yang catches field errors, wrong enums, dan structural problems sebelum mereka become failed writes.


Part 4-5: Technical Design

4. agentHints: Mengajar CLIs untuk Berbicara dengan Agents

Traditional CLI output untuk humans. Agents need structured results, failure reasons, dan next-step suggestions. `agentHints` turns product experience ke machine-readable guidance—appearing exactly dimana Agents need untuk make decisions.

5. SKILL: Mengirim Pengalaman Operasional sebagai Code

A SKILL bukan hanya command reference. It's operating guide untuk AI Agents: when to use command, which comes first, fields apa yang shouldn't be guessed, when to validate, when to read back. SKILL packages workflow knowledge ke versionable, evolvable guides.


Part 6-7: Validation & Practice

6. Angka Tidak Berbohong: 30% Kurang Tool Calls, 25% Kurang Tokens

Kami compared MCP vs. CLI + SKILL across typical tasks. Tool call steps decreased ~30%. Token consumption dari invalid descriptions dan retries decreased ~25%. Structural error retries decreased ~40%. Post ini breaks down dimana savings come from.

7. Dari PRD ke Loop Testing: Workflow Agent Lengkap dengan Apidog CLI

Walk through real example: team has Order Refund PRD dan codebase. See how Agent uses CLI + SKILL untuk generate OpenAPI, create test cases, validate structures, build test scenarios, dan run verification—end to end.


Part 8-9: Foundation & Security

8. Mengapa CI/CD Compatibility Tidak Bisa Ditawar untuk Agent Tools

Agent-friendliness must be built on CI/CD-friendliness. `apidog run` serves both: CI cares tentang exit codes, report files, stable parameters; Agents care tentang structured results, failure reasons, next-step suggestions. One command, multiple consumers.

9. AI Branch: Perubahan Project yang Lebih Aman dengan AI Agents

When Agents modify project resources, security matters. AI Branch provides isolated editing—changes stay in separate branch sampai human review. Ini prevents automated changes dari directly affecting main branch. Create, review, kemudian merge dengan confidence.


Part 10: Vision & Future

10. Spec-First adalah Masa Lalu. Selamat Datang Skill-First.

API development changing dengan AI Agents joining workflow. Spec-First untuk human collaboration. Skill-First packages specs, tests, dan scenarios ke executable, verifiable skills—complementing existing approaches untuk Agent era. Post ini outlines future dan provides concrete getting-started steps.


Key Takeaways (TL;DR)

InsightWhat It Means
MCP dan CLI + SKILL serve different needsMCP connects tools; CLI + SKILL executes workflows—use what fits your task
Complexity belongs in engineering, not context126 tools × 500 tokens = 50,000 tokens burden untuk complex workflows
`cli-schema validate` is the quality gateCatch errors locally, tidak melalui failed writes
`agentHints` guides next stepsPrevents Agents dari writing based on "imagination"
SKILL packages operational experienceNot just commands—workflow wisdom untuk Agents
CI/CD remains the foundationAgent features added on top, not replacing CI
AI Branch provides security layerIsolated editing + human review sebelum merge

Start Reading

Ready untuk dive in? Start dengan Post 1: Kami Membangun 126 MCP Tools. Kemudian Kami Menemukan Solusi yang Lebih Baik untuk Workflows.


Download Apidog untuk design, mock, test, dan document APIs dalam satu workspace. Learn more tentang Apidog CLI untuk command-line API testing, CI automation, dan AI Agent workflows.

button

Mengembangkan API dengan Apidog

Apidog adalah alat pengembangan API yang membantu Anda mengembangkan API dengan lebih mudah dan efisien.