@mariozechner/pi-web-ui package provides reusable web components for building AI chat interfaces powered by the Pi agent runtime.
Key Features
Chat UI
Complete interface with streaming and tool execution
Attachments
PDF, DOCX, XLSX, images with text extraction
Artifacts
Interactive HTML, SVG, Markdown with sandboxed execution
Storage
IndexedDB-backed sessions and settings
Installation
Quick Start
Architecture
Core Components
ChatPanel
High-level chat interface:AgentInterface
Lower-level chat interface for custom layouts:Built-in Tools
JavaScript REPL
Execute JavaScript in sandboxed environment:Extract Document
Extract text from documents at URLs:Artifacts
Built into ArtifactsPanel:Storage
AppStorage
Centralized storage management:Message Types
UserMessageWithAttachments
User message with files:ArtifactMessage
For artifact persistence:Styling
Import pre-built CSS:Next Steps
Components
Explore web UI components
API Reference
Complete API documentation
Example App
View complete example application