5f917f4121
Publisher fixes: - Checkout new branch before push (was pushing main ref) - Verify files staged before commit - Handle duplicate files gracefully - Clean error reporting per stage Skills merged to main: - mcp-server-setup (from pipeshub-ai) - research-pipeline (from Blacknode) - multi-agent-sequential-workflow (from Fast-LLM-Agent-MCP) - unifai-workflow-execution (from UnifAI) - code-review-agent-workflow (from AgentKit)
78 lines
2.5 KiB
Markdown
78 lines
2.5 KiB
Markdown
---
|
|
name: code-review-agent-workflow
|
|
version: 1.0.0
|
|
description: Automate the code review process using a multi-step workflow with human-in-the-loop
|
|
approval.
|
|
inputs:
|
|
- Sample diff of code changes (str)
|
|
- Repo context (dict)
|
|
steps:
|
|
- 'Step 1: Build the graph for the code review agent using `build_graph()` from `agentkit.workflow.code_review.graph`'
|
|
- 'Step 2: Invoke the graph with initial parameters including sample diff, repo context,
|
|
user ID, and other metadata'
|
|
- 'Step 3: The graph processes the input through a series of steps, generating messages
|
|
and issues as it progresses'
|
|
outputs:
|
|
- Final result containing processed messages and issues (dict)
|
|
tags: []
|
|
metadata:
|
|
source_repo: https://github.com/itszhaoziyan-n/AgentKit.git
|
|
extracted_at: ''
|
|
confidence: 0.95
|
|
---
|
|
|
|
# code-review-agent-workflow
|
|
|
|
Automate the code review process using a multi-step workflow with human-in-the-loop approval.
|
|
|
|
## Setup
|
|
|
|
**Dependencies:**
|
|
|
|
```text
|
|
pip install langgraph>=0.3 langchain-core>=0.3 langchain-anthropic>=0.3 langfuse>=2.0 mcp[server]>=1.24,<2.0 langchain-mcp-adapters>=0.1 tenacity>=9.0 fastapi>=0.115 uvicorn[standard]>=0.32 psycopg[binary]>=3.1 langgraph-checkpoint-postgres>=2.0 httpx>=0.27 python-dotenv>=1.0 redis>=5.0
|
|
```
|
|
|
|
**Setup steps:**
|
|
|
|
1. cp .env.example .env
|
|
1. docker compose up -d
|
|
1. pip install -e '.[dev]'
|
|
|
|
## Key Files
|
|
|
|
- `agentkit/workflow/code_review/graph.py - Contains the `build_graph` function and graph invocation logic.`
|
|
- `examples/run_code_review.py - Example script demonstrating how to run the code review agent.`
|
|
|
|
## Steps
|
|
|
|
1. Step 1: Build the graph for the code review agent using `build_graph()` from `agentkit.workflow.code_review.graph`
|
|
2. Step 2: Invoke the graph with initial parameters including sample diff, repo context, user ID, and other metadata
|
|
3. Step 3: The graph processes the input through a series of steps, generating messages and issues as it progresses
|
|
|
|
## Implementation Details
|
|
|
|
```python
|
|
graph = build_graph()
|
|
thread_id = str(uuid.uuid4())
|
|
result = graph.invoke(...)
|
|
```
|
|
|
|
## Inputs
|
|
|
|
- Sample diff of code changes (str)
|
|
- Repo context (dict)
|
|
|
|
## Outputs
|
|
|
|
- Final result containing processed messages and issues (dict)
|
|
|
|
## Failure Modes
|
|
|
|
- Specific failure scenario with mitigation: If the `build_graph()` function fails to initialize properly, ensure all required dependencies are correctly installed.
|
|
|
|
## Source
|
|
|
|
Extracted from: [https://github.com/itszhaoziyan-n/AgentKit.git](https://github.com/itszhaoziyan-n/AgentKit.git)
|
|
Confidence: 0.95
|