Introduction
PKU harness is an open-source app for campus life at Peking University, built around an AI assistant. These docs are for the people and AI agents who build plugins for it.
PKU harness is an Android app that helps Peking University students with campus services. You sign in once with your campus account, and the app gives you your timetable, campus card, network fee, Treehole (树洞), Blackboard (教学网), finance, room booking and other campus systems. Sign-in goes through IAAA, the university's central login system. Plugins can add more services.
At the centre of the app is an AI assistant, which we also call the agent. You describe what you need in a conversation, and the agent works the campus systems for you. Every feature the agent can use also has a button in the app's native screens, so you can do the same thing yourself.
How the app and its plugins fit together
The app itself provides only the basic machinery. It has an agent loop, which is the program that lets the AI think, call tools and answer. It also has a design system for screens and a set of host services, such as campus sign-in, scheduled tasks, widgets and to-dos. We call this layer the harness.
Everything else comes from plugins. Each campus service is a plugin, and so are the dashboard, reminders and even the AI model provider. A plugin that ships inside the app and a plugin that a student runs on their own server use the same interface. Both appear in the same plugin list and use the same permission system.
This design leads to two rules that the rest of these docs come back to often.
- You and the agent can do exactly the same things. Each feature is one typed tool. When you tap a button, the screen calls the tool. When you ask in a conversation, the agent calls the same tool.
- Credentials never leave the phone. The harness signs in to campus services itself. Plugins receive only the responses, and never see your password or session tokens.
Who these docs are for
Student developers
Connect a campus service that the app doesn't cover yet. You can write a plugin document, run a remote MCP server in any language, or write a bundled TypeScript plugin.
AI agents
Claude Code, Codex or the in-app agent writing a plugin. Start with the checklist, then read the pages it links to.
Users
The user manual: installing the app, first-run setup, and how to use each tab and setting.
Server operators
Run a PKU harness Cloud provider. It is an optional backend that gives plugins end-to-end encrypted storage and sync.
Where to go next
| You want to | Read |
|---|---|
| Understand how the app is put together | Architecture, then the other Concepts pages |
| Ship a plugin today without changing the app | Quickstart: remote plugin |
| Write a plugin that ships inside the app | Bundled plugin and the SDK reference |
| List a plugin in the marketplace | Marketplace |
| Store data on a server or share it live | PKU harness Cloud and its API reference |
| See every repository and the roadmap | Ecosystem |
Giving these docs to an AI agent
Every page is also available as Markdown. This lets you give an AI agent only the pages it needs
instead of the whole site. The docs are written in Simplified Chinese and English. Chinese is the
default and lives under /docs. English lives under /en/docs.
| URL | Content |
|---|---|
/llms.txt | Index of every page in both languages, with one-line descriptions |
/llms-full.txt | Every English page in one file |
/llms-full.zh.txt | Every Chinese page in one file |
/en/docs/<page>.md | One English page, for example /en/docs/sdk/plugin.md |
/docs/<page>.md | The same page in Chinese |
/en/docs/<page> with the header Accept: text/markdown | Same as .md |
The last row uses HTTP content negotiation: the server reads the request header and returns Markdown instead of HTML.
Under each page title there are two buttons, Copy Markdown and Open in…. In the Markdown version, the Cloud API reference pages list their operations and schemas as plain text.
# Give Claude Code the plugin checklist and the SDK contract
curl -s https://<this-site>/en/docs/for-agents.md https://<this-site>/en/docs/sdk/plugin.md > plugin-context.mdStatus
PKU harness 1.0.0 is out for Android. The iOS version is being prepared.
Fixes to the JavaScript code reach installed apps as signed over-the-air (OTA) updates. Changes to native code need a new APK.
The SDK and wire protocol described here match the default branches of
pkuinfo/pku-harness and
pkuinfo/pku-harness-plugins. You get plugins
and the SDK from those GitHub repositories, not from npm. Most campus services are provided as
plugin documents (PLUGIN.md) that you install by link.