Skip to main content

ai_agent 1.0.0 copy "ai_agent: ^1.0.0" to clipboard
ai_agent: ^1.0.0 copied to clipboard

A modular AI agent framework for Dart/Flutter with LLM integration, skill-based execution, MCP protocol support, and built-in tools.

ai_agent #

A modular AI agent framework for Dart/Flutter with LLM integration, skill-based execution, MCP protocol support, and built-in tools.

Features #

  • LLM Integration — OpenAI-compatible chat completion API with configurable models
  • Skill System — Modular skill definition, routing, composition, and execution
  • MCP Protocol — Built-in MCP (Model Context Protocol) client with SSE and stdio transport
  • Tool System — Extensible tool framework with decorators (retry, timeout, rate limit)
  • Built-in Tools — CLI runner, file reader/writer, HTTP request, file search, environment info
  • Agent Framework — Agent builder, executor, pool, and chain support
  • Memory & Hooks — Pluggable memory backends and lifecycle hooks

Getting Started #

import 'package:ai_agent/ai_agent.dart';

Basic usage #

final agent = AgentBuilder()
  .withModel(ChatModel(
    apiUrl: 'https://api.openai.com/v1',
    apiKey: 'your-api-key',
    model: 'gpt-4',
  ))
  .withSkills([mySkill])
  .build();

final result = await agent.run('your prompt');

Components #

Component Description
AgentBuilder Build and configure AI agents
ChatModel LLM client with OpenAI-compatible API
Skill Define executable skills
BaseTool Create custom tools
AutoRetryTool Tool with automatic retry on failure
TimeoutTool Tool with execution timeout
RateLimitTool Tool with rate limiting

License #

BSD 3-Clause License

0
likes
140
points
58
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A modular AI agent framework for Dart/Flutter with LLM integration, skill-based execution, MCP protocol support, and built-in tools.

Repository

License

BSD-3-Clause (license)

Dependencies

flutter, http, path_provider

More

Packages that depend on ai_agent