Mini-AutoGPT is a powerful, multi-agent AI system designed to automate complex business tasks and analyze documents. It features a modern Streamlit interface that allows you to deploy a team of specialized AI agents (Planner, Researcher, Market Analyst, etc.) to create comprehensive business plans or interact with your PDF documents.
Deploy a full team of autonomous agents to research, plan, and write a business strategy for any goal you provide.
- Planner Agent: Breaks down your goal into actionable steps.
- Researcher Agent: Gathers data and insights.
- Market Analyst: Evaluates competition and trends.
- Finance Agent: Forecasts costs and revenue.
- Manager Agent: Reviews and refines the plan.
- Developer Agent: Provides technical implementation details.
Upload any PDF document and chat with it using advanced AI.
- Direct Context Mode (New!): Automatically bypasses complex vector databases for files < 25,000 characters (approx. 6-8k tokens). It reads text directly into the AI's context window, ensuring 100% reliability with zero network errors. Includes a built-in "View Extracted Text" debug tool.
- RAG (Retrieval-Augmented Generation): For larger files (> 25k chars), the system automatically switches to Local Embeddings (HuggingFace) to index content offline. This handles large documents efficiently while maintaining privacy and avoiding API socket errors.
- Flexible AI Models: Use Gemini (Google) for free embeddings and chat, or switch to Groq, OpenAI, or Anthropic for generation.
- Dynamic API Keys: Enter keys directly in the UI sidebar—no hardcoded secrets.
- Local Fallbacks: Uses local CPU-based embeddings (
sentence-transformers) by default to avoid cloud dependency issues. - Cross-Provider Support: Mix and match providers (e.g., use Google for embeddings and Groq for chat).
-
Clone the Repository
git clone https://github.com/yourusername/mini-autogpt.git cd mini-autogpt -
Create a Virtual Environment
python -m venv venv # Windows .\venv\Scripts\activate # Mac/Linux source venv/bin/activate
-
Install Dependencies
pip install -r requirements.txt
Note: This installs
streamlit,langchain,pypdf,sentence-transformers,faiss-cpu, and other required packages.
Launch the interactive Streamlit app:
streamlit run app.pyIf you are using the virtual environment on Windows:
.\venv\Scripts\streamlit run app.pyYou can also run the legacy command-line tool:
python main.py "Your Goal Here"You can provide API keys in two ways:
- UI Method: Enter them in the sidebar when proper running the app.
- Environment File: Create a
.envfile in the root directory:OPENAI_API_KEY=sk-... ANTHROPIC_API_KEY=sk-ant-... GOOGLE_API_KEY=AIza... GROQ_API_KEY=gsk_...
- Embeddings: Local HuggingFace (
all-MiniLM-L6-v2), Google (text-embedding-004), OpenAI. - Chat/Agents: GPT-4o, Claude 3.5 Sonnet, Gemini 1.5 Flash, Llama 3 (via Groq).
Q: I see a "Socket Error" or "WinError 10013" when uploading a PDF. A: The system now defaults to Local Embeddings or Direct Context to prevent this. Ensure you have installed the latest dependencies:
pip install -U sentence-transformers pypdfQ: Why does it say "Using Local Embeddings" instead of Direct Context? A: Your document is larger than 25,000 characters. The system automatically switches to RAG mode (Local Embeddings) to handle larger files efficiently without exceeding the AI model's context window.
Q: "Model not found" error with Google/Gemini?
A: We have updated the app to use the latest text-embedding-004 model. If that fails, it falls back to embedding-001. Ensure your Google API Key has permission for Generative Language API.
MIT License. Feel free to modify and use for your own projects!