Package Installation
Install the package using your preferred package manager:Basic Import
Import the functions and classes you need:Browser Entry Point
For browser environments, use the browser-specific export that excludes server-only modules:Stream Persistence (Server-Only)
If you need stream persistence, import the server-only modules:Stream persistence requires Node.js and is not available in browser environments.
TypeScript Configuration
The package includes TypeScript definitions out of the box. Ensure yourtsconfig.json includes:
tsconfig.json
Verify Installation
Create a simple test file to verify the installation:test.ts
Dependencies
The package has the following dependencies:Core Dependencies
Core Dependencies
ai- Vercel AI SDK for streaming utilitiespluralize- Pluralization for group renderingstringcase- Case conversion utilitiesyaml- YAML parsing (for skills)
Optional Peer Dependencies
Optional Peer Dependencies
pg- PostgreSQL client (optional)mssql- SQL Server client (optional)
Next Steps
Creating Fragments
Learn how to create and compose context fragments
Using Renderers
Explore different output formats
Domain Knowledge
Add business logic and domain knowledge
API Reference
Complete API documentation