Skip to content

Take the whole agent, or just a layer

Use the streaming LLM client on its own, add the agent loop, or embed the full coding agent. PiSharp 1.6.0.1 publishes 29 libraries, the CLI tool, and the dotnet new template package (31 packages) on NuGet.

Cli
Rpc
Tui
CodingAgent
Agent
Tools
Sessions
AI
Contracts
Extensions
Abstractions
Runtime
Agent
ExtensionHost
Compatibility.Node
Each layer builds on the ones below it. Extensions plug in beside the stack. The dashed one is optional.

Core

  • Shared message, streaming and JSON contracts used by every other package, plus the JSON Schema validator for tool arguments (pi-schema; PISHARP_SCHEMA001 in 1.6.0, graduated in 1.6.0.1).

    dotnet add package PiSharp.Contracts --version 1.6.0.1
  • A port of Pi's telemetry contract: spans, links, carriers, metrics and typed schemas, with no-op, in-memory and (from 1.6.0.1) System.Diagnostics ActivitySource/Meter adapters. Requests are traced only when a host passes a span; nothing is sent anywhere unless listeners attach.

    dotnet add package PiSharp.Telemetry --version 1.6.0.1
  • Streaming LLM transports for every Pi chat API, Pi's model catalogs, provider logins, service tiers (PISHARP_TIERS001 in 1.6.0, graduated in 1.6.0.1), and the classifier and image APIs. Also includes the experimental media library (PiSharp.AI.Media).

    dotnet add package PiSharp.AI --version 1.6.0.1
  • Microsoft.Extensions.AI bridge exposing PiSharp transports as IChatClient, adapting any IChatClient into IChatTransport, and bridging embeddings via IEmbeddingGenerator.

    dotnet add package PiSharp.Extensions.AI --version 1.6.0.1
  • The agent loop: turns, tool invocation and batching, steering and follow-up queues.

    dotnet add package PiSharp.Agent --version 1.6.0.1
  • Built-in file and process tools with output truncation and safe file mutation.

    dotnet add package PiSharp.Tools --version 1.6.0.1
  • Image decoding, resizing and JPEG re-encoding for the read tool, on SkiaSharp.

    dotnet add package PiSharp.Tools.Skia --version 1.6.0.1
  • Tree-structured session storage, compaction and context building.

    dotnet add package PiSharp.Sessions --version 1.6.0.1
  • The full coding-agent profile: persistent sessions, recovery and tree navigation.

    dotnet add package PiSharp.CodingAgent --version 1.6.0.1
  • YAML frontmatter for prompt templates, on YamlDotNet.

    dotnet add package PiSharp.PromptTemplates.Yaml --version 1.6.0.1
  • Codemode: model-written JavaScript in a Jint sandbox that calls the session tools.

    dotnet add package PiSharp.Codemode --version 1.6.0.1
  • A port of Pi's durable agent harness. Sessions commit every step before showing it and resume after a crash.

    dotnet add package PiSharp.Durable --version 1.6.0.1
  • The execution environment, coding tools, tool_search, code mode and media tools for durable sessions.

    dotnet add package PiSharp.Durable.Tools --version 1.6.0.1
  • SQLite storage for durable sessions, on Microsoft.Data.Sqlite.

    dotnet add package PiSharp.Durable.Sqlite --version 1.6.0.1
  • Reactive Chord v2 host, store, registries, jobs, links and remote routes, plus the separate legacy protocol-4 runtime. PISHARP_CHORD001.

    dotnet add package PiSharp.Chord --version 1.6.0.1
  • Native plugin generations, HTTP and process workers. Requires the ASP.NET Core shared framework. PISHARP_CHORD001.

    dotnet add package PiSharp.Chord.Hosting --version 1.6.0.1
  • Durable storage and composed registries on the real Chord host, with examples 35–37. PISHARP_DURABLE001.

    dotnet add package PiSharp.Durable.Store --version 1.6.0.1
  • Bounded pi-env framing for native remote filesystem and process transports. PISHARP_ENV001.

    dotnet add package PiSharp.Env.Protocol --version 1.6.0.1
  • Reconnecting remote environments, watches, processes, Unix terminals and verified SSH bootstrap. The daemon is a separate native artifact. PISHARP_ENV001.

    dotnet add package PiSharp.Env --version 1.6.0.1
  • Typed workflows, agent teams, subagents, messaging, and typed and dynamic tools, on the durable harness.

    dotnet add package PiSharp.CustomAgents --version 1.6.0.1
  • JavaScript tools and workflow actions for custom agents, in code mode's Jint sandbox.

    dotnet add package PiSharp.CustomAgents.JavaScript --version 1.6.0.1
  • C# script tools and workflow actions for custom agents, compiled with Roslyn.

    dotnet add package PiSharp.CustomAgents.Scripting --version 1.6.0.1

Front ends

  • Pi's JSON RPC protocol over stdin/stdout, including extension UI requests.

    dotnet add package PiSharp.Rpc --version 1.6.0.1
  • Terminal UI building blocks: input, text and list components, rendering.

    dotnet add package PiSharp.Tui --version 1.6.0.1
  • The command-line app itself, installed as a .NET tool and run as pisharp.

    dotnet tool install -g PiSharp.Cli --version 1.6.0.1
  • dotnet new project templates for embedded agents (pisharp-agent), native C# CLI extensions (pisharp-extension), and durable workflows (pisharp-workflow).

    dotnet new install PiSharp.Templates@1.6.0.1

Extensions

  • The interfaces you implement to write an extension.

    dotnet add package PiSharp.Extensions.Abstractions --version 1.6.0.1
  • Discovery, loading, registration and dispatch for hosts.

    dotnet add package PiSharp.Extensions.Runtime --version 1.6.0.1
  • Connects extension hooks to the agent loop.

    dotnet add package PiSharp.Extensions.Agent --version 1.6.0.1
  • Supervised out-of-process extension workers.

    dotnet add package PiSharp.ExtensionHost --version 1.6.0.1
  • Optional bridge for running Pi's TypeScript extensions. Requires Node.

    dotnet add package PiSharp.Compatibility.Node --version 1.6.0.1

Inside the packages

  • Image, video, speech, music, transcription, embedding and rerank models in PiSharp.AI.Media (PISHARP_MEDIA001). Service tiers graduate to stable in 1.6.0.1 (ADR 0017); on 1.6.0 NuGet packages, suppress PISHARP_TIERS001.

    Read the media library guide