This project implements a supervisor-based agent system designed to automate GitHub-related tasks. It leverages LangChain, Streamlit, and other libraries to create a modular, state-driven workflow for managing repositories, commits, and other GitHub operations.
- Modular Agents: Specialized agents for tasks such as creating repositories, commits, and README files.
- Supervisor Agent: Orchestrates task execution by delegating to other agents.
- State Management: Integration with LangChain for managing state and tool invocation.
- Streamlit UI: Provides an interactive user interface for input and workflow execution.
- create_repo: Creates a new GitHub repository.
- create_readme_file: Generates the content for a README file.
- create_commit: Creates a commit in a specified repository.
- generate_code: Generates Python code based on a given prompt.
- list_repo_branches: Lists all branches of a specified repository.
- general_assistant: Handles general-purpose tasks and queries.
The system uses a supervisor agent to analyze user input and delegate tasks to the appropriate agents. The workflow is managed using a state graph, ensuring modularity and flexibility.
- In-Memory Store: Used for temporary storage of state and checkpoints.
- SQLite Checkpointing: Provides persistent storage for workflow checkpoints.
- Create a Repository: "Create a private repository named my-repo with a description 'My new project'."
- Generate a README: "Generate a README file for the repository my-repo."
- Python 3.8 or higher
- A valid GitHub access token
- Google API key for LLM integration
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Create a virtual environment and activate it:
python3 -m venv .venv source .venv/bin/activate
-
Install requirements
pip install -r requirements.txt
-
Create a .env file in the root directory and add the environment variables defined in example.env:
streamlit run supervisor_based_1.py
Enter your query in the input field and click the "Run" button to execute the workflow.