กลับไปหน้า Tools

GetNotes Tools

PrimeIntellect-ai/prime-agent

Tool นี้คืออะไร

Prime Agent เป็นเอเจนต์ AI แบบโอเพนซอร์สสำหรับการเขียนโค้ดและงานวิจัยที่ซับซ้อนและใช้เวลานาน เหมาะสำหรับนักพัฒนาและนักวิจัยที่ต้องการเครื่องมือที่สามารถเรียนรู้ ปรับปรุงตัวเอง และทำงานต่อเนื่องได้แม้จะตัดการเชื่อมต่อเทอร์มินัล

ข้อมูลโปรเจกต์

ดาว

9.2K

Forks

889

License

MIT

อัปเดต GitHub ล่าสุด

9 ส.ค. 2569

เพิ่มใน GetNotes

17 ส.ค. 2569

Repository

PrimeIntellect-ai/prime-agent

เหมาะกับงาน

Automation

เหมาะกับอาชีพ

Ecosystem

TypeScript

แปลและเรียบเรียงโดย AI

เนื้อหาฉบับภาษาไทย

ใช้อ่านเพื่อทำความเข้าใจเบื้องต้น โปรดตรวจสอบรายละเอียดสำคัญกับเอกสารต้นฉบับด้านล่าง

Prime Intellect
CIBuild Binaries

Prime Agent เป็นเอเจนต์แบบโอเพนซอร์สสำหรับการเขียนโค้ดและงานวิจัยทั่วไปและงานที่ใช้เวลานาน ได้รับการออกแบบโดยใช้แนวคิดหลักสองประการ:

  • Recursive Language Model (RLM) ถือว่าบริบทเป็นตัวแปร (prompt-as-a-variable) และเครื่องมือต่างๆ เช่น ซับเอเจนต์แบบเรียกซ้ำ เป็นการเรียกใช้ฟังก์ชัน (programmatic tool /sub-agent calling) ภายใน REPL แบบคงอยู่
  • Continual Harness จัดเก็บพร้อมต์เสริม, หน่วยความจำ, คำอธิบายทักษะ, และข้อกำหนดซับเอเจนต์ที่นำกลับมาใช้ใหม่ได้ในฐานะสถานะที่คงทน ซึ่ง Prime Agent สามารถปรับปรุงได้ผ่านการอัปเดตเล็กๆ ที่อิงตามหลักฐาน โดยค่าเริ่มต้นจะเป็นแบบโลคัลเฉพาะเซสชัน

Prime Agent ผสมผสานสภาพแวดล้อมการควบคุม Python แบบคงอยู่เข้ากับสถานะ harness ที่คงทน เพื่อให้บริบทการทำงานที่เป็นประโยชน์และรูปแบบการทำงานที่นำกลับมาใช้ใหม่ได้สามารถคงอยู่ได้นานกว่าหน้าต่างแชทเดียว

  • ทุกอย่างเป็นแบบโปรแกรม: IPython แบบคงอยู่เป็นเครื่องมือโมเดลในตัว; การดำเนินการไฟล์, คำสั่งเชลล์, การใช้เครื่องมือ, ซับเอเจนต์, และการจัดการบริบทเกิดขึ้นผ่านโค้ด
  • มีซับเอเจนต์ในตัว: rlm(...) สร้างเอเจนต์ลูกจริงสำหรับการทำงานแบบขนานหรือเบื้องหลัง และส่งคืนผลลัพธ์แบบโปรแกรม
  • Harness สามารถปรับปรุงได้: /refine ตรวจสอบเส้นทางการทำงานปัจจุบันและสามารถใช้การอัปเดตเล็กๆ ที่อิงตามหลักฐานกับสถานะ harness เสริมได้ มันไม่เขียนทับพร้อมต์ระบบพื้นฐานที่ไม่เปลี่ยนแปลงได้ และสแนปช็อตที่บันทึกไว้รองรับการย้อนกลับ
  • ทักษะสามารถเรียกใช้งานได้: ทักษะคือแพ็กเกจ Python ที่สามารถนำเข้าได้ และเครื่องมือสร้างทักษะในตัวสามารถเปลี่ยนเวิร์กโฟลว์ที่เกิดซ้ำให้เป็นทักษะของโปรเจกต์หรือส่วนตัวได้
  • เซสชันทำงานในเบื้องหลัง: เอเจนต์ที่ทำงานโดย daemon จะยังคงทำงานต่อไปเมื่อเทอร์มินัลตัดการเชื่อมต่อ และสามารถเชื่อมต่อใหม่ได้ในภายหลัง
  • เอเจนต์สื่อสารกันโดยตรง: เอเจนต์ที่กำลังทำงานสามารถแลกเปลี่ยนข้อความและประสานงานกันได้โดยไม่ต้องส่งทุกอย่างผ่านผู้ใช้
  • งานที่ใช้เวลานานยังคงดำเนินต่อไป: การบีบอัดอัตโนมัติ, เป้าหมายที่คงอยู่, heartbeats, ตารางเวลา, โหมดอัตโนมัติ, และซับเอเจนต์ที่คงอยู่ ช่วยรักษางานที่ทำค้างไว้ในแต่ละรอบและเซสชันเทอร์มินัล

