@agent-native/core 0.84.34 → 0.84.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -51
- package/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +20 -0
- package/corpus/core/docs/content/actions.mdx +17 -24
- package/corpus/core/docs/content/agent-surfaces.mdx +59 -56
- package/corpus/core/docs/content/cloneable-saas.mdx +3 -3
- package/corpus/core/docs/content/faq.mdx +4 -4
- package/corpus/core/docs/content/getting-started.mdx +246 -204
- package/corpus/core/docs/content/key-concepts.mdx +9 -9
- package/corpus/core/docs/content/locales/ar-SA/cloneable-saas.mdx +3 -3
- package/corpus/core/docs/content/locales/ar-SA/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/ar-SA/getting-started.mdx +148 -214
- package/corpus/core/docs/content/locales/ar-SA/pure-agent-apps.mdx +4 -9
- package/corpus/core/docs/content/locales/ar-SA/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/ar-SA/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/locales/de-DE/cloneable-saas.mdx +3 -3
- package/corpus/core/docs/content/locales/de-DE/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/de-DE/getting-started.mdx +145 -211
- package/corpus/core/docs/content/locales/de-DE/pure-agent-apps.mdx +4 -9
- package/corpus/core/docs/content/locales/de-DE/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/de-DE/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/locales/es-ES/cloneable-saas.mdx +3 -3
- package/corpus/core/docs/content/locales/es-ES/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/es-ES/getting-started.mdx +148 -214
- package/corpus/core/docs/content/locales/es-ES/pure-agent-apps.mdx +4 -9
- package/corpus/core/docs/content/locales/es-ES/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/es-ES/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/locales/fr-FR/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/fr-FR/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/fr-FR/getting-started.mdx +146 -212
- package/corpus/core/docs/content/locales/fr-FR/pure-agent-apps.mdx +4 -9
- package/corpus/core/docs/content/locales/fr-FR/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/fr-FR/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/locales/hi-IN/cloneable-saas.mdx +3 -3
- package/corpus/core/docs/content/locales/hi-IN/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/hi-IN/getting-started.mdx +149 -215
- package/corpus/core/docs/content/locales/hi-IN/pure-agent-apps.mdx +8 -13
- package/corpus/core/docs/content/locales/hi-IN/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/hi-IN/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/locales/ja-JP/cloneable-saas.mdx +2 -2
- package/corpus/core/docs/content/locales/ja-JP/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/ja-JP/getting-started.mdx +144 -210
- package/corpus/core/docs/content/locales/ja-JP/pure-agent-apps.mdx +8 -13
- package/corpus/core/docs/content/locales/ja-JP/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/ja-JP/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/locales/ko-KR/cloneable-saas.mdx +3 -3
- package/corpus/core/docs/content/locales/ko-KR/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/ko-KR/getting-started.mdx +146 -212
- package/corpus/core/docs/content/locales/ko-KR/pure-agent-apps.mdx +8 -13
- package/corpus/core/docs/content/locales/ko-KR/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/ko-KR/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/locales/pt-BR/cloneable-saas.mdx +3 -3
- package/corpus/core/docs/content/locales/pt-BR/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/pt-BR/getting-started.mdx +145 -211
- package/corpus/core/docs/content/locales/pt-BR/pure-agent-apps.mdx +4 -9
- package/corpus/core/docs/content/locales/pt-BR/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/pt-BR/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-CN/cloneable-saas.mdx +3 -3
- package/corpus/core/docs/content/locales/zh-CN/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/zh-CN/getting-started.mdx +158 -209
- package/corpus/core/docs/content/locales/zh-CN/pure-agent-apps.mdx +4 -9
- package/corpus/core/docs/content/locales/zh-CN/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-CN/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-TW/cloneable-saas.mdx +3 -3
- package/corpus/core/docs/content/locales/zh-TW/faq.mdx +4 -4
- package/corpus/core/docs/content/locales/zh-TW/getting-started.mdx +158 -212
- package/corpus/core/docs/content/locales/zh-TW/pure-agent-apps.mdx +4 -9
- package/corpus/core/docs/content/locales/zh-TW/template-chat.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-TW/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/native-chat-ui.mdx +17 -32
- package/corpus/core/docs/content/pure-agent-apps.mdx +46 -26
- package/corpus/core/docs/content/template-chat.mdx +8 -8
- package/corpus/core/docs/content/using-your-agent.mdx +2 -2
- package/corpus/core/docs/content/what-is-agent-native.mdx +6 -6
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/a2a/response-text.ts +10 -1
- package/corpus/core/src/agent/production-agent.ts +23 -20
- package/corpus/core/src/agent/run-manager.ts +46 -1
- package/corpus/core/src/agent/thread-data-builder.ts +15 -2
- package/corpus/core/src/cli/skills.ts +7 -9
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +2 -0
- package/corpus/core/src/client/RunStuckBanner.tsx +172 -18
- package/corpus/core/src/client/blocks/library/wireframe-kit.tsx +57 -9
- package/corpus/core/src/client/blocks/library/wireframe.tsx +3 -18
- package/corpus/core/src/client/chat/widgets/builtin-tool-renderers.tsx +28 -32
- package/corpus/core/src/client/code-agent-chat-adapter.ts +8 -1
- package/corpus/core/src/client/sse-event-processor.ts +21 -3
- package/corpus/core/src/code-agents/transcript-normalizer.ts +31 -0
- package/corpus/core/src/db/schema.ts +5 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +8 -2
- package/corpus/core/src/server/agent-teams.ts +24 -2
- package/corpus/core/src/styles/blocks.css +27 -6
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +1 -4
- package/corpus/templates/analytics/changelog/2026-07-01-smoother-chat-streaming.md +6 -0
- package/corpus/templates/content/actions/list-trashed-content-databases.ts +1 -1
- package/corpus/templates/plan/.agents/skills/visual-plan/references/wireframe.md +7 -9
- package/corpus/templates/plan/.agents/skills/visual-recap/references/wireframe.md +7 -9
- package/dist/a2a/response-text.d.ts +1 -0
- package/dist/a2a/response-text.d.ts.map +1 -1
- package/dist/a2a/response-text.js +8 -2
- package/dist/a2a/response-text.js.map +1 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +31 -27
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-manager.d.ts +12 -0
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +32 -1
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/thread-data-builder.d.ts.map +1 -1
- package/dist/agent/thread-data-builder.js +15 -2
- package/dist/agent/thread-data-builder.js.map +1 -1
- package/dist/cli/skills.d.ts +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +7 -9
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +1 -1
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/RunStuckBanner.d.ts +13 -1
- package/dist/client/RunStuckBanner.d.ts.map +1 -1
- package/dist/client/RunStuckBanner.js +123 -16
- package/dist/client/RunStuckBanner.js.map +1 -1
- package/dist/client/blocks/library/wireframe-kit.d.ts +6 -6
- package/dist/client/blocks/library/wireframe-kit.d.ts.map +1 -1
- package/dist/client/blocks/library/wireframe-kit.js +52 -5
- package/dist/client/blocks/library/wireframe-kit.js.map +1 -1
- package/dist/client/blocks/library/wireframe.d.ts.map +1 -1
- package/dist/client/blocks/library/wireframe.js +1 -11
- package/dist/client/blocks/library/wireframe.js.map +1 -1
- package/dist/client/chat/widgets/builtin-tool-renderers.d.ts.map +1 -1
- package/dist/client/chat/widgets/builtin-tool-renderers.js +27 -31
- package/dist/client/chat/widgets/builtin-tool-renderers.js.map +1 -1
- package/dist/client/code-agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/code-agent-chat-adapter.js +5 -1
- package/dist/client/code-agent-chat-adapter.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +21 -3
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/code-agents/transcript-normalizer.d.ts.map +1 -1
- package/dist/code-agents/transcript-normalizer.js +24 -0
- package/dist/code-agents/transcript-normalizer.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/routes.d.ts +2 -2
- package/dist/db/schema.d.ts +2 -1
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/db/schema.js +3 -2
- package/dist/db/schema.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/resources/handlers.d.ts +3 -3
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +2 -3
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-teams.d.ts.map +1 -1
- package/dist/server/agent-teams.js +17 -2
- package/dist/server/agent-teams.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/styles/blocks.css +27 -6
- package/docs/content/actions.mdx +17 -24
- package/docs/content/agent-surfaces.mdx +59 -56
- package/docs/content/cloneable-saas.mdx +3 -3
- package/docs/content/faq.mdx +4 -4
- package/docs/content/getting-started.mdx +246 -204
- package/docs/content/key-concepts.mdx +9 -9
- package/docs/content/locales/ar-SA/cloneable-saas.mdx +3 -3
- package/docs/content/locales/ar-SA/faq.mdx +4 -4
- package/docs/content/locales/ar-SA/getting-started.mdx +148 -214
- package/docs/content/locales/ar-SA/pure-agent-apps.mdx +4 -9
- package/docs/content/locales/ar-SA/template-chat.mdx +2 -2
- package/docs/content/locales/ar-SA/using-your-agent.mdx +2 -2
- package/docs/content/locales/de-DE/cloneable-saas.mdx +3 -3
- package/docs/content/locales/de-DE/faq.mdx +4 -4
- package/docs/content/locales/de-DE/getting-started.mdx +145 -211
- package/docs/content/locales/de-DE/pure-agent-apps.mdx +4 -9
- package/docs/content/locales/de-DE/template-chat.mdx +2 -2
- package/docs/content/locales/de-DE/using-your-agent.mdx +2 -2
- package/docs/content/locales/es-ES/cloneable-saas.mdx +3 -3
- package/docs/content/locales/es-ES/faq.mdx +4 -4
- package/docs/content/locales/es-ES/getting-started.mdx +148 -214
- package/docs/content/locales/es-ES/pure-agent-apps.mdx +4 -9
- package/docs/content/locales/es-ES/template-chat.mdx +2 -2
- package/docs/content/locales/es-ES/using-your-agent.mdx +2 -2
- package/docs/content/locales/fr-FR/cloneable-saas.mdx +2 -2
- package/docs/content/locales/fr-FR/faq.mdx +4 -4
- package/docs/content/locales/fr-FR/getting-started.mdx +146 -212
- package/docs/content/locales/fr-FR/pure-agent-apps.mdx +4 -9
- package/docs/content/locales/fr-FR/template-chat.mdx +2 -2
- package/docs/content/locales/fr-FR/using-your-agent.mdx +2 -2
- package/docs/content/locales/hi-IN/cloneable-saas.mdx +3 -3
- package/docs/content/locales/hi-IN/faq.mdx +4 -4
- package/docs/content/locales/hi-IN/getting-started.mdx +149 -215
- package/docs/content/locales/hi-IN/pure-agent-apps.mdx +8 -13
- package/docs/content/locales/hi-IN/template-chat.mdx +2 -2
- package/docs/content/locales/hi-IN/using-your-agent.mdx +2 -2
- package/docs/content/locales/ja-JP/cloneable-saas.mdx +2 -2
- package/docs/content/locales/ja-JP/faq.mdx +4 -4
- package/docs/content/locales/ja-JP/getting-started.mdx +144 -210
- package/docs/content/locales/ja-JP/pure-agent-apps.mdx +8 -13
- package/docs/content/locales/ja-JP/template-chat.mdx +2 -2
- package/docs/content/locales/ja-JP/using-your-agent.mdx +2 -2
- package/docs/content/locales/ko-KR/cloneable-saas.mdx +3 -3
- package/docs/content/locales/ko-KR/faq.mdx +4 -4
- package/docs/content/locales/ko-KR/getting-started.mdx +146 -212
- package/docs/content/locales/ko-KR/pure-agent-apps.mdx +8 -13
- package/docs/content/locales/ko-KR/template-chat.mdx +2 -2
- package/docs/content/locales/ko-KR/using-your-agent.mdx +2 -2
- package/docs/content/locales/pt-BR/cloneable-saas.mdx +3 -3
- package/docs/content/locales/pt-BR/faq.mdx +4 -4
- package/docs/content/locales/pt-BR/getting-started.mdx +145 -211
- package/docs/content/locales/pt-BR/pure-agent-apps.mdx +4 -9
- package/docs/content/locales/pt-BR/template-chat.mdx +2 -2
- package/docs/content/locales/pt-BR/using-your-agent.mdx +2 -2
- package/docs/content/locales/zh-CN/cloneable-saas.mdx +3 -3
- package/docs/content/locales/zh-CN/faq.mdx +4 -4
- package/docs/content/locales/zh-CN/getting-started.mdx +158 -209
- package/docs/content/locales/zh-CN/pure-agent-apps.mdx +4 -9
- package/docs/content/locales/zh-CN/template-chat.mdx +2 -2
- package/docs/content/locales/zh-CN/using-your-agent.mdx +2 -2
- package/docs/content/locales/zh-TW/cloneable-saas.mdx +3 -3
- package/docs/content/locales/zh-TW/faq.mdx +4 -4
- package/docs/content/locales/zh-TW/getting-started.mdx +158 -212
- package/docs/content/locales/zh-TW/pure-agent-apps.mdx +4 -9
- package/docs/content/locales/zh-TW/template-chat.mdx +2 -2
- package/docs/content/locales/zh-TW/using-your-agent.mdx +2 -2
- package/docs/content/native-chat-ui.mdx +17 -32
- package/docs/content/pure-agent-apps.mdx +46 -26
- package/docs/content/template-chat.mdx +8 -8
- package/docs/content/using-your-agent.mdx +2 -2
- package/docs/content/what-is-agent-native.mdx +6 -6
- package/package.json +1 -1
|
@@ -11,15 +11,15 @@ description: "الأسئلة الشائعة حول Agent-Native - ما هو، و
|
|
|
11
11
|
|
|
12
12
|
### ما هو الوكيل الأصلي؟ {#what-is-agent-native}
|
|
13
13
|
|
|
14
|
-
Agent-native هو
|
|
14
|
+
Agent-native هو framework لبناء التطبيقات حيث يكون AI agent وسطح المنتج المحيط به شريكين متساويين. يبدأ المسار المعتاد بالدردشة، ثم يضيف typed actions، ويعرض نتائج منظمة inline، ثم ينمو إلى صفحات دائمة فوق نفس SQL state. الثابت هو أن agents والبشر يتشاركون نفس actions وقاعدة البيانات والحالة. راجع [What Is Agent-Native?](/docs/what-is-agent-native) للحصول على الشرح الكامل.
|
|
15
15
|
|
|
16
16
|
### لمن هذا؟ {#who-is-this-for}
|
|
17
17
|
|
|
18
18
|
Agent-native مخصص للأشخاص الذين يريدون تطبيقًا حقيقيًا ووكيل AI للعمل من نفس البيانات وactions. المسارات الشائعة هي:
|
|
19
19
|
|
|
20
20
|
- **استخدم تطبيقًا مستضافًا** إذا كنت تريد البريد أو التقويم أو النماذج أو الخطة أو أي قالب نهائي آخر بدون إعداد - ابدأ من [template gallery](/templates).
|
|
21
|
-
- **ابدأ بالدردشة** إذا كنت تريد
|
|
22
|
-
- **ابدأ بـ
|
|
21
|
+
- **ابدأ بالدردشة** إذا كنت تريد المسار الافتراضي من الصفر: يتحدث المستخدمون مع agent فورًا، ثم توسع التطبيق باستخدام actions ونتائج أصلية وشاشات - ابدأ بـ [Getting Started](/docs/getting-started) أو [Chat](/docs/template-chat).
|
|
22
|
+
- **ابدأ بـ automation-first** إذا كنت تبني مهام مجدولة أو queues أو scripts أو integration workers أو workflows لوكلاء خارجيين بدون UI في المتصفح بعد - ابدأ بـ [Automation-First Apps](/docs/pure-agent-apps).
|
|
23
23
|
- **تفرع القالب وتخصيصه** إذا كنت تريد توصيل منتج SaaS الخاص بك بالمصادقة وقاعدة البيانات وUI والوكيل actions بالفعل - راجع [Templates](/docs/cloneable-saas).
|
|
24
24
|
- **الإنشاء من الصفر** إذا كنت تريد أساسيات إطار العمل لمنتج جديد يستند إلى الوكيل - فابدأ بـ [Getting Started](/docs/getting-started).
|
|
25
25
|
- **قم بتوصيل وكيل آخر أو أداة تعليمات برمجية أخرى** إذا كنت تريد أن يستخدم Claude أو ChatGPT أو Codex أو Cursor أو GitHub Copilot / VS Code تطبيقًا أصليًا للوكيل - راجع [External Agents](/docs/external-agents) و[Skills Guide](/docs/skills-guide).
|
|
@@ -130,7 +130,7 @@ Anthropic Claude وOpenAI (عائلة GPT-5) وGoogle Gemini وأي مزود ي
|
|
|
130
130
|
|
|
131
131
|
### هل يمكنني إنشاء شيء لا تغطيه النماذج؟ {#build-from-scratch}
|
|
132
132
|
|
|
133
|
-
نعم. إذا كنت تريد
|
|
133
|
+
نعم. إذا كنت تريد agentic app أساسيًا، فقم بتشغيل `npx @agent-native/core@latest create my-chat-app --template chat`؛ تحصل على chat threads متينة وactions ومصادقة وحالة وقت تشغيل مدعومة بـ SQL وعرض native inline ومساحة لإضافة شاشاتك الخاصة. إذا كنت تبني automation بلا متصفح، فقم بتشغيل `npx @agent-native/core@latest create my-agent --headless`. راجع [Getting Started](/docs/getting-started)، و[Automation-First Apps](/docs/pure-agent-apps)، و[Chat](/docs/template-chat).
|
|
134
134
|
|
|
135
135
|
### هل يمكنني تجربته بدون تفرع القالب؟ {#try-with-a-skill}
|
|
136
136
|
|
|
@@ -1,259 +1,193 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "الخطوات الأولى"
|
|
3
|
-
description: "
|
|
3
|
+
description: "أنشئ agentic app تبدأ بالدردشة، أضف action، اعرض النتائج المنظمة داخل الدردشة، ثم وسعها إلى صفحة دائمة يستطيع agent فتحها."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
7
|
-
|
|
8
|
-
توفر تطبيقات Agent-Native لوكيل الذكاء الاصطناعي وUI نفس actions والبيانات
|
|
9
|
-
الحالة. يتم إنشاء الوكيل الأساسي من التعليمات التي ترشده، skills التي تعلم
|
|
10
|
-
السلوك القابل للتكرار، وactions الذي يتيح له القيام بعمل حقيقي.
|
|
11
|
-
|
|
12
|
-
**هل تريد تطبيقًا كاملاً للبدء منه؟** استنساخ أحد نماذجنا الغنية —
|
|
13
|
-
[Chat](/docs/template-chat), [Mail](/docs/template-mail),
|
|
14
|
-
[Calendar](/docs/template-calendar), [Content](/docs/template-content),
|
|
15
|
-
[Analytics](/docs/template-analytics)، و[many more](/docs/cloneable-saas) —
|
|
16
|
-
كل تطبيق كامل المواصفات تقوم بتخصيصه.
|
|
17
|
-
|
|
18
|
-
هل تريد البناء من الصفر؟ الخيار الوحيد أمامك هو ما إذا كنت تريد UI —
|
|
19
|
-
كل شيء بعد (كتابة التعليمات، إضافة skills، تعريف actions، التشغيل
|
|
20
|
-
الوكيل) هو نفسه في كلتا الحالتين.
|
|
21
|
-
|
|
22
|
-
<FileTree
|
|
23
|
-
id="doc-block-x4p7u4"
|
|
24
|
-
title={"agent أساسي من Agent-Native"}
|
|
25
|
-
entries={[
|
|
26
|
-
{
|
|
27
|
-
path: "AGENTS.md",
|
|
28
|
-
note: "تعليمات دائمة: الهدف، القواعد، النبرة، وخريطة ما يستطيع agent فعله",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
path: ".agents/skills/customer-research/SKILL.md",
|
|
32
|
-
note: "playbook قابل لإعادة الاستخدام يحمّله agent عندما تطابق المهمة",
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
path: "actions/summarize-week.ts",
|
|
36
|
-
note: "code typed يمكن لل agent و UI و CLI و HTTP و MCP و A2A و jobs و webhooks تشغيله",
|
|
37
|
-
},
|
|
38
|
-
]}
|
|
39
|
-
/>
|
|
40
|
-
|
|
41
|
-
هذا صحيح سواء بدأت بالدردشة UI، أو وكيل بلا رأس، أو تطبيق كامل.
|
|
42
|
-
يغير UI السطح؛ التعليمات، skills، وactions تعطي الوكيل
|
|
43
|
-
التوجيه والسلوك.
|
|
44
|
-
|
|
45
|
-
## 1. أنشئ تطبيقك
|
|
46
|
-
|
|
47
|
-
ستحتاج إلى [Node.js 22+](https://nodejs.org) و[pnpm](https://pnpm.io).
|
|
48
|
-
|
|
49
|
-
قم بتشغيل `create` بدون أي علامات وسيسألك عن الطريقة التي تريد البدء بها (قالب كامل،
|
|
50
|
-
الدردشة أو مقطوعة الرأس) قبل أي شيء آخر:
|
|
6
|
+
# الخطوات الأولى
|
|
51
7
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
8
|
+
Agent-Native مخصص لبناء agentic applications: يشترك AI agent وواجهة UI في نفس [actions](/docs/actions) وبيانات SQL و application state. المسار الأساسي يبدأ من Chat app كي يستطيع المستخدمون التحدث مع agent فورًا، ثم يضيف أسطح التطبيق التي يحتاجها سير العمل.
|
|
9
|
+
|
|
10
|
+
المسار المفيد:
|
|
11
|
+
|
|
12
|
+
1. إنشاء Chat app.
|
|
13
|
+
2. إضافة action.
|
|
14
|
+
3. عرض نتيجة action داخل الدردشة كواجهة أصلية.
|
|
15
|
+
4. حفظ البيانات في SQL.
|
|
16
|
+
5. إضافة صفحة يستطيع agent فتحها عندما يكون الفحص البصري أنسب.
|
|
55
17
|
|
|
56
|
-
|
|
18
|
+
## 1. أنشئ Chat app {#create-your-app}
|
|
57
19
|
|
|
58
|
-
|
|
59
|
-
دردشة قابلة للتخصيص UI، وكل إجراء تضيفه يظهر فيها تلقائيًا:
|
|
20
|
+
تحتاج إلى [Node.js 22+](https://nodejs.org) و[pnpm](https://pnpm.io).
|
|
60
21
|
|
|
61
22
|
```bash
|
|
62
23
|
npx @agent-native/core@latest create my-app --template chat
|
|
24
|
+
cd my-app
|
|
25
|
+
pnpm install
|
|
26
|
+
pnpm dev
|
|
63
27
|
```
|
|
64
28
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
29
|
+
يتضمن القالب durable chat threads و auth و live sync ومجلد `actions/` و actions القياسية `view-screen` و `navigate` وتطبيق React يمكن توسيعه.
|
|
30
|
+
|
|
31
|
+
## 2. أضف action {#add-an-action}
|
|
32
|
+
|
|
33
|
+
Action هي عملية typed operation مشتركة بين agent و UI. في هذا المسار أنشئ `actions/analyze-responses.ts`: تحلل ردود النماذج وتعيد شكلاً موثقًا لرسم مخصص داخل الدردشة.
|
|
34
|
+
|
|
35
|
+
{/* prettier-ignore */}
|
|
36
|
+
```ts
|
|
37
|
+
// actions/analyze-responses.ts
|
|
38
|
+
import { defineAction } from "@agent-native/core/action";
|
|
39
|
+
import { z } from "zod";
|
|
40
|
+
|
|
41
|
+
const responseChartResultSchema = z.object({
|
|
42
|
+
title: z.string(),
|
|
43
|
+
points: z.array(z.object({ day: z.string(), responses: z.number() })),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export default defineAction({
|
|
47
|
+
description: "Analyze recent form responses and render a custom chart.",
|
|
48
|
+
schema: z.object({
|
|
49
|
+
formId: z.string().default("demo")
|
|
50
|
+
}),
|
|
51
|
+
outputSchema: responseChartResultSchema,
|
|
52
|
+
chatUI: {
|
|
53
|
+
renderer: "responses.response-chart",
|
|
54
|
+
title: "مخطط الردود"
|
|
55
|
+
},
|
|
56
|
+
readOnly: true,
|
|
57
|
+
run: async ({ formId }) => ({
|
|
58
|
+
title: `Responses for ${formId}`,
|
|
59
|
+
points: [{ day: "Mon", responses: 12 }, { day: "Tue", responses: 18 }, { day: "Wed", responses: 24 }, { day: "Thu", responses: 21 }],
|
|
60
|
+
}),
|
|
61
|
+
});
|
|
70
62
|
```
|
|
71
63
|
|
|
72
|
-
|
|
64
|
+
شغلها مباشرة:
|
|
73
65
|
|
|
74
66
|
```bash
|
|
75
|
-
|
|
76
|
-
pnpm install
|
|
67
|
+
pnpm action analyze-responses --formId demo
|
|
77
68
|
```
|
|
78
69
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
## 2. أضف إجراءً
|
|
82
|
-
|
|
83
|
-
الإجراء هو عملية واحدة يمكن لوكيلك — وUI — الاتصال بها. كلا السقالات
|
|
84
|
-
اشحن بهذا المثال:
|
|
85
|
-
|
|
86
|
-
<AnnotatedCode
|
|
87
|
-
id="doc-block-pxjqe1"
|
|
88
|
-
title={"أول action لك"}
|
|
89
|
-
filename="actions/hello.ts"
|
|
90
|
-
language="ts"
|
|
91
|
-
code={
|
|
92
|
-
'import { defineAction } from "@agent-native/core/action";\nimport { z } from "zod";\n\nexport default defineAction({\n description: "قل مرحبًا من الوكيل المحلي.",\n schema: z.object({\n name: z.string().default("world"),\n }),\n http: { method: "GET" },\n readOnly: true,\n run: async ({ name }) => {\n return { message: `Hello, ${name}!` };\n },\n});'
|
|
93
|
-
}
|
|
94
|
-
annotations={[
|
|
95
|
-
{
|
|
96
|
-
lines: "5",
|
|
97
|
-
label: "وصف الأداة",
|
|
98
|
-
note: "يقرأ الوكيل `description` ليقرر متى يستدعيه كأداة.",
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
lines: "6-8",
|
|
102
|
-
label: "عقد typed",
|
|
103
|
-
note: "يتحقق zod `schema` واحد من الإدخال من كل سطح: الوكيل، UI، HTTP، MCP وA2A.",
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
lines: "9",
|
|
107
|
-
label: "فعل HTTP",
|
|
108
|
-
note: "اجعل هذا الإجراء متاحًا كنقطة نهاية HTTP تُركّب تلقائيًا.",
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
lines: "10",
|
|
112
|
-
label: "للقراءة فقط",
|
|
113
|
-
note: "تشير `readOnly` إلى أن الإجراء آمن للاستدعاء دون موافقة وقابل للتخزين المؤقت للاستعلامات.",
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
lines: "11-13",
|
|
117
|
-
label: "تنفيذ واحد",
|
|
118
|
-
note: "جسم `run` هو مصدر الحقيقة الوحيد الذي تنفذه كل الواجهات.",
|
|
119
|
-
},
|
|
120
|
-
]}
|
|
121
|
-
/>
|
|
122
|
-
|
|
123
|
-
استبدل `hello` بالعملية الحقيقية الأولى في مجالك. قمت بتعريفه مرة واحدة؛
|
|
124
|
-
يلتقطه كل سطح.
|
|
125
|
-
|
|
126
|
-
استخدم `AGENTS.md` للحصول على إرشادات يجب تطبيقها في كل دورة. استخدم مهارة عندما
|
|
127
|
-
إلى سير عمل أو إجراء مجال قابل لإعادة الاستخدام. استخدم الإجراء عندما يكون
|
|
128
|
-
يحتاج الوكيل إلى طريقة مكتوبة وقابلة للاختبار لقراءة البيانات أو كتابتها أو الاتصال بـ API أو
|
|
129
|
-
إجراء الموافقة.
|
|
130
|
-
|
|
131
|
-
## 3. قم بتشغيله
|
|
132
|
-
|
|
133
|
-
استدعاء الإجراء مباشرة:
|
|
70
|
+
أو اسأل agent في المتصفح:
|
|
134
71
|
|
|
135
|
-
|
|
136
|
-
pnpm action hello --name Steve
|
|
137
|
-
```
|
|
72
|
+
> حلّل الردود الأخيرة لنموذج العرض.
|
|
138
73
|
|
|
139
|
-
|
|
74
|
+
## 3. اعرض النتيجة داخل الدردشة {#render-inline}
|
|
140
75
|
|
|
141
|
-
|
|
142
|
-
pnpm agent "Call the hello action for Steve and explain what happened."
|
|
143
|
-
```
|
|
76
|
+
لأن action تعلن `outputSchema` و `chatUI.renderer` خاصًا بالمنتج، لا يحول transcript البيانات المنظمة إلى نص عادي. سجّل مكون React لذلك المعرّف نفسه عند بدء التطبيق، مثل استيراد `app/chat-renderers.tsx` مرة واحدة من `app/root.tsx`:
|
|
144
77
|
|
|
145
|
-
|
|
146
|
-
|
|
78
|
+
{/* prettier-ignore */}
|
|
79
|
+
```tsx
|
|
80
|
+
import { registerActionChatRenderer, type ToolRendererProps,} from "@agent-native/core/client/chat";
|
|
81
|
+
|
|
82
|
+
type ResponseChartResult = {
|
|
83
|
+
title: string;
|
|
84
|
+
points: Array<{ day: string; responses: number }>;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
function ResponseChart({ context }: ToolRendererProps) {
|
|
88
|
+
const result = context.resultJson as ResponseChartResult;
|
|
89
|
+
const max = Math.max(...result.points.map((point) => point.responses), 1);
|
|
90
|
+
return (
|
|
91
|
+
<section className="rounded-lg border bg-card p-4">
|
|
92
|
+
<h3 className="text-sm font-medium">{result.title}</h3>
|
|
93
|
+
<div className="mt-4 flex h-32 items-end gap-2">
|
|
94
|
+
{result.points.map((point) => (
|
|
95
|
+
<div key={point.day} className="flex flex-1 flex-col items-center gap-2">
|
|
96
|
+
<div className="w-full rounded-t bg-primary" style={{ height: `${(point.responses / max) * 100}%` }} />
|
|
97
|
+
<span className="text-xs text-muted-foreground">{point.day}</span>
|
|
98
|
+
</div>
|
|
99
|
+
))}
|
|
100
|
+
</div>
|
|
101
|
+
</section>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
147
104
|
|
|
148
|
-
|
|
149
|
-
|
|
105
|
+
registerActionChatRenderer({
|
|
106
|
+
id: "responses.response-chart",
|
|
107
|
+
renderer: "responses.response-chart",
|
|
108
|
+
Component: ResponseChart,
|
|
109
|
+
});
|
|
150
110
|
```
|
|
151
111
|
|
|
152
|
-
|
|
153
|
-
المهام المجدولة، وwebhooks. حدد مرة واحدة، اتصل من أي مكان.
|
|
154
|
-
|
|
155
|
-
<Diagram id="doc-block-xp12gz" title={"إجراء واحد، على كل سطح"} summary={"يتم إرسال ملف defineAction واحد إلى كل مستهلك بدون أي أسلاك إضافية."}>
|
|
156
|
-
|
|
157
|
-
```html
|
|
158
|
-
<div class="diagram-fan">
|
|
159
|
-
<div class="diagram-box" data-rough>defineAction</div>
|
|
160
|
-
<div class="diagram-arrow diagram-muted" aria-hidden="true">→</div>
|
|
161
|
-
<div class="diagram-surfaces">
|
|
162
|
-
<span class="diagram-pill">واجهة الدردشة</span
|
|
163
|
-
><span class="diagram-pill">CLI</span><span class="diagram-pill">HTTP</span
|
|
164
|
-
><span class="diagram-pill">MCP</span><span class="diagram-pill">A2A</span
|
|
165
|
-
><span class="diagram-pill">مهام مجدولة</span
|
|
166
|
-
><span class="diagram-pill">Webhooks</span>
|
|
167
|
-
</div>
|
|
168
|
-
</div>
|
|
169
|
-
```
|
|
112
|
+
للمخرجات العامة القابلة لإعادة الاستخدام، يوفّر framework أيضًا renderers مدمجة هي `data-chart` و `data-table`، إضافة إلى `data-insights` لبطاقات تجمع الملخص والرسم والجدول. راجع [Native Chat UI](/docs/native-chat-ui).
|
|
170
113
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
display: flex;
|
|
180
|
-
flex-wrap: wrap;
|
|
181
|
-
gap: 8px;
|
|
182
|
-
max-width: 420px;
|
|
183
|
-
}
|
|
184
|
-
.diagram-fan .diagram-arrow {
|
|
185
|
-
font-size: 22px;
|
|
186
|
-
line-height: 1;
|
|
187
|
-
}
|
|
188
|
-
```
|
|
114
|
+
<WireframeBlock id="doc-block-inline-result-wireframe-ar">
|
|
115
|
+
<Screen
|
|
116
|
+
surface="desktop"
|
|
117
|
+
html={
|
|
118
|
+
"<div style='min-height:340px;box-sizing:border-box;padding:24px;display:flex;justify-content:center;align-items:center;background:var(--wf-bg)'><div style='width:min(530px,100%);display:flex;flex-direction:column;gap:14px'><div class='wf-card' data-rough style='align-self:flex-end;max-width:70%;padding:12px 14px'><strong>User</strong><p style='margin:6px 0 0'>حلّل ردود العرض.</p></div><div class='wf-card' data-rough style='align-self:flex-start;width:min(370px,100%);padding:14px'><strong>Agent</strong><p class='wf-muted' style='margin:6px 0 12px'>تم العرض باستخدام responses.response-chart.</p><section class='wf-card' data-rough style='padding:14px'><h3 style='margin:0 0 12px;font-size:14px'>مخطط الردود</h3><div data-rough='line:bottom' style='height:104px;display:flex;align-items:end;gap:8px;border-bottom:1.4px solid var(--wf-line);padding-bottom:4px'><div style='flex:1;display:flex;flex-direction:column;align-items:center;gap:6px'><div data-rough style='height:38px;width:100%;background:color-mix(in srgb, var(--wf-accent) 24%, transparent);border:1.4px solid var(--wf-accent);border-radius:8px 8px 3px 3px'></div><span class='wf-muted'>إث</span></div><div style='flex:1;display:flex;flex-direction:column;align-items:center;gap:6px'><div data-rough style='height:62px;width:100%;background:color-mix(in srgb, var(--wf-accent) 30%, transparent);border:1.4px solid var(--wf-accent);border-radius:8px 8px 3px 3px'></div><span class='wf-muted'>ثل</span></div><div style='flex:1;display:flex;flex-direction:column;align-items:center;gap:6px'><div data-rough style='height:86px;width:100%;background:color-mix(in srgb, var(--wf-accent) 36%, transparent);border:1.4px solid var(--wf-accent);border-radius:8px 8px 3px 3px'></div><span class='wf-muted'>أر</span></div><div style='flex:1;display:flex;flex-direction:column;align-items:center;gap:6px'><div data-rough style='height:54px;width:100%;background:color-mix(in srgb, var(--wf-accent) 42%, transparent);border:1.4px solid var(--wf-accent);border-radius:8px 8px 3px 3px'></div><span class='wf-muted'>خم</span></div></div></section></div></div></div>"
|
|
119
|
+
}
|
|
120
|
+
/>
|
|
121
|
+
</WireframeBlock>
|
|
189
122
|
|
|
190
|
-
|
|
123
|
+
## 4. احفظ البيانات في SQL {#persist-data}
|
|
191
124
|
|
|
192
|
-
|
|
125
|
+
عندما تحتاج النتيجة إلى المراجعة أو المقارنة أو التحديث، احفظها في SQL واجعل القراءة والكتابة خلف actions:
|
|
193
126
|
|
|
194
|
-
|
|
195
|
-
سجل التشغيل وبيانات الاعتماد كلها موجودة في SQL. محليًا، هذا هو SQLite في
|
|
196
|
-
`data/app.db`; in production you set `DATABASE_URL`. See
|
|
197
|
-
[Deployment](/docs/deployment).
|
|
127
|
+
عرّف الجدول باستخدام helpers المحمولة من framework، وليس عبر imports من `drizzle-orm/sqlite-core` أو `drizzle-orm/pg-core`:
|
|
198
128
|
|
|
199
|
-
|
|
129
|
+
```ts
|
|
130
|
+
// server/db/schema.ts
|
|
131
|
+
import { integer, now, table, text } from "@agent-native/core/db/schema";
|
|
200
132
|
|
|
201
|
-
|
|
133
|
+
export const responseInsights = table("response_insights", {
|
|
134
|
+
id: text("id").primaryKey(),
|
|
135
|
+
formId: text("form_id").notNull(),
|
|
136
|
+
title: text("title").notNull(),
|
|
137
|
+
summary: text("summary").notNull(),
|
|
138
|
+
responseCount: integer("response_count").notNull(),
|
|
139
|
+
createdAt: text("created_at").notNull().default(now()),
|
|
140
|
+
updatedAt: text("updated_at").notNull().default(now()),
|
|
141
|
+
});
|
|
142
|
+
```
|
|
202
143
|
|
|
203
|
-
|
|
144
|
+
تختار هذه helpers backend SQL المضبوط، لذلك يعمل schema نفسه على SQLite محليًا وفي الإنتاج على Postgres أو Turso/libSQL أو D1 أو أي provider SQL مدعوم.
|
|
204
145
|
|
|
205
|
-
|
|
146
|
+
- `create-response-insight` يكتب insight جديدًا.
|
|
147
|
+
- `list-response-insights` يقرأ بيانات الصفحة.
|
|
148
|
+
- `update-response-insight` يحدث السجل.
|
|
149
|
+
- `analyze-responses` يستمر في إعادة widget الدردشة الأصلي.
|
|
206
150
|
|
|
207
|
-
|
|
208
|
-
هو مسار صغير مبني على مكون `<AgentChatSurface>`:
|
|
151
|
+
لا تنشئ REST route مكررة للمتصفح فقط؛ يجب أن تشترك UI و agent في actions.
|
|
209
152
|
|
|
210
|
-
|
|
211
|
-
// app/routes/_index.tsx
|
|
212
|
-
import { AgentChatSurface } from "@agent-native/core/client";
|
|
153
|
+
## 5. أضف صفحة يستطيع agent فتحها {#add-a-page}
|
|
213
154
|
|
|
214
|
-
|
|
215
|
-
return <AgentChatSurface mode="page" className="h-full" />;
|
|
216
|
-
}
|
|
217
|
-
```
|
|
155
|
+
أضف route باسم `/response-insights` واستخدم `useActionQuery("list-response-insights")` و `useActionMutation("create-response-insight")`. هذه الصفحة عرض لحالة SQL؛ وتظل البيانات مكتوبة عبر نفس actions.
|
|
218
156
|
|
|
219
|
-
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
-
|
|
224
|
-
|
|
225
|
-
|
|
157
|
+
<WireframeBlock id="doc-block-response-insights-page-wireframe-ar">
|
|
158
|
+
<Screen
|
|
159
|
+
surface="desktop"
|
|
160
|
+
html={
|
|
161
|
+
"<main style='min-height:440px;box-sizing:border-box;padding:28px;background:var(--wf-bg)'><section style='max-width:960px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:16px;align-items:stretch'><section class='wf-card' data-rough style='display:flex;flex-direction:column;gap:16px'><header><h2 style='margin:0 0 4px;font-size:28px'>رؤى الردود</h2><p class='wf-muted' style='margin:0'>رؤى أنشأها الوكيل من ردود النموذج.</p></header><button class='primary' data-rough style='align-self:flex-start'>حلّل نموذج العرض</button><section style='display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px'><article class='wf-box' data-rough style='padding:12px'><strong>موضوع التسعير</strong><p class='wf-muted' style='margin:8px 0 0'>المستخدمون يطلبون خطة للفرق.</p></article><article class='wf-box' data-rough style='padding:12px'><strong>تراجع في الإعداد</strong><p class='wf-muted' style='margin:8px 0 0'>تحتاج ثلاث خطوات إلى نص أوضح.</p></article></section><section class='wf-card' data-rough style='display:flex;flex-direction:column;gap:10px'><div class='wf-row wf-box' data-rough style='padding:10px 12px;gap:12px;justify-content:space-between'><strong>نموذج العرض</strong><span class='wf-muted'>تم تحليل 42 ردًا</span></div><div class='wf-row wf-box' data-rough style='padding:10px 12px;gap:12px;justify-content:space-between'><strong>الخطوة التالية</strong><span class='wf-muted'>راجع مسودتي رؤى</span></div></section></section><aside class='wf-card' data-rough style='height:100%;box-sizing:border-box;display:flex;flex-direction:column;gap:12px'><strong>الدردشة</strong><div class='wf-box' data-rough style='align-self:flex-end;max-width:210px;padding:10px 12px'><span class='wf-muted'>أنت</span><p style='margin:4px 0 0'>افتح رؤى الردود.</p></div><div class='wf-box' data-rough style='align-self:flex-start;max-width:210px;padding:10px 12px'><span class='wf-muted'>Agent</span><p style='margin:4px 0 0'>تم فتح رؤى الردود.</p></div></aside></section></main>"
|
|
162
|
+
}
|
|
163
|
+
/>
|
|
164
|
+
</WireframeBlock>
|
|
226
165
|
|
|
227
|
-
|
|
228
|
-
[Native واجهة الدردشة](/docs/native-chat-ui) لعرض نتائج الإجراء على هيئة جداول
|
|
229
|
-
المخططات والبطاقات المكتوبة بدلاً من النص العادي.
|
|
166
|
+
وسع `view-screen` و `navigate` كي يعرف agent المسار الحالي ويستطيع فتح `/response-insights`. يمكن للنتائج أيضًا تضمين `href: "/response-insights"` لعرض زر "افتح رؤى الردود" في الدردشة.
|
|
230
167
|
|
|
231
|
-
|
|
232
|
-
طبقة `app/` (جهاز التوجيه React + Vite) هي بالضبط ما تمثله السقالة مقطوعة الرأس
|
|
233
|
-
يترك. أنظف خطوة هي البدء (أو إعادة السقالة) من الدردشة
|
|
234
|
-
قالب; يتم ترحيل حالة `actions/` والوكيل وحالة SQL دون تغيير. انظر
|
|
235
|
-
[Agent Surfaces](/docs/agent-surfaces) لكل سطح بينهما.
|
|
168
|
+
عندما تفتح الدردشة الكاملة صفحة تطبيق، استخدم `AgentChatSurface` و `AgentSidebar` و `useAgentChatHomeHandoff` و `useAgentChatHomeHandoffLinks` و `chatViewTransition` من [Agent Surfaces](/docs/agent-surfaces#rich-chat) كي تنتقل الدردشة إلى اللوحة الجانبية مع الحفاظ على نفس thread.
|
|
236
169
|
|
|
237
|
-
## بنية المشروع
|
|
170
|
+
## بنية المشروع {#project-structure}
|
|
238
171
|
|
|
239
172
|
```text
|
|
240
173
|
my-app/
|
|
241
|
-
actions/ #
|
|
242
|
-
app/ #
|
|
243
|
-
server/ # خادم Nitro
|
|
244
|
-
AGENTS.md # تعليمات
|
|
245
|
-
.agents/ #
|
|
246
|
-
data/app.db # حالة SQLite
|
|
174
|
+
actions/ # عمليات يمكن للوكيل وواجهة المستخدم استدعاؤها
|
|
175
|
+
app/ # مسارات React وصفحاته وواجهات الدردشة
|
|
176
|
+
server/ # خادم Nitro ومخطط SQL
|
|
177
|
+
AGENTS.md # تعليمات دائمة لوكيل التطبيق
|
|
178
|
+
.agents/ # المهارات التي يحمّلها الوكيل عند الحاجة
|
|
179
|
+
data/app.db # حالة SQLite المحلية عند عدم ضبط DATABASE_URL
|
|
247
180
|
```
|
|
248
181
|
|
|
249
|
-
##
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
- **[
|
|
256
|
-
|
|
257
|
-
- **[
|
|
258
|
-
- **[
|
|
259
|
-
- **[
|
|
182
|
+
## هل تريد نقطة بداية كاملة للتحليلات؟ {#analytics-starting-point}
|
|
183
|
+
|
|
184
|
+
مثال رؤى الردود أعلاه صغير عمدًا كي ترى أجزاء framework بوضوح. إذا كنت تبني منتج analytics حقيقيًا، فابدأ من [Analytics](/docs/template-analytics). إنه نقطة بداية قوية: صل providers الخاصة بك، استخدم dashboards و agent actions الموجودة، ثم خصص التطبيق من هناك.
|
|
185
|
+
|
|
186
|
+
## الخطوات التالية {#next}
|
|
187
|
+
|
|
188
|
+
- **[Actions](/docs/actions)** — schemas و auth و approvals و hooks و transport.
|
|
189
|
+
- **[Native Chat UI](/docs/native-chat-ui)** — عرض نتائج actions كجداول ورسوم و typed cards.
|
|
190
|
+
- **[Chat Template](/docs/template-chat)** — أصغر chat-first app.
|
|
191
|
+
- **[Analytics Template](/docs/template-analytics)** — نقطة بداية قوية لتطبيق analytics؛ صل providers ثم خصص من هناك.
|
|
192
|
+
- **[Context Awareness](/docs/context-awareness)** — `view-screen` و `navigate` و route state والعناصر المحددة.
|
|
193
|
+
- **[Agent Surfaces](/docs/agent-surfaces)** — chat و inline UI و app pages و embedded sidecars و automation و agents الخارجية.
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "
|
|
3
|
-
description: "
|
|
2
|
+
title: "Automation-First Apps"
|
|
3
|
+
description: "Agent-Native apps بلا متصفح من أجل scheduled jobs وqueues وscripts وintegration workers وagents خارجية."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Automation-First Apps
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
منتج، وليس لوحة معلومات. يمكنك إرسال طلب من المحطة، Slack، عبر البريد الإلكتروني،
|
|
10
|
-
مهمة مجدولة، أو وكيل آخر، أو الدردشة — "تلخيص رسائل البريد الإلكتروني غير المقروءة"، أو "نشر
|
|
11
|
-
المقاييس اليومية إلى Slack" - ويعمل الوكيل ويعيد النتيجة أينما كانت
|
|
12
|
-
ينتمي. لا يزال تطبيقًا حقيقيًا: actions، الجلسات، حالة التطبيق، السجل،
|
|
13
|
-
الإعدادات وبيانات الاعتماد وسجلات المشاركة كلها موجودة في SQL.
|
|
8
|
+
Automation-first app هو Agent-Native app بلا متصفح من أجل scheduled jobs وqueues وscripts وintegration workers وagents خارجية. ليس المسار الافتراضي في Getting Started، لكنه مفيد عندما لا يحتاج workflow إلى صفحة بعد. لا يزال app حقيقيًا: actions وsessions وapplication state وrun history وsettings وcredentials وسجلات المشاركة كلها موجودة في SQL.
|
|
14
9
|
|
|
15
10
|
<Diagram id="doc-block-1l5rx7k" title={"حلقة وكيل التطبيق هي الباب الأمامي"} summary={"تصل العديد من نقاط الدخول إلى حلقة وكيل واحدة عبر إجراءات وحالة SQL-backed؛ تعود النتائج إلى المكان الذي جاء منه الطلب. تتم إضافة واجهة المستخدم فقط عندما يحتاج البشر إلى الإشراف."}>
|
|
16
11
|
|
|
@@ -7,7 +7,7 @@ description: "تطبيق بسيط للوكيل الأصلي للدردشة أو
|
|
|
7
7
|
|
|
8
8
|
الدردشة هي نقطة البداية الأساسية لتطبيق الوكيل الأصلي. فهو يوفر لك غلافًا نظيفًا على طراز ChatGPT مع الدردشة في المركز، وقائمة المواضيع على اليسار، والتنقل القياسي في التطبيق، والمصادقة، والمزامنة المباشرة، وactions، ومثال واحد للإجراء. ابدأ هنا عندما تريد تطبيق متصفح حقيقي يمكنك البناء عليه دون الالتزام بقالب المجال.
|
|
9
9
|
|
|
10
|
-
إذا كنت تريد
|
|
10
|
+
إذا كنت تريد runtime من نوع automation-first بدون متصفح UI، فابدأ بـ [Automation-First Apps](/docs/pure-agent-apps). إذا كنت تريد شكل منتج مجال نهائي، فابدأ من [Calendar](/docs/template-calendar)، أو [Mail](/docs/template-mail)، أو [Content](/docs/template-content)، أو [Forms](/docs/template-forms)، أو [Analytics](/docs/template-analytics)، أو قالب مجال آخر.
|
|
11
11
|
|
|
12
12
|
<WireframeBlock id="doc-block-xghzfw">
|
|
13
13
|
<Screen
|
|
@@ -200,4 +200,4 @@ export default function ChatRoute() {
|
|
|
200
200
|
- [**Agent Surfaces**](/docs/agent-surfaces) - أنماط بدون رأس، والدردشة، والمضمنة، والتطبيقات الكاملة
|
|
201
201
|
- [**Actions**](/docs/actions) — اتصال نظام الدردشة وUI معًا
|
|
202
202
|
- [**Native واجهة الدردشة**](/docs/native-chat-ui) — أساسيات سطح الدردشة وخيارات وقت التشغيل
|
|
203
|
-
- [**
|
|
203
|
+
- [**Automation-First Apps**](/docs/pure-agent-apps) — automations وqueues وscripts وexternal agent workflows بدون UI في المتصفح
|
|
@@ -99,7 +99,7 @@ description: "الحلقة اليومية للعمل مع الوكيل: فهو
|
|
|
99
99
|
|
|
100
100
|
لا يحتاج كل تطبيق إلى لوحة تحكم كاملة. عندما يكون الوكيل هو المنتج، يمكنك تخطي معظم UI المخصصة: افتح التطبيق، واطلب ما تريد، واترك الوكيل يقوم بالباقي. لا يزال لدى الوكيل سطح الإدارة الخاص به - السجل ومساحة العمل والإعدادات - ولكن التفاعل الأساسي هو المحادثة وليس النقرات.
|
|
101
101
|
|
|
102
|
-
← [**
|
|
102
|
+
← [**Automation-First Apps**](/docs/pure-agent-apps) — تطبيقات بلا متصفح من أجل jobs وqueues وscripts وagents خارجية.
|
|
103
103
|
|
|
104
104
|
## يمكنك المشاركة في التحرير معه {#you-co-edit}
|
|
105
105
|
|
|
@@ -113,5 +113,5 @@ description: "الحلقة اليومية للعمل مع الوكيل: فهو
|
|
|
113
113
|
- [**Agent Mentions**](/docs/agent-mentions) - قم بتوجيهه باستخدام إشارات `@`
|
|
114
114
|
- [**Voice Input**](/docs/voice-input) — قم بتوجيهه عن طريق التحدث
|
|
115
115
|
- [**Drop-in Agent**](/docs/drop-in-agent) - قم بتضمينه في أي تطبيق React
|
|
116
|
-
- [**
|
|
116
|
+
- [**Automation-First Apps**](/docs/pure-agent-apps) - تطبيقات بلا متصفح من أجل jobs وqueues وscripts وagents خارجية
|
|
117
117
|
- [**Real-Time Collaboration**](/docs/real-time-collaboration) — تحرير نفس المستند معًا
|
|
@@ -30,7 +30,7 @@ Jede davon ist eine echte App, die Sie heute verwenden können, und die Startram
|
|
|
30
30
|
| [**Plan**](/docs/template-plan) | Visuelle Pläne und PR-Zusammenfassungen mit Diagrammen, Wireframes und Anmerkungen. |
|
|
31
31
|
| [**Dispatch**](/docs/template-dispatch) | Die Workspace-Steuerungsebene: gemeinsame Geheimnisse, wiederverwendbare Integrationen, Slack/Telegram, geplante Jobs. |
|
|
32
32
|
|
|
33
|
-
Sie möchten keine Domain-App? Verwenden Sie [Chat](/docs/template-chat), wenn Sie eine einfache App wünschen, mit der Benutzer sofort sprechen können,
|
|
33
|
+
Sie möchten keine Domain-App? Verwenden Sie [Chat](/docs/template-chat), wenn Sie eine einfache App wünschen, mit der Benutzer sofort sprechen können und die mit actions, nativen Ergebnissen und Seiten wachsen kann. Verwenden Sie [Automation-First Apps](/docs/pure-agent-apps) nur, wenn der Workflow noch keine Browser-UI braucht.
|
|
34
34
|
|
|
35
35
|
Sehen Sie sich den vollständigen Katalog unter [Apps](/apps) an oder springen Sie direkt zu einem – [Dispatch](/docs/template-dispatch) ist beispielsweise ein großartiger Ausgangspunkt, wenn Sie eine App im Workspace-Stil wünschen.
|
|
36
36
|
|
|
@@ -168,7 +168,7 @@ Nicht bereit für den Gerüstbau? Sie können einem Codierungsagenten, den Sie b
|
|
|
168
168
|
|
|
169
169
|
## Darauf aufbauen
|
|
170
170
|
|
|
171
|
-
- [**Getting Started**](/docs/getting-started) – Erstellen Sie eine
|
|
171
|
+
- [**Getting Started**](/docs/getting-started) – Erstellen Sie eine chat-first App, fügen Sie eine action hinzu, rendern Sie ein strukturiertes Ergebnis und wachsen Sie zu einer Seite
|
|
172
172
|
- [**Messaging the agent**](/docs/messaging) – wie Benutzer (und Sie) mit dem Agenten kommunizieren, der mit jeder Vorlage geliefert wird
|
|
173
173
|
- [**Multi-App Workspace**](/docs/multi-app-workspace) – Bündeln Sie mehrere Vorlagen in einem Arbeitsbereich, der Authentifizierung, Marke und Agent teilt
|
|
174
174
|
- [**Dispatch**](/docs/template-dispatch) – die Vorlage für die Steuerungsebene des Arbeitsbereichs
|
|
@@ -182,7 +182,7 @@ Wenn Sie jetzt ein Gerüst erstellen, lautet der CLI-Befehl:
|
|
|
182
182
|
npx @agent-native/core@latest create my-platform
|
|
183
183
|
```
|
|
184
184
|
|
|
185
|
-
Sie erhalten eine Mehrfachauswahl-Auswahl. Wählen Sie eine App (eigenständig) oder mehrere (Arbeitsbereich – Apps teilen sich Authentifizierung, Marke, Agentenkonfiguration und Datenbank). Jede ausgewählte Vorlage wird mit jeder benötigten Datei in `apps/<name>/` eingebunden. Für eine
|
|
185
|
+
Sie erhalten eine Mehrfachauswahl-Auswahl. Wählen Sie eine App (eigenständig) oder mehrere (Arbeitsbereich – Apps teilen sich Authentifizierung, Marke, Agentenkonfiguration und Datenbank). Jede ausgewählte Vorlage wird mit jeder benötigten Datei in `apps/<name>/` eingebunden. Für eine Automation ohne Browser-UI anstelle einer Vorlage UI verwenden Sie `npx @agent-native/core@latest create my-agent --headless`.
|
|
186
186
|
|
|
187
187
|
Geben Sie `.env` (hauptsächlich `ANTHROPIC_API_KEY` und `DATABASE_URL`), `pnpm install`, `pnpm dev` ein und es funktioniert. Kein „TODO: Login implementieren“, keine Platzhalterrouten.
|
|
188
188
|
|
|
@@ -11,15 +11,15 @@ Häufig gestellte Fragen zu Agent-Native, sortiert von „Ich suche nur“ bis
|
|
|
11
11
|
|
|
12
12
|
### Was ist Agent-nativ? {#what-is-agent-native}
|
|
13
13
|
|
|
14
|
-
Agent-native ist ein Framework zum Erstellen von Apps, bei dem der KI-Agent und die ihn umgebende Produktoberfläche gleichberechtigte Partner sind.
|
|
14
|
+
Agent-native ist ein Framework zum Erstellen von Apps, bei dem der KI-Agent und die ihn umgebende Produktoberfläche gleichberechtigte Partner sind. Der übliche Weg beginnt mit Chat, fügt typisierte actions hinzu, rendert strukturierte Ergebnisse inline und wächst zu dauerhaften Seiten auf demselben SQL-Zustand. Die Invariante besteht darin, dass Agenten und Menschen denselben actions, dieselbe Datenbank und denselben Status teilen. Die vollständige Erklärung finden Sie unter [What Is Agent-Native?](/docs/what-is-agent-native).
|
|
15
15
|
|
|
16
16
|
### Für wen ist das? {#who-is-this-for}
|
|
17
17
|
|
|
18
18
|
Agent-native ist für Leute gedacht, die möchten, dass eine echte App und ein KI-Agent mit denselben Daten und actions arbeiten. Die allgemeinen Pfade sind:
|
|
19
19
|
|
|
20
20
|
- **Verwenden Sie eine gehostete App**, wenn Sie E-Mail, Kalender, Formulare, Pläne oder eine andere fertige Vorlage ohne Einrichtung wünschen – beginnen Sie bei [template gallery](/templates).
|
|
21
|
-
- **Beginnen Sie mit Chat**, wenn Sie
|
|
22
|
-
- **
|
|
21
|
+
- **Beginnen Sie mit Chat**, wenn Sie den Standardpfad von Grund auf möchten: Benutzer sprechen sofort mit dem Agenten, und Sie erweitern mit actions, nativen Ergebnissen und Bildschirmen – beginnen Sie mit [Getting Started](/docs/getting-started) oder [Chat](/docs/template-chat).
|
|
22
|
+
- **Beginnen Sie automation-first**, wenn Sie geplante Aufgaben, Queues, Skripte, integration workers oder externe Agenten-Workflows ohne Browser-UI bauen – beginnen Sie mit [Automation-First Apps](/docs/pure-agent-apps).
|
|
23
23
|
- **Forken und passen Sie eine Vorlage an**, wenn Sie Ihr eigenes SaaS-Produkt mit Authentifizierung, Datenbank, UI und Agentenaktionen bereits verkabelt haben möchten – siehe [Templates](/docs/cloneable-saas).
|
|
24
24
|
- **Erstellen Sie von Grund auf**, wenn Sie die Framework-Grundelemente für ein neues agentengesteuertes Produkt benötigen – beginnen Sie mit [Getting Started](/docs/getting-started).
|
|
25
25
|
- **Verbinden Sie einen anderen Agenten oder ein anderes Code-Tool**, wenn Sie möchten, dass Claude, ChatGPT, Codex, Cursor oder GitHub Copilot/VS-Code eine agentennative App verwenden – siehe [External Agents](/docs/external-agents) und [Skills Guide](/docs/skills-guide).
|
|
@@ -130,7 +130,7 @@ Das ist der springende Punkt. Forken Sie eine Vorlage und passen Sie sie an, ind
|
|
|
130
130
|
|
|
131
131
|
### Kann ich etwas erstellen, das die Vorlagen nicht abdecken? {#build-from-scratch}
|
|
132
132
|
|
|
133
|
-
Ja. Wenn Sie eine einfache
|
|
133
|
+
Ja. Wenn Sie eine einfache agentic app wünschen, führen Sie `npx @agent-native/core@latest create my-chat-app --template chat` aus. Sie erhalten dauerhafte Chat-Threads, actions, Authentifizierung, SQL-gestützten Laufzeitstatus, natives Inline-Rendering und Platz zum Hinzufügen eigener Bildschirme. Wenn Sie eine Automation ohne Browser bauen, führen Sie `npx @agent-native/core@latest create my-agent --headless` aus. Siehe [Getting Started](/docs/getting-started), [Automation-First Apps](/docs/pure-agent-apps) und [Chat](/docs/template-chat).
|
|
134
134
|
|
|
135
135
|
### Kann ich es ausprobieren, ohne eine Vorlage zu forken? {#try-with-a-skill}
|
|
136
136
|
|