Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

🤖 Mini-AutoGPT: Autonomous AI Workforce

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.

✨ Key Features

1. 🏢 Business Plan Generator

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.

2. 📄 Document Analyzer (PDF Chat)

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.

3. 🛡️ Robust & Flexible

  • 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).

🚀 Installation

  1. Clone the Repository

    git clone https://github.com/yourusername/mini-autogpt.git
    cd mini-autogpt
  2. Create a Virtual Environment

    python -m venv venv
    
    # Windows
    .\venv\Scripts\activate
    
    # Mac/Linux
    source venv/bin/activate
  3. Install Dependencies

    pip install -r requirements.txt

    Note: This installs streamlit, langchain, pypdf, sentence-transformers, faiss-cpu, and other required packages.


🎮 Usage

Run the Web Interface (Recommended)

Launch the interactive Streamlit app:

streamlit run app.py

If you are using the virtual environment on Windows:

.\venv\Scripts\streamlit run app.py

CLI Mode (Optional)

You can also run the legacy command-line tool:

python main.py "Your Goal Here"

⚙️ Configuration

API Keys

You can provide API keys in two ways:

  1. UI Method: Enter them in the sidebar when proper running the app.
  2. Environment File: Create a .env file in the root directory:
    OPENAI_API_KEY=sk-...
    ANTHROPIC_API_KEY=sk-ant-...
    GOOGLE_API_KEY=AIza...
    GROQ_API_KEY=gsk_...

Supported Models

  • 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).

❓ Troubleshooting

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 pypdf

Q: 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.


📜 License

MIT License. Feel free to modify and use for your own projects!

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages