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
- Host: GitHub
- URL: https://github.com/tanmayvaij/diaflow
- Owner: tanmayvaij
- Created: 2025-09-20T14:24:06.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-11-04T10:59:51.000Z (5 months ago)
- Last Synced: 2025-11-24T00:04:34.464Z (4 months ago)
- Topics: agent, ai-agents, framework, gemini, gemini-ai, gemini-api, wrapper, wrapper-library
- Homepage: https://diaflow.netlify.app
- Size: 72.3 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
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