flutter_local_agent_kit library

The ultimate offline-first AI orchestration framework for Flutter.

This library provides a high-level API to build production-grade AI applications that run entirely on-device. It integrates multimodal LLMs, vector-based RAG, and the Model Context Protocol (MCP).

Classes

AgentChatMessage
Represents a single message in an AI conversation.
AgentChatView
A high-performance, markdown-capable chat interface for AI agents.
BaseTool
Base class for all tools the agent can use.
CalculatorTool
A built-in tool for evaluating mathematical expressions.
ChatMlTemplate
The standard ChatML template used by Qwen, OpenHermes, and others.
CodeBlockBuilder
Custom builder for code blocks to add a copy button.
DateTimeTool
A built-in tool for retrieving the current device time.
DefaultKitRuntimeAdapter
Default adapter backed by the production native engines.
FlutterLocalAgentKit
The Flutter Local Agent Kit is the central entry point for on-device AI.
GemmaTemplate
The prompt template tuned for Google Gemma models.
KitRuntimeAdapter
Runtime abstraction for native engine setup and teardown.
Llama3Template
The prompt template specifically tuned for Llama 3 models.
LlmRuntimeSession
Runtime-owned LLM resources.
McpService
Manages connections to Model Context Protocol (MCP) servers.
McpTool
A BaseTool implementation that wraps a remote MCP tool.
MistralTemplate
The prompt template tuned for Mistral and Mixtral models.
ModelDefinition
Configuration for a downloadable LLM model.
ModelManager
A robust utility for managing local GGUF model files.
PromptTemplate
Abstract base class for all prompt templates.
RagRuntimeSession
Runtime-owned RAG resources.
RetrievalResult
A chunk of retrieved context with source metadata.
SimplePromptTemplate
A simple template for general-purpose models (mostly legacy).
SourceMetadata
Metadata about a source document used in RAG.
VoiceService
Service providing local-first Text-to-Speech (TTS) and Speech-to-Text (STT).

Enums

KitStatus
Status of the FlutterLocalAgentKit as it initializes and operates.
MessageRole
Possible roles in a conversation.