Pi

Shared TypeScript packages for Pi runtime applications.
On Pi 0.99+, video, teamwork, curated memory, Mem0, and scheduler tools expose bounded structured results for codemode scripts. Scripts can consume IDs, complete memory entries/task prompts, media paths, and available QC metadata directly; see the corresponding package READMEs for result contracts.
This repository contains the open-source runtime contracts, adapters, and orchestration helpers that are consumed by Pi Agent and related applications. The packages are intentionally small and composable: host applications provide HTTP routing, authentication, model runtime setup, deployment configuration, and product-specific UI.
Packages
Core packages provide types and persistence used by every host application. Extension packages each register Pi runtime extensions via their ./extension subpath entry point and are loaded on demand.
Every package is ESM-only and published under the @amaster.ai npm scope.
Extension Previews
Requirements
- Node.js
>=24 - pnpm
10.18.3
Use Corepack when possible:
corepack enable
corepack install -g [email protected]
Development
Install dependencies:
pnpm install
Run the full local check:
pnpm run pr-check
Common commands:
pnpm build
pnpm typecheck
pnpm test
pnpm --filter @amaster.ai/pi-storage prisma:generate
@amaster.ai/pi-storage includes a Prisma schema at packages/storage/prisma/schema.prisma. The root build and typecheck scripts generate the Prisma client before compiling project references.
Consuming Packages
Install only the packages your application needs:
pnpm add @amaster.ai/pi-shared @amaster.ai/pi-storage
Most packages expose a root entry point. Some packages also expose focused subpath entry points:
import { createRuntimeStorage } from "@amaster.ai/pi-storage";
import { JsonRuntimeStorage } from "@amaster.ai/pi-storage/json";
import { loadPiSettings } from "@amaster.ai/pi-shared/settings";
import { createLangfuseExporter } from "@amaster.ai/pi-telemetry/langfuse";
import { createOtelExporter } from "@amaster.ai/pi-telemetry/otel";
import memoryExtension from "@amaster.ai/pi-memory/extension";
Extension packages register themselves through their ./extension subpath entry point. Host applications import these and pass them to the Pi runtime during setup.
See each package README for package-specific examples and public API notes.
DeepSeek Harness
Compatibility depends on the host, DSH, Pi, and extension versions. Follow the selected host's documentation for installation and current support.
License
Apache-2.0