PuerTS Agent Development Guide
ما الذي تفعله
هذه المهارة دليل لبناء وكلاء ذكاء اصطناعي باستخدام إطار PuerTsAgent في Unity. وهي لمطوري الألعاب والتطبيقات الذين يريدون وكيل نموذج لغوي يعمل داخل مشروع Unity.
متى تستخدمها
- ✓عندما تريد إنشاء وكيل نموذج لغوي داخل مشروع Unity باستخدام PuerTS.
- ✓عندما تحتاج إلى إعداد أمر النظام أو المهارات أو الوحدات المدمجة لوكيل.
- ✓عندما تريد التحقق من تثبيت حزم PuerTS المطلوبة قبل بناء الوكيل.
رابط المهارة
https://github.com/Tencent/puerts/blob/master/unity/skills/puerts-agent-development/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“ساعدني في إنشاء وكيل نموذج لغوي في مشروع Unity الخاص بي يساعد اللاعبين، مع أمر النظام والمهارات الخاصة به.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تتحقق المهارة من تثبيت حزم PuerTS المطلوبة، ثم تسألك أين يجب أن توضع ملفات الوكيل في مجلد Resources في Unity. بعد ذلك ترشدك إلى الأمر والمهارات والوحدات المدمجة، واختيار لغة الوحدات المدمجة.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
PuerTS Agent Development Guide
This skill provides the complete guide for developing LLM agents based on the PuerTsAgent framework.
⚠️ Important — Required Packages: This framework depends on PuerTS core, v8, and agent packages. Before proceeding, you must check the Unity project's
Packages/manifest.jsonto verify that the following packages are installed:
com.tencent.puerts.corecom.tencent.puerts.v8com.tencent.puerts.agentIf any of these packages are missing, they must be installed first before using this skill. you MUST first invoke the "Install PuerTS for Unity" skill to AUTO complete the setup.
⚠️ Prerequisite: Before using this skill to create or modify an agent, you must know the agent's resource directory path under Unity
Resources/(e.g.,maze-runner,editor-assistant). If the user has not provided this path, ask the user whichResources/subdirectory to use before proceeding. All agent files (system-prompt, skills, builtins) are organized under this path.
⚠️ Builtin Language Choice: When creating builtin modules, you must ask the user whether they want to write builtins in TypeScript or JavaScript:
- TypeScript → Create a dedicated TS project (with
package.json,tsconfig.json,esbuild.mjs) whose build output (outdir) points toAssets/Resources/<agent-name>/builtins/. See TypeScript Project Setup for Builtins section below.- JavaScript → Write
.mjsfiles directly inAssets/Resources/<agent-name>/builtins/.
Overview
In this framework, an agent's behavior and capabilities are entirely defined by files in a resource directory (Resource Root). Different resource directories represent different agents — Unity editor assistants, in-game AI characters, or any role you need.
Key Concept: Both
system-prompt.md.txtand files underskills/are essentially prompts (natural language instructions for the LLM). The only difference is their loading strategy:
system-prompt.md.txt— Always present in context (persistent). Put prompts here that are needed for most tasks.skills/*.md.txt— Loaded on demand by the LLM vialoadSkill. Put prompts here that are not needed for every task — they are loaded only when the LLM determines they are relevant.
Creating an Agent
Initialize an agent in C# via its resource path:
var agent = new AgentScriptManager();
agent.Initialize("maze-runner", () =>
{
Debug.Log("Maze runner agent is ready!");
});
The first parameter of Initialize is the resource directory path under Unity Resources/. The framework loads the full agent definition from this directory:
system-prompt.md.txt— Role definition (System Prompt)skills/— Domain skill documents (loaded on demand, optional)builtins/— Built-in helper modules (executable JS modules)
Example Directory Structure
Resources/maze-runner/
├── system-prompt.md.txt # Role definition (System Prompt)
├── skills/ # Domain skills (loaded on demand, optional)
└── builtins/ # Built-in modules (loaded on demand)
├── maze-control.mjs # Maze movement and status query
└── screenshot.mjs # Screenshot to observe the maze
All resource files are placed in Unity's Resources/ directory.
File extension convention: Unity
Resourcesdoes not support.mdand.mjsas TextAsset, so:
- Markdown files use
.md.txtsuffix- JS module files use
.mjssuffix
1. System Prompt — Role Definition
Purpose
system-prompt.md.txt defines the agent's identity, personality, capabilities, and behavioral rules. It is injected at the beginning of the LLM's system prompt and is the core of the agent's "persona."
This is a persistent prompt — it is always present in the LLM's context for every conversation turn. Therefore, put only the most frequently used instructions here — things the agent needs for the majority of its tasks. Avoid stuffing rarely-used domain knowledge here, as it permanently consumes context tokens.
File Location
<resource-root>/system-prompt.md.txt
Format
Plain text / Markdown format, write role definition directly, no front-matter needed.
Example — Editor A
الأسئلة الشائعة
ما الحزم المطلوبة؟
تحتاج إلى حزم PuerTS الأساسية وv8 والوكيل في مشروع Unity.
هل أستطيع كتابة الوحدات المدمجة بـ TypeScript؟
نعم، تسألك المهارة هل تريد TypeScript أو JavaScript للوحدات المدمجة.
أين توضع ملفات الوكيل؟
توضع في مجلد داخل مجلد Resources في Unity تختاره أنت.
التفاصيل
الوصف الأصلي من المؤلف
Guide for developing LLM agents based on PuerTsAgent framework — covers resource directory structure, system-prompt, skills, builtin modules, and best practices.
repo: Tencent/puerts
الشعبية
- نجوم GitHub
- 6.3k
- الترتيب
- #14378
- الترخيص
- —
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
مهارات مشابهة
add-model-provider
394kتتيح لوكيلك ربط مزوّد نموذج ذكاء اصطناعي جديد بـ OpenClaw باستخدام أوامر إعداد آمنة، وإبقاء مفاتيح API خارج النص العادي، وإجراء اختبار حي.
acp-router
394kيساعد وكيلك على إرسال مهمة إلى مساعد برمجة مثل Claude Code أو Cursor عبر OpenClaw، فيعمل العمل داخل تلك الأداة.
browser-automation
394kتعلّم وكيلك التحكم في صفحات الويب خطوة بخطوة، بما في ذلك تسجيل الدخول والتبويبات والتعافي عندما تتوقف الصفحة عن الاستجابة.