Genesis AI SDK — A universal Flutter SDK for AI agents across 7 providers

I’ve been building genesis_ai_sdk over the past few weeks — a Flutter package that abstracts away the fragmentation of different AI providers with a unified API.

The problem I was solving:
Every time I wanted to add AI to a Flutter app, I’d have different API shapes for:

  • Gemini (Google)
  • OpenAI (GPT-4o)
  • Anthropic (Claude)
  • HuggingFace (cloud inference)
  • Ollama (local server)
  • On-device Gemma
  • GGUF models via llama.cpp

And I’d always rebuild tool calling, memory, and safety guardrails from scratch.

What I built:
One GenesisAgent API that works across all 7 providers. Switch providers by changing one line. Built-in:

  • ReAct loop + tool calling
  • Cross-session memory (Hive)
  • Safety: injection detection, PII redaction, rate limiting
  • Smart routing + auto-fallback

Example:

final agent = GenesisAgent(
  provider: GeminiProvider(apiKey: 'key'),
  tools: [GenesisTools.calculator],
);
await agent.chat('What is 1337 * 42?');
// Agent calls calculator automatically

Links:

I’d love feedback on:

  • Is the unified API design clean/intuitive?

  • Missing provider support?

  • Architecture improvements?

MIT licensed, open to contributions.