Langsung ke konten
Skillpedia
Agen6.3k Β· #14378

PuerTS Agent Development Guide

Fungsinya

Skill ini adalah panduan untuk membangun agent AI dengan kerangka kerja PuerTsAgent di Unity. Skill ini ditujukan untuk pengembang game dan aplikasi yang menginginkan agent LLM berjalan di dalam proyek Unity mereka.

Kapan dipakai

  • βœ“Saat Anda ingin membuat agent LLM di dalam proyek Unity dengan PuerTS.
  • βœ“Ketika Anda perlu menyiapkan prompt sistem, skill, atau modul bawaan untuk sebuah agent.
  • βœ“Saat Anda ingin memastikan paket PuerTS yang dibutuhkan sudah terpasang sebelum membangun agent.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/Tencent/puerts/blob/master/unity/skills/puerts-agent-development/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBantu saya membuat agent LLM di proyek Unity saya yang membantu pemain, lengkap dengan prompt sistem dan skill-nya sendiri.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill ini memeriksa bahwa paket PuerTS yang dibutuhkan sudah terpasang, lalu menanyakan di mana berkas agent harus diletakkan di folder Resources Unity. Setelah itu ia memandu prompt, skill, dan modul bawaan, serta pilihan bahasa untuk modul bawaan.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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

Pertanyaan umum

Paket apa yang dibutuhkannya?

Ia memerlukan paket inti PuerTS, v8, dan agent di dalam proyek Unity.

Bisakah saya menulis modul bawaan dalam TypeScript?

Bisa, skill ini menanyakan apakah Anda ingin TypeScript atau JavaScript untuk modul bawaan.

Di mana berkas agent diletakkan?

Berkas diletakkan dalam folder di bawah direktori Resources Unity yang Anda pilih.

Detail

Deskripsi asli dari pembuat

Guide for developing LLM agents based on PuerTsAgent framework β€” covers resource directory structure, system-prompt, skills, builtin modules, and best practices.

repo: Tencent/puerts

Popularitas

Bintang GitHub
6.3k
Peringkat
#14378
Lisensi
β€”
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa