Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
AI writing agent powered by gemini 3 flash - autonomously creates novels and stories with deep reasoning
| Date | Stars |
|---|---|
| 2026-07-31 | 313 |
| 2026-08-06 | 313 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# Gemini Writing Agent An autonomous agent powered by **Google's Gemini 3 Flash** model for creating novels, books, and short story collections. ## Features - 🤖 **Autonomous Writing**: The agent plans and executes creative writing tasks independently - 📚 **Multiple Formats**: Create novels, books, or short story collections - ⚡ **Real-Time Streaming**: See the agent's thinking and writing appear as it's generated - 💾 **Smart Context Management**: Automatically compresses context when approaching token limits - 🔄 **Recovery Mode**: Resume interrupted work from saved context summaries - 📊 **Token Monitoring**: Real-time tracking of token usage with automatic optimization - 🛠️ **Tool Use**: Agent can create projects, write files, and manage its workspace - 🧠 **Advanced Thinking**: Uses Gemini's thinking mode for better reasoning ## Installation ### Prerequisites We recommend using [uv](https://github.com/astral-sh/uv) for fast Python package management: ```bash # Install uv (if you don't have it) curl -LsSf https://astral.sh/uv/install.sh | sh ``` ### Setup 1. Install dependencies: **Using uv (recommended):** ```bash uv pip install -r requirements.txt ``` **Or using pip:** ```bash pip install -r requirements.txt ``` 2. Configure your API key: Create a `.env` file with your API key: ```bash # Copy the example file cp env.example .env # Edit .env and add your API key # The file should contain: GEMINI_API_KEY=your-api-key-here ``` Get your Gemini API key from: https://aistudio.google.com/app/apikey ## Usage ### Fresh Start Run with an inline prompt: ```bash # Using uv (recommended) uv run writer.py "Create a collection of 5 sci-fi short stories about AI" # Or using python directly python writer.py "Create a collection of 5 sci-fi short stories about AI" ``` Or run interactively: ```bash uv run writer.py # or: python writer.py ``` Then enter your prompt when asked. ### Recovery Mode If the agent is interrupted or you want to continue previous work: ```bash uv run writer.py --recover output/my_project/.context_summary_20250107_143022.md # or: python writer.py --recover output/my_project/.context_summary_20250107_143022.md ``` ## How It Works ### The Agent's Tools The agent has access to three tools: 1. **create_project**: Creates a project folder to organize the writing 2. **write_file**: Writes markdown files with three modes: - `create`: Creates a new file (fails if exists) - `append`: Adds content to an existing file - `overwrite`: Replaces the entire file content 3. **compress_context**: Automatically triggered to manage context size ### The Agentic Loop 1. The agent receives your prompt 2. It reasons about the task using Gemini's thinking mode 3. It decides which tools to call and executes them 4. It reviews the results and continues until the task is complete 5. Maximum 300 iterations with automatic context compression ### Context Management - **Token Limit**: 1,000,000 tokens (Gemini's large context window) - **Auto-Compression**: Triggers at 900,000 tokens (90% of limit) - **Backups**: Automatic context summaries every 50 iterations - **Recovery**: All summaries saved with timestamps for resumption ## Project Structure ``` kimi-writer/ ├── writer.py # Main agent ├── tools/ │ ├── __init__.py # Tool registry │ ├── writer.py # File writing tool │ ├── project.py # Project management tool │ └── compression.py # Context compression tool ├── utils.py # Utilities (token counting, etc.) ├── requirements.txt # Python dependencies ├── env.example # Example configuration ├── .gitignore # Git ignore rules └── README.md # This file # Generated during use: output/ # All AI-generated projects go here ├── your_project_name/ # Created by the agent │ ├── chapter_01.md # Written by the agent │ ├── chapter_02.md │ └── .context_summary_*.md # Auto-saved context summaries └── anoth
Excerpt of 7,183 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:9bd22196d1fa6783, llm:description: 'AI writing agent powered by gemini 3 flash - autonomously creates novels and stories with deep reasoning'
matched fp:9bd22196d1fa6783, llm:description: 'AI writing agent powered by gemini 3 flash - autonomously creates novels and stories with deep reasoning'
matched fp:9bd22196d1fa6783, llm:description: 'AI writing agent powered by gemini 3 flash - autonomously creates novels and stories with deep reasoning'