How alyrraza/srs-using-ai-agent works
Project type and purpose
• Full-stack web application (Python + Streamlit)
• Modular pipeline pattern inspired by n8n, where each “agent” produces one section of the SRS
File structure
Top-level files
• main.py – Streamlit entry point and UI layer
• model_test.py – unit tests for core logic
• requirements.txt, .env, .gitignore – environment/configuration
srs_generator/ (application modules)
• __init__.py – pipeline manager (SRSAgentManager)
• rag.py – Gemini API wrapper (AI content fetcher)
• first_page.py, introduction.py, overall_description.py, system_feature.py, use_cases.py, non_functional_requirements.py – individual section agents
Extract architecture insights from the README
• Streamlit UI collects input (user name, project description, file name)
• SRSAgentManager orchestrates a sequential chain of agents
• Each agent calls Gemini API (via rag.py) for AI-generated content
• python-docx handles formatting and page insertion
• Output: downloadable .docx with placeholder TOC
Main components and their relationships
a. Frontend (Streamlit UI)
– Collects user input
– Triggers SRSAgentManager
b. Application layer (Pipeline & Agents)
– SRSAgentManager (orchestrator)
– FirstPageAgent → IntroductionAgent → OverallDescriptionAgent → … → SystemModelsAgent
c. Document Generation
– python-docx
– SRSConcrete class methods: create_first_page(), add_page()
– PlantUML JAR (external service)
– system_models_diagrams.py generates .puml files, invokes PlantUML to produce images
e. External Services
– Gemini API (AI content)
– PlantUML CLI
f. Output & Storage
– Local .docx file saved
– Streamlit makes it downloadable
Architectural patterns & design principles
• Pipeline / Chain of Responsibility (n8n‐inspired): agents execute in defined sequence
• Separation of concerns: distinct modules for UI, orchestration, AI interaction, formatting, diagramming
• Extensibility: plug-in style agents (add new content sections without touching core)
• Resiliency: retries & logging (max_retries=5 via loguru)
Essential elements
– Streamlit UI (main.py)
– SRSAgentManager (srs_generator/__init__.py)
– Individual Agents (each .py under srs_generator/)
– rag.py (Gemini API wrapper)
– python-docx library
– PlantUML (JAR path)
– Output .docx
• Notes on configuration (.env, retries, logging)