feat(examples): add pi-agent-harness#662
Merged
Merged
Conversation
A Next.js app that chats with the pi coding agent and renders its answers as generative UI with OpenUI. The /api/chat route bridges the pi SDK (@earendil-works/pi-coding-agent) to the frontend over an OpenAI-compatible NDJSON stream; each chat thread maps to a persistent pi AgentSession, and the agent's reasoning and tool runs are forwarded as cards. Adds a harnesses/ parent folder for harness examples.
New OpenUI Lang example page under a Harnesses group, with a demo video.
zahlekhan
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new example: a web frontend that chats with the pi coding agent and renders its answers as generative UI with OpenUI. It also introduces a
harnesses/parent folder underexamples/for coding-agent harness integrations, with a matching "Harnesses" group in the docs.What is included
examples/harnesses/pi-agent-harness/: a single Next.js app. The/api/chatroute bridges the pi SDK (@earendil-works/pi-coding-agent) to the OpenUI frontend over an OpenAI-compatible NDJSON stream. Each chat thread maps to a persistent piAgentSession, and the agent's reasoning and tool executions are surfaced as cards in the "behind the scenes" panel.Notes
next dev --webpack.PI_WEB_TOOLS=read-only, auth, loopback binding, sandboxing).pnpm dev -- /path).Testing
Developed and verified as a standalone app against the npm-published pi SDK: token streaming, multi-turn context, and the tool and thinking cards all work, and the docs page renders locally with the new Harnesses nav. It has not been run through a full
pnpm installand build inside this monorepo yet.