Take the whole agent, or just a layer
PiSharp is built as separate libraries, each published to NuGet. Use the streaming LLM client on its own, add the agent loop, or embed the full coding agent in your app.
Core
PiSharp.Contracts
Shared message, streaming and JSON contracts used by every other package.
dotnet add package PiSharp.ContractsPiSharp.AI
Streaming LLM transports for Anthropic, OpenAI, Azure, Google and Mistral, plus the model catalog.
dotnet add package PiSharp.AIPiSharp.Agent
The agent loop: turns, tool invocation and batching, steering and follow-up queues.
dotnet add package PiSharp.AgentPiSharp.Tools
Built-in file and process tools with output truncation and safe file mutation.
dotnet add package PiSharp.ToolsPiSharp.Sessions
Tree-structured session storage, compaction and context building.
dotnet add package PiSharp.SessionsPiSharp.CodingAgent
The full coding-agent profile: persistent sessions, recovery and tree navigation.
dotnet add package PiSharp.CodingAgentFrontends
PiSharp.Rpc
Pi's JSON RPC protocol over stdin/stdout, including extension UI requests.
dotnet add package PiSharp.RpcPiSharp.Tui
Terminal UI building blocks: input, text and list components, rendering.
dotnet add package PiSharp.TuiPiSharp.Cli
The command-line app itself, installed as a .NET tool and run as pisharp.
dotnet tool install -g PiSharp.CliExtensions
PiSharp.Extensions.Abstractions
The interfaces you implement to write an extension.
dotnet add package PiSharp.Extensions.AbstractionsPiSharp.Extensions.Runtime
Discovery, loading, registration and dispatch for hosts.
dotnet add package PiSharp.Extensions.RuntimePiSharp.Extensions.Agent
Connects extension hooks to the agent loop.
dotnet add package PiSharp.Extensions.AgentPiSharp.ExtensionHost
Supervised out-of-process extension workers.
dotnet add package PiSharp.ExtensionHostPiSharp.Compatibility.Node
Optional bridge for running Pi's TypeScript extensions. Requires Node.
dotnet add package PiSharp.Compatibility.Node