เริ่มต้นใช้งาน

ติดตั้งเวอร์ชันเสถียรล่าสุดบน macOS หรือ Linux:

bash
curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh

ตัวติดตั้งจะดาวน์โหลดเวอร์ชันที่ระบุ, ตรวจสอบ SHA-256 checksum, ติดตั้งคำสั่ง prime-agent, และสามารถเตรียมรันไทม์ IPython ที่เอเจนต์ใช้

เริ่ม Prime Agent จาก repository หรือไดเรกทอรีที่คุณต้องการให้มันทำงาน:

bash
cd /path/to/project
prime-agent

ในการเปิดใช้งานครั้งแรก ให้รัน /login เพื่อเลือกผู้ให้บริการการสมัครสมาชิกหรือ API-key Prime Agent ทำงานในไดเรกทอรีปัจจุบันและสามารถรันคำสั่งและแก้ไขไฟล์ได้ที่นั่น ใช้โคลนแบบใช้แล้วทิ้ง, worktree ที่สะอาด, หรือจุดตรวจสอบอื่นที่คุณสามารถตรวจสอบและกู้คืนได้

คำเตือน

Prime Agent รันคำสั่ง Python และคำสั่งโปรเจกต์ที่สร้างโดยโมเดลด้วยสิทธิ์ผู้ใช้ของคุณ กระบวนการ worker และ kernel ของมันช่วยปรับปรุงการแยกวงจรชีวิตและการกู้คืน; พวกมัน ไม่ใช่ แซนด์บ็อกซ์ด้านความปลอดภัย ตรวจสอบการเปลี่ยนแปลงและใช้เฉพาะ repository, คำแนะนำ, ทักษะ, และส่วนขยายที่เชื่อถือได้เท่านั้น รันโค้ดหรือคำแนะนำที่ไม่น่าเชื่อถือในแซนด์บ็อกซ์ภายนอกหรือสภาพแวดล้อมที่จำกัด

คำสั่งที่มีประโยชน์:

bash
prime-agent agents                   # เรียกดูเซสชันที่กำลังทำงาน, ว่าง, และที่บันทึกไว้
prime-agent attach <agent>           # เชื่อมต่อใหม่กับเซสชันที่กำลังทำงาน
prime-agent --resume [path|id]       # เรียกดูเซสชันหรือกลับมาทำงานต่อโดยตรง
prime-agent status                   # ตรวจสอบสถานะบริการเบื้องหลัง
prime-agent doctor [--fix]           # ตรวจสอบหรือซ่อมแซมบริการเบื้องหลัง
prime-agent update [--force]         # อัปเดต Prime Agent
prime-agent shutdown [--force]       # หยุดเอเจนต์, worker, และบริการเบื้องหลังทั้งหมด

สร้างขึ้นสำหรับงานที่ใช้เวลานาน

