Skip to content
pubscout

dartantic_ai

3.4.2, released 5 months ago by sellsbrothers.com

Agent framework for building client and server-side apps in Dart with generative AI.

WASM-ready
$ flutter pub add dartantic_ai
Source repository

What it does

Dartantic provides an agent framework that simplifies building client and server applications using generative AI. It supports multi-step tool calling, streaming output, typed outputs, multimedia input, media generation, embeddings, and model reasoning across multiple AI providers.

AI-written summary of version 3.4.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to build AI agents with multi-step tool calling in Dart or Flutter.
  • You need to switch between multiple LLM providers like OpenAI, Anthropic, Google, and Ollama.
  • You need MCP (Model Context Protocol) server integration in your Dart project.

Skip it when

  • You only need basic text-to-speech or simple device-side ML tasks handled by ML Kit.
  • You are not using generative AI models in your application.

Strengths

  • Supports multiple AI providers out of the box including OpenAI, Google, Anthropic, Mistral, Ollama, and more.
  • Built-in agentic behavior with autonomous multi-step tool calling.
  • Supports streaming output, typed outputs, and Model Context Protocol (MCP) servers.

Weaknesses

  • Depends on a large number of underlying provider SDKs.
  • Requires active API keys and internet connectivity for remote model calls.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
16

Requires adding the package and configuring API keys for your chosen AI providers.

import 'package:dartantic_ai/dartantic_ai.dart';

void main() async {
  final agent = Agent.forProvider(OpenAIProvider(apiKey: apiKey));
  final result = await agent.send(
    'Explain quantum computing in simple terms',
    history: [ChatMessage.system('You are a helpful assistant.')],
  );
  print(result.output);
}

Alternatives

Packages that do the same job and could replace dartantic_ai.

  • firebase_ai

    Choose this if you specifically want to integrate Gemini models through Firebase services.

Works with

Packages commonly used together with dartantic_ai: ones it builds on, ones built on it, and its own family.