AutoGraph is an AI-powered visualization tool designed to automate the conversion of unstructured text into professional process diagrams.
Recognizing that manual diagramming is often time-consuming, AutoGraph leverages Large Language Models (LLMs) to perform semantic logic extraction—parsing complex paragraphs to identify actionable steps, conditional branches, and recurring loops.
By translating natural language directly into strict Mermaid.js syntax, AutoGraph allows users to instantly visualize Standard Operating Procedures (SOPs), technical guides, and algorithms, transforming dense documentation into clear, interactive flowcharts.
- Zero-Shot Logic Extraction: Instantly converts text to flowcharts without training.
- Intelligent Parsing: Distinguishes between Actions (
[]) and Decisions ({}) automatically. - Loop Detection: Identifies "retry" logic and draws recursive arrows instead of duplicate nodes.
- Microservices Architecture: Decoupled Frontend (Streamlit) and Backend (FastAPI).
- Live Editor: Modify the generated code in real-time and see the updates instantly.
- Export Ready: One-click export to Mermaid.live for high-res downloading.
- Frontend: Streamlit (UI, State Management)
- Backend: FastAPI (API Endpoints, Validation)
- AI Engine: Groq Cloud (Running Llama-3-8b-Instant)
- Visualization: Mermaid.js
AutoGraph-Pro/
├── backend.py # FastAPI Server (Business Logic & AI)
├── frontend.py # Streamlit App (UI & Rendering)
├── requirements.txt # Project Dependencies
├── .gitignore # Git configuration
└── README.md # Documentation
- Python 3.11 or higher
- A free API Key from Groq Console
git clone [https://github.com/Pranathi-N-47/AutoGraph.git](https://github.com/Pranathi-N-47/AutoGraph.git)
cd AutoGraph-Pro
It is recommended to use a virtual environment to keep dependencies clean.
Windows:
python -m venv venv
venv\Scripts\activate
Mac/Linux:
python3 -m venv venv
source venv/bin/activate
Run:
pip install -r requirements.txt
This application follows a Client-Server architecture, so you must run the Backend and Frontend in two separate terminals.
This runs the AI processing server locally.
python backend.py
*You should see a message: Uvicorn running on http://127.0.0.1:8000*
Open a new terminal window (keep the first one running!) and launch the UI.
streamlit run frontend.py
*The app will open automatically in your browser at http://localhost:8501*
Try pasting these text blocks into the app to test the logic engine:
1. Simple Linear Flow
"Wake up at 7 AM. Eat breakfast. Brush teeth. Go to work."
2. Branching Logic (Decisions)
"Check the server status. If it is Online, start the backup. If it is Offline, restart the service. If the restart fails, alert the admin."
3. Looping Logic (Recursion)
"Check the water temperature. If it is below 100 degrees, wait 10 seconds and check again. If it is 100 degrees, add the pasta."
- Computer Vision Integration: Upload a photo of a whiteboard sketch to digitize it.
- Multi-Diagram Support: Automatic detection to switch between Flowcharts, Sequence Diagrams, and Gantt charts.
- Agentic Validators: A secondary AI agent that critiques the flowchart for "dead ends" before showing it to the user.
This project is open-source and available under the MIT License.