Prime Agent ถูกสร้างขึ้นมาสำหรับงานที่ใช้เวลานาน โดยเฉพาะอย่างยิ่งสำหรับการประเมินผลในการวิจัย คุณสมบัติเหล่านี้มีให้ใช้งานใน TUI และเมื่อรันในโหมดอัตโนมัติ

  • Continual Harness: /refine สามารถบันทึกบทเรียนที่เน้นและตรวจสอบได้เป็นพร้อมต์เสริม, หน่วยความจำ, คำอธิบายทักษะที่นำกลับมาใช้ใหม่ได้, หรือข้อกำหนดซับเอเจนต์ พร้อมประวัติการปรับปรุงที่บันทึกไว้ มันไม่ได้มาแทนที่การแพ็กเกจและตรวจสอบทักษะที่เรียกใช้งานได้ใหม่
  • การสื่อสารโดยตรงระหว่างเอเจนต์: เอเจนต์ที่กำลังทำงานและซับเอเจนต์ที่คงอยู่สามารถค้นพบกัน, แลกเปลี่ยนข้อความ, และนำทางงานที่กำลังดำเนินอยู่ได้
  • ความต่อเนื่องที่รองรับโดย Daemon: เซสชันที่ใช้งานอยู่, สถานะ IPython, ตารางเวลา, และซับเอเจนต์ยังคงทำงานต่อไปเมื่อเทอร์มินัลตัดการเชื่อมต่อและสามารถเชื่อมต่อใหม่ได้ในภายหลัง
  • Heartbeats และตารางเวลา: /heartbeat, rlm_heartbeat, และ prime-agent schedule สามารถกลับเข้าสู่เซสชันได้เป็นระยะหรือตามเวลาที่กำหนด
  • เป้าหมายที่คงอยู่: /goal ทำให้วัตถุประสงค์และความคืบหน้ายังคงใช้งานได้ในแต่ละรอบจนกว่าจะเสร็จสิ้น, หยุดชั่วคราว, หรือถูกล้าง
  • โหมดอัตโนมัติแบบจำกัด: /autonomous ทำงานต่อไปภายในงบประมาณรอบ, โทเค็น, และเวลาที่กำหนดค่าไว้ และสามารถรัน quality gates ที่ผู้ใช้กำหนดได้ เกตที่ผ่านจะตรวจสอบเฉพาะสิ่งที่เกตนั้นยืนยันเท่านั้น; การถึงขีดจำกัดไม่ได้หมายความว่างานสำเร็จ

เอกสารประกอบ

การมีส่วนร่วม

เริ่มต้นด้วย GitHub Discussion สำหรับ คำถามทั่วไป, รายงานข้อผิดพลาด, และ คำขอคุณสมบัติ ผู้ดูแลจะย้ายงานที่ได้รับการยอมรับไปยัง Issues และ pull request จะได้รับการตรวจสอบจากผู้ดูแลและผู้มีส่วนร่วมที่ได้รับการรับรอง

อ่าน แนวทางการมีส่วนร่วม สำหรับกระบวนการทั้งหมด รายงานช่องโหว่ด้านความปลอดภัยแบบส่วนตัวโดยปฏิบัติตาม นโยบายความปลอดภัย

คำขอบคุณ

เอเจนต์และ TUI ของเราสร้างขึ้นบน pi เราขอขอบคุณผู้เขียน pi สำหรับผลงานอันมีค่าของพวกเขา

สัญญาอนุญาต

Prime Agent เป็นโอเพนซอร์สเต็มรูปแบบและเผยแพร่ภายใต้ MIT License

เอกสารโปรเจกต์

อ่านเอกสารต้นฉบับ

README วิธีติดตั้ง วิธีใช้งาน และข้อกำหนดจาก repository ต้นฉบับ

ดูไฟล์บน GitHub
Prime Intellect
CIBuild Binaries
PrimeIntellect-ai%2Fprime-agent | Trendshift

