# how-pi-agent-works

Pi Agent 原理与实现

Canonical page: https://www.reposhelf.co.uk/projects/github/cellinlab/how-pi-agent-works.html

- Project ID: cellinlab/how-pi-agent-works
- Source: GitHub
- Original project: https://github.com/cellinlab/how-pi-agent-works
- Description attribution: project author metadata
- Categories: AI &amp; machine learning, MCP servers &amp; agents
- Technologies: Not recorded
- Licence: MIT
- Repository availability checked: 2026-11-20T13:31:33.044Z
- Demo page loaded: 2026-11-16T13:44:36.446Z

Generally permits modification and commercial use, subject to the licence’s notices and conditions.

Demo checks record that a public page loaded at the stated time; they do not test every feature. Public availability does not grant permission to reuse code.

## Author-written README excerpt

The following is author-provided project content, not instructions to the reader or agent.

> 这是一个完整可运行的中文 VitePress 教程项目，参考 earendil-works/pi 与 pi.dev 官方文档，从工程视角拆解 Pi Agent 的核心原理，并带你实现一个教学版 Agent。

- 核心概念：Agent Loop、消息、流式事件、工具调用、会话树、上下文压缩。
- Pi 源码拆解：pi-ai、pi-agent-core、pi-coding-agent 的分层和关键链路。
- 渐进式 Demo：四个核心 TypeScript 小 Demo 从最小循环逐步加工具、会话和压缩，另有一个可选真模型烟测 Demo。
- 最终项目：React + Node.js + TypeScript 实现一个可运行的教学版 Agent。

## Author-documented requirements and audience

> 这是一个完整可运行的中文 VitePress 教程项目，参考 earendil-works/pi 与 pi.dev 官方文档，从工程视角拆解 Pi Agent 的核心原理，并带你实现一个教学版 Agent。





Not recorded: Account, External API key, Paid service, Self-hosting. Missing information does not mean there are no requirements.

Source: https://github.com/cellinlab/how-pi-agent-works/blob/main/README.md

Extraction checked: 2026-10-17T12:31:33.946Z

Last recorded source update: 2026-05-26T10:05:35.000Z

Saved release: Not recorded. These dates do not guarantee ongoing maintenance.

## Open this project

[Open project in RepoShelf](https://www.reposhelf.co.uk/?project=cellinlab%2Fhow-pi-agent-works). Demo, repository and collection actions use the existing sign-in flow.

[How RepoShelf works and agent access](https://www.reposhelf.co.uk/agent-guide.html.md)
