본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)7.6k · #13182

server-plugins

하는 일

이 스킬은 Agent-Native 앱의 서버 플러그인이 어떻게 작동하는지, 그리고 프레임워크 경로를 어디에 두어야 하는지 설명합니다. 서버 기능을 추가하거나 자동으로 나타나는 경로를 디버깅하는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓앱에 맞춤 서버 플러그인을 추가해야 할 때.
  • ✓일반 API 경로와 액션 중 무엇을 쓸지 결정해야 할 때.
  • ✓내장 프레임워크 경로가 예상과 다르게 작동할 때.

스킬 링크

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/server-plugins/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/server-plugins/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 앱에 맞춤 서버 기능을 추가하고, 그것이 API 경로여야 할지 액션이어야 할지도 알려 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

기본 플러그인은 자동으로 로드됩니다. 사용자 정의가 필요한 플러그인만 자체 파일을 가지며, 모든 프레임워크 경로는 공통 경로 접두사 아래에 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Server Plugins & Framework Routes

Default Plugins (auto-mount)

Five default plugins auto-mount when your app doesn't have a custom version in server/plugins/:

Plugin Default behavior Customize when
agent-chat Agent chat endpoints Custom mentionProviders or systemPrompt
auth Auth middleware Custom publicPaths or Google OAuth config
core-routes /_agent-native/poll, /_agent-native/ping, etc Custom envKeys or sseRoute
resources Resource CRUD Rarely
terminal Terminal emulator Rarely

Only create plugin files for plugins you need to customize. Let defaults auto-mount.

Framework Route Namespace: /_agent-native/

All framework-level routes live under /_agent-native/ to avoid collisions with template-specific /api/* routes.

Hard rule

  • ALL framework routes go under /_agent-native/.
  • Templates own /api/* only for route-only domain concerns such as uploads, streaming, webhooks, OAuth callbacks, or non-JSON protocols.
  • Never put framework routes under /api/.
  • Never put template routes under /_agent-native/ — that namespace is reserved.
  • Never create /api/* routes that only wrap, proxy, or re-export actions. Use the existing /_agent-native/actions/:name endpoint or the React action hooks.

Auto-mounted framework routes

Route Purpose
GET /_agent-native/poll Polling endpoint for DB change detection
GET /_agent-native/events SSE endpoint for real-time sync
GET /_agent-native/ping Health check
GET/PUT/DELETE /_agent-native/application-state/:key Application state CRUD
GET/PUT/DELETE /_agent-native/application-state/compose/:id Compose draft CRUD
POST /_agent-native/agent-chat Agent chat SSE endpoint
GET /_agent-native/agent-chat/mentions Mention search for @-tagging
GET /_agent-native/env-status Env key configuration status
POST /_agent-native/env-vars Save env vars
/_agent-native/auth/* Authentication (login, session, logout)
/_agent-native/google/* Google OAuth (callback, auth-url, etc.)
/_agent-native/resources/* Resource CRUD
/_agent-native/actions/:name Auto-mounted action endpoints
/_agent-native/available-clis Available CLI tools
/_agent-native/agent-terminal-info Terminal connection info
/_agent-native/collab/* Real-time collaboration (see real-time-collab)
/_agent-native/a2a A2A JSON-RPC endpoint (see a2a-protocol)

Actions-First Approach

For standard CRUD and data operations, use defineAction in actions/ — the framework auto-mounts them as HTTP endpoints at /_agent-native/actions/:name. Only create custom /api/* routes for things actions can't do:

  • File uploads with multipart form data
  • Streaming responses
  • Webhooks from external services
  • OAuth callbacks

Before adding a route, inspect the existing action files. Reuse the action if it already encodes the business rule, or add a new action if the operation should be available to both the agent and the UI. A route whose implementation mostly calls an action is usually the wrong abst

자주 묻는 질문

플러그인마다 파일이 필요한가요?

아니요. 기본값을 로드하게 두고, 필요한 것만 사용자 정의하라고 이 스킬은 말합니다.

프레임워크 경로는 어떤 접두사를 쓰나요?

앱 경로와 충돌하지 않도록 /_agent-native/ 접두사를 씁니다.

/api/ 경로는 언제 써야 하나요?

업로드나 스트리밍처럼 경로에만 관련된 기능에 씁니다.

상세 정보

작성자의 원본 설명

Framework server plugins and the `/_agent-native/` route namespace. Use when adding a custom server plugin, deciding whether to create an `/api/` route vs an action, or debugging auto-mounted framework routes.

repo: BuilderIO/agent-native

인기도

GitHub 스타
7.6k
순위
#13182
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