PKU harness

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.

PKU harness app (the harness)
Agent loop
calls tools
Design system (HostUI)
shows screens
Host services
campus login, scheduler, widgets, todos, …
Bundled plugins
TypeScript, SDK
Remote plugins
MCP over HTTPS
PKU harness Cloud
optional backend

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

Where to go next

You want toRead
Understand how the app is put togetherArchitecture, then the other Concepts pages
Ship a plugin today without changing the appQuickstart: remote plugin
Write a plugin that ships inside the appBundled plugin and the SDK reference
List a plugin in the marketplaceMarketplace
Store data on a server or share it livePKU harness Cloud and its API reference
See every repository and the roadmapEcosystem

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.

URLContent
/llms.txtIndex of every page in both languages, with one-line descriptions
/llms-full.txtEvery English page in one file
/llms-full.zh.txtEvery Chinese page in one file
/en/docs/<page>.mdOne English page, for example /en/docs/sdk/plugin.md
/docs/<page>.mdThe same page in Chinese
/en/docs/<page> with the header Accept: text/markdownSame 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.md

Status

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.

On this page