aider

An AI pair programmer that edits code in a local Git repository using natural language, executing commands and providing feedback.

  • Custom
beeai run aider
Try locally in GUI

Example requests

beeai run aider "Make a program that asks for a number and prints its factorial"

Description

ℹ️ NOTE

This agent works in stateless mode at the moment. While the CLI only shows the textual output, the created files are also available through the API.

The agent is an advanced AI pair programming assistant designed to help developers edit and manage code in their local git repositories via natural language instructions. It leverages AI to assist programmers in writing, editing, debugging, and understanding code, enhancing productivity and simplifying complex coding tasks. The agent runs in a local environment and interacts directly with the user's codebase, providing actionable insights and modifications.

How It Works

The agent operates as a server-based application that listens for programming-related commands. Upon receiving a command in natural language, it executes the appropriate actions within a temporary directory, simulating changes and returning feedback to the user. The agent uses subprocess execution to run the aider command with various options, capturing both standard output and errors to provide detailed responses. It also reads files generated during the process to include their content in the output if applicable.

Input Parameters

The agent requires the following input parameters:

  • input (string) – The prompt containing natural language instructions for code editing or management.

Output Structure

The agent returns an Output object with the following fields:

  • files (dict) – A dictionary mapping file paths to their respective content, representing any new or modified files.
  • text (str) – A string containing the text output from the executed commands, including any error messages.

Key Features

  • Natural Language Processing – Understands and executes code-related commands described in natural language.
  • Local Environment Integration – Operates directly within the user's local environment, simulating changes in a temporary workspace.
  • Real-Time Feedback – Provides continuous updates on the execution progress and returns detailed results.
  • Error Handling – Captures and reports errors encountered during execution, assisting with debugging.

Use Cases

  • Program Generation from Natural Language – Converts user requests into fully functional programs.
  • Code Editing and Refactoring – Assists developers in modifying existing codebases without manual intervention.
  • Debugging Support – Provides insights and suggestions for resolving coding errors or inefficiencies.
  • Collaborative Programming – Simulates a pair programming experience, enhancing coding efficiency and learning.
  • Bash/Shell Scripting Assistance – Automates script writing, optimization, and debugging.