You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`agent config [OPTIONS] AGENT_NAME`: Setup the config you want agent to run with
3
-
`agent run [OPTIONS] BRANCH`: running agent on specific branch
2
+
This tool provides a command-line interface for configuring and running AI agents to assist with code development and testing.
4
3
5
-
You can also run the following command to know more information
4
+
## Quick Start
5
+
Configure an agent:
6
+
```bash
7
+
agent config [OPTIONS] AGENT_NAME
8
+
```
9
+
10
+
Run an agent on a specific branch:
11
+
```bash
12
+
agent run [OPTIONS] BRANCH
13
+
```
14
+
15
+
For more detailed information on available commands and options:
6
16
```bash
7
17
agent -h
8
18
agent config -h
9
19
agent run -h
10
20
```
11
-
## Configure Agent
12
-
Here are all configs you can choose when you run `agent config [OPTIONS] AGENT_NAME`
21
+
## Configure an Agent
22
+
Use `agent config [OPTIONS] AGENT_NAME` to set up the configuration for an agent.
23
+
Available options include:
13
24
14
25
`--agent_name: str`: Agent to use, we only support [aider](https://aider.chat/) for now. [Default: `aider`]
15
-
`--model-name: str`: Model to use, check [here](https://aider.chat/docs/llms.html) for more information. [Default: `claude-3-5-sonnet-20240620`]
16
-
`--use-user-prompt: bool`: Use the user prompt instead of the default prompt. [Default: `False`]
17
-
`--user-prompt: str`: The prompt sent to agent. [Default: Refer to code.]
18
-
`--run-tests: bool`: Run the tests after the agent modified the code to get feedback. [Default `False`]
19
-
`--max-iteration: int`: Maximum number of iterations for agent to run. [Default: `3`]
20
-
`--use-repo-info: bool`: Use the repository information. [Default: `False`]
26
+
`--model-name: str`: LLM model to use, check [here](https://aider.chat/docs/llms.html) for all supported models. [Default: `claude-3-5-sonnet-20240620`]
27
+
`--use-user-prompt: bool`: Use a custom prompt instead of the default prompt. [Default: `False`]
28
+
`--user-prompt: str`: The prompt sent to agent. [Default: See code for details.]
29
+
`--run-tests: bool`: Run tests after code modifications for feedback. You need to set up `docker` or `modal` before running tests, refer to commit0 docs. [Default `False`]
30
+
`--max-iteration: int`: Maximum number of agent iterations. [Default: `3`]
31
+
`--use-repo-info: bool`: Include the repository information. [Default: `False`]
21
32
`--max-repo-info-length: int`: Maximum length of the repository information to use. [Default: `10000`]
22
-
`--use-unit-tests-info: bool`: Use the unit tests information. [Default: `False`]
33
+
`--use-unit-tests-info: bool`: Include the unit tests information. [Default: `False`]
23
34
`--max-unit-tests-info-length: int`: Maximum length of the unit tests information to use. [Default: `10000`]
24
-
`--use-spec-info: bool`: Use the spec information. [Default: `False`]
35
+
`--use-spec-info: bool`: Include the spec information. [Default: `False`]
25
36
`--max-spec-info-length: int`: Maximum length of the spec information to use. [Default: `10000`]
26
-
`--use-lint-info: bool`: Use the lint information. [Default: `False`]
37
+
`--use-lint-info: bool`: Include the lint information. [Default: `False`]
27
38
`--max-lint-info-length: int`: Maximum length of the lint information to use. [Default: `10000`]
28
-
`--pre-commit-config-path: str`: Path to the pre-commit config file. [Default: `.pre-commit-config.yaml`]
39
+
`--pre-commit-config-path: str`: Path to the pre-commit config file. This is needed for running `lint`. [Default: `.pre-commit-config.yaml`]
29
40
`--agent-config-file: str`: Path to write the agent config. [Default: `.agent.yaml`]
30
41
31
42
## Running Agent
32
-
Here are all configs you can choose when you run `agent run [OPTIONS] BRANCH`
43
+
Use `agent run [OPTIONS] BRANCH` to execute an agent on a specific branch.
44
+
Available options include:
33
45
34
46
`--branch: str`: Branch to run the agent on, you can specific the name of the branch
35
47
`--backend: str`: Test backend to run the agent on, ignore this option if you are not adding `run_tests` option to agent. [Default: `modal`]
@@ -38,18 +50,24 @@ Here are all configs you can choose when you run `agent run [OPTIONS] BRANCH`
38
50
`--display-repo-progress-num: int`: Number of repo progress displayed when running. [Default: `5`]
39
51
40
52
41
-
### Agent Example: aider
42
-
Step 1: `agent config aider`
43
-
Step 2: `agent run aider_branch`
53
+
### Example: Running aider
54
+
Step 1: Configure aider: `agent config aider`
55
+
Step 2: Run aider on a branch: `agent run aider_branch`
44
56
45
57
### Other Agent:
46
58
Refer to `class Agents` in `agent/agents.py`. You can design your own agent by inheriting `Agents` class and implement the `run` method.
47
59
48
60
## Notes
49
61
50
62
### Automatically retry
51
-
Please refer to [here](https://github.com/paul-gauthier/aider/blob/75e1d519da9b328b0eca8a73ee27278f1289eadb/aider/sendchat.py#L17) for the type fo API error that aider will automatically retry.
63
+
Aider automatically retries certain API errors. For details, see [here](https://github.com/paul-gauthier/aider/blob/75e1d519da9b328b0eca8a73ee27278f1289eadb/aider/sendchat.py#L17).
64
+
65
+
### Parallelize agent running
66
+
When increasing --max-parallel-repos, be mindful of aider's [60-second retry timeout](https://github.com/paul-gauthier/aider/blob/75e1d519da9b328b0eca8a73ee27278f1289eadb/aider/sendchat.py#L39). Set this value according to your API tier to avoid RateLimitErrors stopping processes.
52
67
53
68
### Large files in repo
54
-
Currently, agent will skip file with more than 1500 lines.(check `agent/agent_utils.py#L199`)
69
+
Currently, agent will skip file with more than 1500 lines. See `agent/agent_utils.py#L199` for details.
70
+
71
+
### Cost
72
+
Running a full `all` commit0 split costs approximately $100.
0 commit comments