server-plugins
यह क्या करती है
यह स्किल बताती है कि agent-native ऐप में server plugins कैसे काम करते हैं और फ़्रेमवर्क routes कहां रहने चाहिए। यह server फ़ीचर जोड़ने या अपने-आप दिखने वाले routes को डीबग करने वाले डेवलपर्स के लिए है।
कब इस्तेमाल करें
- ✓जब आपको ऐप में कस्टम server plugin जोड़ना है।
- ✓जब आपको तय करना है कि साधारण API route रखें या action।
- ✓जब कोई बिल्ट-इन फ़्रेमवर्क route अनपेक्षित ढंग से व्यवहार करे।
Skill का लिंक
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/server-plugins/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस ऐप में एक कस्टम server फ़ीचर जोड़िए, और बताइए कि वह API route होना चाहिए या action।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
डिफ़ॉल्ट plugins अपने-आप लोड होते हैं। केवल जिन plugins को कस्टमाइज़ करना हो उनकी अलग फ़ाइल बनती है, और सभी फ़्रेमवर्क routes एक साझा path prefix के नीचे रहते हैं।
तकनीकी सामग्री (मूल 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/:nameendpoint 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
अक्सर पूछे जाने वाले सवाल
क्या हर plugin के लिए फ़ाइल चाहिए?
नहीं। स्किल कहती है कि डिफ़ॉल्ट लोड होने दें और केवल ज़रूरी हिस्से कस्टमाइज़ करें।
फ़्रेमवर्क routes कौन सा path इस्तेमाल करते हैं?
वे ऐप routes से टकराने से बचने के लिए prefix /_agent-native/ इस्तेमाल करते हैं।
/api/ route कब इस्तेमाल करें?
केवल route-विशिष्ट काम जैसे uploads या streaming के लिए।
जानकारी
लेखक का मूल विवरण
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
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
design-exploration
7.6kयह आपके एजेंट को UI के कई डिज़ाइन विकल्प साथ-साथ दिखाने, आपकी पसंद चुनवाने और फिर चुने डिज़ाइन को सुधारने में मदद करती है।
visual-edit
7.6kयह आपके एजेंट को चल रहे लोकल ऐप को विज़ुअल एडिटर में खोलने देती है, ताकि आप उसकी असली स्क्रीन एक साथ देखकर संपादित कर सकें।
turn-into-app
7.6kयह किसी वर्कफ़्लो, स्प्रेडशीट या प्रोजेक्ट को भरी हुई स्क्रीन वाले विज़ुअल ऐप में बदलती है, जिसके कंट्रोल के पीछे एजेंट काम करता है।
visual-plan
7.6kयह सादे टेक्स्ट वाली योजना को डायग्राम, फ़ाइल नक्शों, कोड अंश और खुले सवालों वाली इंटरैक्टिव विज़ुअल योजना में बदलती है।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।