This is a simple demonstration of a multi-agent workflow for planning git commits using Google ADK.
Prompts are structured following the style of OpenAI's GPT-4 Prompting Guide.
- Step 1: Collects unstaged git changes using
git diff
. - Step 2: Iteratively generates and critiques a multi-commit plan until it is clear and actionable.
- Step 3: Outputs a conventional commit plan for the user to apply.
- InfoGatheringAgent: Runs
git diff
to get changes. - PlannerAgent: Proposes a commit plan.
- CritiqueAgent: Reviews the plan for completeness and clarity.
- Loop: Steps 2 and 3 repeat until the plan is approved.
graph TD
subgraph "Phase 1: Information Gathering"
A[Start: User Triggers Agent] --> B(info_gathering_agent);
B --> C["🛠️ tool: execute_bash<br/>('git diff')"];
end
C -- "Provides git_diff_output" --> D;
subgraph "Phase 2: Iterative Planning (LoopAgent)"
D(critique_agent_in_loop)
E(planner_agent_in_loop)
F{"Is Plan Comprehensive?"}
D -- "Sends critique of the plan" --> E;
E -- "Generates/Refines plan" --> F;
F -- "No, needs refinement" --> D;
end
F -- "Yes, plan is complete" --> H;
H[End: Final Commit Plan is Ready];
- Set
GIT_AGENT_REPO_PATH
in your environment or use the current directory. - Run:
python -m git-agent.agent
- The agent prints a step-by-step commit plan.
agent.py
– Main agent workflow.tools.py
– Shell command helpers.prompts.yaml
– Prompt templates for each agent.
This project is for demonstration and experimentation with agent workflows and prompt engineering.