Skip to main content
The ChatHistoryProvider interface connects any LLM to AgentChatView:
Built-in providers:
  • DartanticProvider: Wraps dartantic_ai for multi-provider support
  • EchoProvider: Minimal example, useful for testing

Implementation Guide

To build your own provider:
  1. Configuration: Allow model creation as a parameter
  2. History: Manage history, notify listeners, support serialization
  3. Messages: Map ChatMessage and Part types to your LLM format
  4. LLM calls: Implement sendMessageStream and transcribeAudio
Example structure:
See the EchoProvider implementation for a complete example.