An open API service indexing awesome lists of open source software.

https://github.com/tanmayvaij/diaflow

DiaFlow is a lightweight AI agent framework built on top of Google GenAI. It enables you to easily create tool-using agents with memory and structured JSON outputs powered by Zod
https://github.com/tanmayvaij/diaflow

agent ai-agents framework gemini gemini-ai gemini-api wrapper wrapper-library

Last synced: 3 months ago
JSON representation

DiaFlow is a lightweight AI agent framework built on top of Google GenAI. It enables you to easily create tool-using agents with memory and structured JSON outputs powered by Zod

Awesome Lists containing this project

README

          

🌊 DiaFlow


Composable AI Agent Framework for building multi-model workflows with ease.


Core β€’
Gemini β€’
OpenRouter β€’
Examples

---

## 🧩 Overview

DiaFlow is a **modular framework** for building AI-driven workflows and conversational agents.
It separates the **core orchestration layer** from **LLM backends**, making it flexible, extendable, and cloud-agnostic.

Whether you're integrating **Gemini**, **OpenRouter**, or your own LLM β€” DiaFlow keeps the experience consistent and developer-friendly.

---

## πŸ“¦ Monorepo Layout

| Package | Description |
|----------|--------------|
| [`diaflow-core`](https://github.com/tanmayvaij/diaflow-core) | Core runtime for agent logic, tools, and orchestration. |
| [`diaflow-gemini`](https://github.com/tanmayvaij/diaflow-gemini) | Connector for Google Gemini models (`gemini-2.0-flash`, `gemini-1.5-pro`, etc). |
| [`diaflow-openrouter`](https://github.com/tanmayvaij/diaflow-openrouter) | Adapter for OpenRouter API supporting multiple open models. |

Each module is **standalone**, but they work best when composed together.

---

## ⚑ Quick Start

### 1️⃣ Install a module

```bash
npm install diaflow-gemini
# or
npm install diaflow-openrouter
````

### 2️⃣ Create an agent

```ts
import Agent from "diaflow-gemini";

const agent = new Agent({
apiKey: process.env.GEMINI_API_KEY!,
model: "gemini-2.0-flash",
});

const reply = await agent.run("Hello DiaFlow!");
console.log("πŸ€– AI:", reply);
```

### 3️⃣ Environment Variables

```bash
GEMINI_API_KEY=your_key_here
```

---

## πŸ’‘ Example Projects

| Example | Description | Repository |
| ------------------ | ---------------------------------------------- | ------------------------------------------------------ |
| **diagem-cli-bot** | A minimal CLI chatbot using `diaflow-gemini` | [View β†’](https://github.com/tanmayvaij/diagem-cli-bot) |
| *(coming soon)* | Web and API examples with `diaflow-openrouter` | β€” |

---

## 🧠 Design Philosophy

DiaFlow is built around three principles:

1. **Composability** β€” Everything is modular and replaceable.
2. **Simplicity** β€” Small surface area, no magic.
3. **Extensibility** β€” Easy to add custom tools, models, or workflows.

---

## πŸ—ΊοΈ Roadmap

* [ ] Unified CLI for agent creation and flow management
* [ ] Visual flow editor for defining logic nodes
* [ ] Plugins for memory, vector stores, and APIs
* [ ] Example integrations with LangChain and FastAPI

---

## πŸ§‘β€πŸ’» Author

Built by [**Tanmay Vaij**](https://github.com/tanmayvaij) with πŸ’™
Follow for updates and upcoming releases!

---

## πŸ“„ License

MIT License Β© 2025 Tanmay Vaij