मुख्य सामग्री पर जाएँ
Skillpedia
एजेंट6.3k · #14378

PuerTS Agent Development Guide

यह क्या करती है

यह स्किल PuerTsAgent फ़्रेमवर्क से Unity में AI एजेंट बनाने की गाइड है। यह उन गेम और ऐप डेवलपरों के लिए है जो अपने Unity प्रोजेक्ट के अंदर LLM एजेंट चलाना चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आप PuerTS के साथ Unity प्रोजेक्ट के अंदर LLM एजेंट बनाना चाहते हैं।
  • ✓जब आपको एजेंट के लिए सिस्टम प्रॉम्प्ट, स्किल या बिल्टिन मॉड्यूल सेट करने हैं।
  • ✓जब आप एजेंट बनाने से पहले जाँचना चाहते हैं कि ज़रूरी PuerTS पैकेज इंस्टॉल हैं।

Skill का लिंक

https://github.com/Tencent/puerts/blob/master/unity/skills/puerts-agent-development/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/Tencent/puerts/blob/master/unity/skills/puerts-agent-development/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे Unity प्रोजेक्ट में एक LLM एजेंट बनाने में मदद कीजिए जो खिलाड़ियों की मदद करे, उसके अपने सिस्टम प्रॉम्प्ट और स्किल के साथ।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

स्किल जाँचती है कि ज़रूरी PuerTS पैकेज इंस्टॉल हैं, फिर पूछती है कि एजेंट की फ़ाइलें Unity के Resources फ़ोल्डर में कहाँ जाएँ। इसके बाद वह प्रॉम्प्ट, स्किल और बिल्टिन मॉड्यूल के लिए मार्गदर्शन देती है, और बिल्टिन के लिए भाषा का चुनाव भी।

तकनीकी सामग्री (मूल 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.json to verify that the following packages are installed:

  • com.tencent.puerts.core
  • com.tencent.puerts.v8
  • com.tencent.puerts.agent

If 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 which Resources/ 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 to Assets/Resources/<agent-name>/builtins/. See TypeScript Project Setup for Builtins section below.
  • JavaScript → Write .mjs files directly in Assets/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.txt and files under skills/ 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 via loadSkill. 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 Resources does not support .md and .mjs as TextAsset, so:

  • Markdown files use .md.txt suffix
  • JS module files use .mjs suffix

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

अक्सर पूछे जाने वाले सवाल

इसे कौन से पैकेज चाहिए?

Unity प्रोजेक्ट में PuerTS core, v8 और agent पैकेज चाहिए।

क्या मैं बिल्टिन TypeScript में लिख सकता हूँ?

हाँ, स्किल पूछती है कि बिल्टिन मॉड्यूल TypeScript में चाहिए या JavaScript में।

एजेंट की फ़ाइलें कहाँ जाती हैं?

वे Unity Resources डायरेक्टरी के अंदर आपके चुने फ़ोल्डर में जाती हैं।

जानकारी

लेखक का मूल विवरण

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

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills