{"slug": "agent-engineering-pi-sdk", "title": "Agent engineering: Pi SDK", "summary": "Pi released a programmatic SDK that allows developers to embed its coding agent directly into their own scripts, eliminating the need for separate extension and system prompt files. The SDK follows the same approach as the Agent SDK, enabling a more streamlined integration similar to the Claude Code version.", "body_md": "In the [previous post](https://roman.pt/posts/pi-dev-version/), I built a news reader using Pi’s CLI with an extension file and a system prompt file. Two files in a `.pi/`\n\ndirectory, run with `pi -p`\n\n. It already felt minimal compared to the Claude Code version, but it still relied on Pi’s runtime to discover and load the extension.\n\nPi also has a [programmatic SDK](https://github.com/earendil-works/pi/tree/main/packages/coding-agent/examples/sdk) that lets you embed the agent in your own script, the same way the [Agent SDK](https://roman.pt/posts/agent-sdk-rewrite/) let me collapse the Claude Code version into a single Python file.", "url": "https://wpnews.pro/news/agent-engineering-pi-sdk", "canonical_source": "https://roman.pt/posts/pi-sdk-version/", "published_at": "2026-06-07 10:00:00+00:00", "updated_at": "2026-06-15 20:41:44.370200+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents"], "entities": ["Pi", "Claude Code", "Agent SDK"], "alternates": {"html": "https://wpnews.pro/news/agent-engineering-pi-sdk", "markdown": "https://wpnews.pro/news/agent-engineering-pi-sdk.md", "text": "https://wpnews.pro/news/agent-engineering-pi-sdk.txt", "jsonld": "https://wpnews.pro/news/agent-engineering-pi-sdk.jsonld"}}