Neural Reels is an AI-powered application that automates the creation of short-form video content from simple text prompts. It leverages a multi-agent system, where a main orchestrator agent coordinates a team of specialized AI agents to handle every step of the video production process—from research and scriptwriting to asset generation and the final video assembly.
This project uses the Google Agent Development Kit (ADK) to build and orchestrate the agent-based workflow, with a user-friendly frontend created using Streamlit, and all of the agents and asset generation (Voiceovers, images and videos) are powered by Gemini and other Google generative models (like Imagen and Veo).
I recorded a video walkthrough with a demonstration of this code, and also wrote a blog post about it, which you can find at the links below:
- Building an AI Video Creator with Google's ADK and Gemini (Neural Reels Project)
- Neural Reels: How AI Agents Can Revolutionize Content Creation
The application follows an interactive, multi-step workflow managed by the orchestrator agent. This agent guides the user through the creative process, ensuring the final output aligns with their vision.
- User Prompt: The process begins in a chat interface where the user describes the video they want to create (e.g., "a video about the Roman Empire").
- Theme Definition: The
ThemeDefinerAgentanalyzes the prompt and proposes a specific video theme (e.g., "The Rise and Fall of the Roman Empire"). The user must approve this theme before the workflow continues. - Research & Compilation: Once the theme is approved, the
ExpertResearcherAgentandWebResearcherAgentgather information. TheResearchCompilerAgentthen synthesizes this information into a concise report. - Script Writing & Refinement: The
ScriptWriterAgentdrafts a script based on the research. The user is prompted for feedback and can request revisions until the script is approved. - Asset Generation: With the final script, the system breaks it down into scenes. A team of agents then generates all necessary assets:
VoiceoverGeneratorAgent: Creates audio narration for each scene using Text-to-Speech.ImagePromptGeneratorAgent&VideoPromptGeneratorAgent: Create detailed prompts for visual content.ImageGeneratorAgent&VideoGeneratorAgent: Generate images and video clips based on the prompts.
- Video Assembly: The
VideoAssemblerAgentcombines the voiceover, images, and video clips into a cohesive final video. - SEO Optimization: Finally, the
SeoOptimizerAgentgenerates a catchy title and a search-engine-optimized description for the video.
All generated assets and the final video are saved to a dedicated project folder.
Follow these steps to set up and run the Neural Reels application on your local machine.
- Python 3.10+
uvPython package manager (pip install uv)- A Google Cloud project with the Gemini API enabled.
-
Clone the repository:
git clone https://github.com/dimitreOliveira/neural-reels.git cd neural-reels -
Install dependencies: The project uses
uvfor package management. Run the following command to install all required dependencies into a virtual environment.make install
-
Create a
.envfile in the root directory of the project:cp .env.example .env
-
Add your Google API Key: Obtain an API key from Google AI Studio and add it to your
.envfile:GOOGLE_API_KEY="YOUR_API_KEY"
Alternatively, you can set up Application Default Credentials (ADC) for authentication with Google Cloud:
gcloud auth application-default login
The application consists of a backend server (ADK) and a frontend UI (Streamlit). You can run them separately or together using the provided Makefile commands.
-
Start the Backend Server: This command starts the ADK API server, which hosts the agent logic.
make dev-backend
-
Start the Frontend UI: In a separate terminal, run this command to launch the Streamlit web interface.
make dev-frontend
-
Run Both (Combined Command): To start both the backend and frontend simultaneously:
make dev-app
-
Interact with the App:
- Open the Streamlit URL provided in your terminal (usually
http://localhost:8501). - Click "➕ New Session" to begin.
- In the chat input, describe the video you want to create.
- Follow the agent's prompts to approve the theme and script. You can type "yes" to approve or provide feedback for revisions.
- Once the script is approved, the agent will begin generating all assets and assembling the final video.
- The generated video and all its assets will be saved in the
projects/directory.
- Open the Streamlit URL provided in your terminal (usually
- Frontend (
frontend/): A user-friendly interface built with Streamlit that allows users to interact with the video creation agent in a conversational manner. - Backend (
app/): An application built with the Google Agent Development Kit (ADK).agent.py: Contains the mainVideoCreatorWorkflowAgent, which orchestrates the entire process.app/agents/: A directory containing all the specialized sub-agents, each responsible for a specific task in the workflow (e.g.,script_writer.py,image_generator.py). This modular design allows for easy extension and maintenance.app/utils/: Utility functions for common tasks like API calls and file handling.
To ensure code quality and consistency, run the linter and formatter before committing changes:
make lintContributions to this project are welcome! Please fork the repository, make your changes, and submit a pull request. Ensure your code passes the linting checks before submission.
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
- This project was made possible with the support of the Google for Developers team, and Google Cloud credits were provided for this project during the #AISprint.
- Built with the Google Agent Development Kit (ADK).