flutter_agentic_tools 0.2.0 copy "flutter_agentic_tools: ^0.2.0" to clipboard
flutter_agentic_tools: ^0.2.0 copied to clipboard

Ready-made device tools for Flutter AI agents — clipboard, sandboxed files, HTTP, and system info tools that plug straight into flutter_agentic.

flutter_agentic_tools — Device Tools for Flutter AI Agents #

pub package License: MIT

Ready-made, safety-guarded tools your AI agent can call. Clipboard access, sandboxed file storage, host-restricted HTTP, and system info — all as flutter_agentic AgenticTools that plug straight into any agent.

👉 View on pub.dev · API docs · GitHub

Part of the flutter_agentic family: flutter_agentic (core SDK) · flutter_agentic_graph · flutter_agentic_ui · flutter_agentic_memory


Installation #

dependencies:
  flutter_agentic_tools: ^0.1.1

Quick start #

import 'package:flutter_agentic/flutter_agentic.dart';
import 'package:flutter_agentic_tools/flutter_agentic_tools.dart';
import 'package:path_provider/path_provider.dart';

final docsDir = await getApplicationDocumentsDirectory();

final agent = AgenticAgent(
  provider: GeminiProvider(apiKey: 'YOUR_KEY'),
  tools: [
    ...ClipboardTools.all,                                  // read/write clipboard
    ...FileTools(docsDir.path).all,                         // sandboxed files
    ...HttpTools(allowedHosts: ['api.github.com']).all,     // guarded web access
    ...SystemTools.all,                                     // platform/locale info
  ],
);

await agent.chat('Save my shopping list to a file and copy it to the clipboard');
// → the agent calls file_write and clipboard_write on its own

The tools #

Tool What the agent can do Safety guard
clipboard_read / clipboard_write read what the user copied, copy results back
file_write / file_read / file_list / file_delete persist notes, exports, lists sandboxed to the directory you pass; .. and absolute paths rejected; size limits
http_get / http_post_json call web APIs optional host allow-list, response truncation, timeout
system_info adapt answers to platform, locale, time zone read-only

Safety by construction #

Every tool returns structured errors to the model instead of throwing, so the agent can recover gracefully:

// Sandbox: agent cannot escape the folder you give it.
FileTools(docsDir.path)              // file_read("../../etc/passwd") → error

// Allow-list: agent can only reach hosts you name.
HttpTools(allowedHosts: ['api.weather.com'])   // anything else → error

// Context-window protection: long responses truncated.
HttpTools(maxResponseChars: 20000)

All constructors accept injectable dependencies (http.Client, base directory, limits) so your own tests stay hermetic.

License #

MIT — see LICENSE.

1
likes
160
points
187
downloads

Documentation

API reference

Publisher

verified publisherinlayad.com

Weekly Downloads

Ready-made device tools for Flutter AI agents — clipboard, sandboxed files, HTTP, and system info tools that plug straight into flutter_agentic.

Repository (GitHub)
View/report issues

Topics

#flutter #ai #agent #tools #function-calling

License

MIT (license)

Dependencies

flutter, flutter_agentic, http

More

Packages that depend on flutter_agentic_tools