Repository navigation
docs(agents): document pi() as the Pi Durable agent - #336
Merged
Merged
Conversation
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.
The Agents docs describe the one
pi()agent, which runs Pi Durable.pi-durable.mdxis merged intopi.mdx. The sidebar has one "Pi Durable" entry that opens/agents/docs/pi, and every page calls the agentpi().AGENTS.mdfiles are not supported yet, and the pages give a workaround: prompt sections andinstructions. Human in the Loop builds its approval flow from an approval actor, because Pi has none built in.Typefor tool parameters, message types forconversation.context, and thinking levels.examples/docsuses the new API, with Pi packages at^1.0.4. Examples that followed Cloudflare's or Pi Durable's own docs are replaced with original ones: a Pokédex tool for pi-ai, a preview deploy task, and a Portal 2 test chambers document. Other new examples:pi/messages.ts,pi/cost.ts,sandboxes/no-sandbox.ts,built-in-tools/reviewer.ts.c.pi.usagecost action first, then a document example in three files. The document actions get the conversation fromc.pi.root(), because the root conversation doesn't exist until something asks for it.message_end, with notext_deltabefore it. The streaming examples print it there, and the Pi, Client SDK, and Session Lifecycle pages say so.This is part 2 of 2 in a stack: