@applica-software-guru/persona-chat-sdk
v0.1.108
Published
Official Chat SDK for the Persona API — React runtime provider with REST, WebSocket and WebRTC protocols via assistant-ui.
Downloads
522
Keywords
Readme
Persona Chat SDK
Official Chat SDK for the Persona API. It provides a simple and efficient way to integrate the Persona API into your applications using assistant-ui.
Quick Start
npm install @applica-software-guru/persona-chat-sdkimport { PersonaRuntimeProvider, PersonaConsoleLogger } from '@applica-software-guru/persona-chat-sdk';
const logger = new PersonaConsoleLogger();
function Chat() {
return (
<PersonaRuntimeProvider
logger={logger}
protocols={{ rest: true, websocket: true }}
session="your-session-id"
apiKey="your-api-key"
agentId="your-agent-id"
>
<Thread />
</PersonaRuntimeProvider>
);
}Features
- Multiple Protocols — REST, WebSocket, WebRTC with automatic fallback
- Real-time Audio — WebRTC peer-to-peer audio with minimal latency
- Tool Execution — Define custom tools with
createTool()for function calling - Thread Management — Built-in multi-thread support with persistence
- Message Filtering — Filter and transform messages before display
- Custom Storage — Pluggable message storage (memory, localStorage, or custom)
- React Integration — First-class support via assistant-ui components
Documentation
| Section | Description | |---|---| | Installation | Setup and dependencies | | Usage | Integration guide with Next.js | | Messages & Storage | Message access, filtering and persistence | | Protocols | REST, WebSocket, WebRTC overview | | API Reference | Props and configuration | | Transactions & Tools | Custom tool definitions | | Customization | Custom protocols and loggers | | Contributing | How to contribute |
Support
For questions or support, contact us at [email protected].
License
MIT