Prime Agent is an open-source coding and research agent for general and long-running work. It is designed around two core abstractions:

  • The Recursive Language Model (RLM) treats context as variables (prompt-as-a-variable) and tools like recursive subagents as function calls (programmatic tool /sub-agent calling) inside a persistent REPL.
  • The Continual Harness stores supplemental prompts, memories, skill descriptions, and reusable subagent specifications as durable state that Prime Agent can refine through small, evidence-backed updates, local to the session by default.

Prime Agent combines a persistent Python control environment with durable harness state, so useful working context and reusable operating patterns can outlive a single chat window.

  • Everything is programmatic: persistent IPython is the built-in model tool; file operations, shell commands, tool use, subagents, and context management happen through code.
  • Subagents are built in: rlm(...) spawns real child agents for parallel or background work and returns their results programmatically.
  • The harness can improve: /refine reviews the current trajectory and can apply small, evidence-backed updates to supplemental harness state. It never rewrites the immutable base system prompt, and recorded snapshots support rollback.
  • Skills are executable: skills are importable Python packages, and the built-in skill creator can turn recurring workflows into project or personal skills.
  • Sessions run in the background: daemon-backed agents keep running when the terminal disconnects and can be reattached later.
  • Agents communicate directly: running agents can exchange messages and orchestrate one another without routing everything through the user.
  • Long tasks keep moving: automatic compaction, persistent goals, heartbeats, schedules, autonomous mode, and retained subagents preserve progress across turns and terminal sessions.

Getting Started

Install the latest stable release on macOS or Linux:

bash
curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh

The installer downloads a versioned release, verifies its SHA-256 checksum, installs the prime-agent command, and can prepare the IPython runtime used by the agent.

Start Prime Agent from the repository or directory you want it to work in:

bash
cd /path/to/project
prime-agent

On first launch, run /login to choose a subscription or API-key provider. Prime Agent works in the current directory and can run commands and modify files there. Use a disposable clone, clean worktree, or another checkpoint you can inspect and restore.

คำเตือน

Prime Agent executes model-generated Python and project commands with your user permissions. Its worker and kernel processes improve lifecycle isolation and recovery; they are not a security sandbox. Review changes and use trusted repositories, instructions, skills, and extensions only. Run untrusted code or instructions in an external sandbox or restricted environment.

Useful commands:

bash
prime-agent agents                   # Browse running, idle, and saved sessions
prime-agent attach <agent>           # Reattach to a running session
prime-agent --resume [path|id]       # Browse sessions or resume one directly
prime-agent status                   # Inspect background service state
prime-agent doctor [--fix]           # Inspect or repair background services
prime-agent update [--force]         # Update Prime Agent
prime-agent shutdown [--force]       # Stop every agent, worker, and background service

Built for Long-Running Work

Prime Agent is built for long-running work, especially for evaluations in research. These features are available in the TUI, and when run autonomously.

  • Continual Harness: /refine can persist focused, reviewable lessons as supplemental prompts, memories, reusable skill descriptions, or subagent specifications, with recorded refinement history. It does not replace packaging and reviewing new executable skills.
  • Direct agent-to-agent communication: running agents and retained subagents can discover one another, exchange messages, and steer active work.
  • Daemon-backed continuity: active sessions, IPython state, schedules, and subagents keep running when the terminal detaches and can be reattached later.
  • Heartbeats and schedules: /heartbeat, rlm_heartbeat, and prime-agent schedule can re-enter a session periodically or at a specific time.
  • Persistent goals: /goal keeps an objective and its progress active across turns until it is completed, paused, or cleared.
  • Bounded autonomous mode: /autonomous continues within configured turn, token, and time budgets and can run user-defined quality gates. A passed gate checks only what that gate verifies; reaching a limit does not imply task success.

Documentation

Contributing

Start with a GitHub Discussion for general questions, bug reports, and feature requests. Maintainers promote accepted work into Issues, and pull requests are reviewed from maintainers and vouched contributors.

Read the contribution guidelines for the full process. Report security vulnerabilities privately by following the security policy.

Acknowledgements

Our agent and TUI is built on top of pi. We thank the authors of pi for their valuable work.

License

Prime Agent is fully open source and released under the MIT License.