Skip to main content
Challenge

Multi-Agent Code Review & Refactoring

This challenge focuses on building an advanced multi-agent system using the OpenAI Agents SDK. The system will be designed to automate code review processes, identify potential bugs or inefficiencies in a given codebase, and suggest intelligent refactoring strategies. It will leverage the o4-mini model for its strong code understanding and generation capabilities, enabling nuanced analysis and creative solutions. The solution will incorporate Kiln AI for robust agent management and lifecycle, ensuring the agents operate reliably and can be scaled. Composio will be used for integrating various external developer tools, such as code analysis suites and version control systems, allowing agents to interact with real-world development environments. Metaflow will orchestrate the complex CI/CD workflow, from code ingestion to analysis, refactoring suggestions, and simulated integration. Optionally, Synthflow can be used to add a voice-based interaction layer for developers to query code status or request refactorings verbally. This project demonstrates cutting-edge multi-agent orchestration for significantly enhancing software development productivity and quality.

Special Purpose AgentsHosted by Vera
Challenge brief

What you are building

The core problem, expected build, and operating context for this challenge.

Build an OpenAI Agents SDK-based multi-agent system with o4-mini to automate code review, refactoring, and CI/CD integration using Kiln AI, Composio, and Metaflow.

Delivery guide

How work is evaluated

Evaluation

The solution will be evaluated on its ability to autonomously review a provided Python codebase, accurately identify issues, suggest correct and actionable refactorings, and demonstrate conceptual integration with a mock CI/CD environment.

Datasets

Challenge datasets

Public datasets, plus the private datasets you have access to.

Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.

Dimensions
5 scoring checks
Binary
5 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

CorrectIssueIdentification

Checks if the agent correctly identified all expected issues from the input.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2

ValidRefactoringSuggestions

Checks if refactoring suggestions are well-formed, relevant, and provide actionable advice.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 3

MockPRDescriptionPresent

Verifies that a simulated Pull Request description is generated.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 4

CodeQualityImprovementScore

A score indicating the comprehensiveness, accuracy, and impact of the suggested refactorings (0-100). • target: 85 • range: 0-100

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 5

AgentProcessingLatencyMS

Average time taken by the agent system to process a code review request, in milliseconds. • target: 2000 • range: 100-6000

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

What you should walk away with

  • Master the OpenAI Agents SDK for defining agent roles, capabilities, and tool-calling functions for structured interactions.

  • Implement advanced prompting techniques with o4-mini for sophisticated code understanding, vulnerability detection, and transformation tasks.

  • Design and manage complex agent workflows using Kiln AI for scalable, observable, and resilient multi-agent deployments.

  • Integrate Composio to provide agents with programmatic access to Git repositories, linters, testing frameworks, and other developer tools.

  • Orchestrate complex AI-driven CI/CD pipelines using Metaflow for automated code quality gates, compliance checks, and deployment simulations.

  • Build robust error handling and feedback mechanisms within the agent system for continuous improvement and developer collaboration.

Resources and assets

Reference links and supporting material

Dataset notes

Sample data for 1 tasks

Challenge setup

The solution will be evaluated on its ability to autonomously review a provided Python codebase, accurately identify issues, suggest correct and actionable refactorings, and demonstrate conceptual integration with a m...

Challenge input

{"file_path": "str", "code_content": "str", "expected_issues": ["str"]}

OpenAI

OpenAI AI model provider

Composio

Tool integrations for AI agents

o4-mini

Policy Serving in the agent workflow.

Evaluated output

{"identified_issues": ["str"], "refactoring_suggestions": "str", "mock_pr_description": "str"}

Evaluation checks
  • Checks if the agent correctly identified all expected issues from the input.
  • Checks if refactoring suggestions are well-formed, relevant, and provide actionable advice.
  • Verifies that a simulated Pull Request description is generated.
Configured evaluation evidence
  • CodeQualityImprovementScore target: 85
  • 1 public reference case
Configured runtime
  • Python execution harness

Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.

View technical recipe

Configured tools

Action Space
  • OpenAI · Optional
  • Composio · Optional
Policy Serving
  • o4-mini · Required

Evaluation contract

  • CorrectIssueIdentification · Weight 1
  • ValidRefactoringSuggestions · Weight 1
  • MockPRDescriptionPresent · Weight 1
  • CodeQualityImprovementScore · Weight 1
  • AgentProcessingLatencyMS · Weight 1

Metrics

  • CodeQualityImprovementScore · Target 85
  • AgentProcessingLatencyMS · Target 2000

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: {"file_path": "str", "code_content": "str", "expected_issues": ["str"]}

    Output: {"identified_issues": ["str"], "refactoring_suggestions": "str", "mock_pr_description": "str"}

    Execution harness: Python

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Multi-Agent Code Review & Refactoring