Skip to content

ChipCreates/nanobot_dart

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

56 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NanoBot Dart

Dart

A standalone Dart port of NanoBot, an ultra-lightweight AI agent framework.

Features

  • 🧠 Universal Agent: Works with any LLM (Anthropic, OpenAI, OpenRouter, Local).
  • πŸ› οΈ Tool System: Type-safe tool definitions and execution.
  • πŸ’Ύ Memory: Markdown-based daily notes and long-term memory.
  • πŸ”„ Sessions: Persistent conversation history (JSONL).
  • πŸ”Œ Skills: Drop-in skill modules (SKILL.md).
  • πŸ“± Cross-Platform: Designed for Flutter (Mobile/Desktop/Web) and Dart CLI.

Installation

Add to your pubspec.yaml:

# From local path (during development)
dependencies:
  nanobot_dart:
    path: ../nanobot_dart

# Or from Git
dependencies:
  nanobot_dart:
    git:
      url: https://github.com/ChipCreates/nanobot_dart
      ref: main

Quick Start

import 'package:nanobot_dart/nanobot_dart.dart';

void main() async {
  // 1. Configure
  final config = Config(
    agents: AgentsConfig(
      defaults: AgentDefaults(
        model: 'anthropic/claude-3.5-sonnet',
        workspace: '~/.nanobot',
      ),
    ),
    providers: ProvidersConfig(
      anthropic: ProviderConfig(apiKey: 'your-api-key'),
    ),
  );

  // 2. Initialize Agent
  final agent = NanoAgent(
    config: config,
    provider: AnthropicProvider(apiKey: config.apiKey!),
  );

  // 3. Process Message
  final response = await agent.process(InboundMessage(
    content: 'Hello, world!',
    channel: 'cli',
    chatId: 'general',
  ));

  print(response.content);
}

Architecture

nanobot_dart follows the Python reference architecture:

lib/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ agent/          # AgentLoop, NanoAgent, Tools
β”‚   β”œβ”€β”€ config/         # Configuration loading
β”‚   β”œβ”€β”€ bus/            # Message bus & events
β”‚   β”œβ”€β”€ providers/      # LLM provider implementations
β”‚   β”œβ”€β”€ session/        # Session management
β”‚   └── skills/         # Skill loading & registry
β”œβ”€β”€ nanobot_dart.dart   # Main exports

License

MIT License.

Based on NanoBot by the vLLM project.

About

"🐈 nanobot: The Ultra-Lightweight Clawdbot" Dart Port

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Dart 100.0%