From a18aef9284c1a057a514ce9533e64c6d8329773f Mon Sep 17 00:00:00 2001 From: nanjiangwill Date: Tue, 4 Mar 2025 22:33:13 -0800 Subject: [PATCH] update agent docs --- agent/README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/agent/README.md b/agent/README.md index 5d7a587..2d0a65e 100644 --- a/agent/README.md +++ b/agent/README.md @@ -1,6 +1,45 @@ # Agent for Commit0 This tool provides a command-line interface for configuring and running AI agents to assist with code development and testing. + +## (Update) Running with OpenHands + +**Step 1**: Clone (OpenHands)[https://github.com/All-Hands-AI/OpenHands/tree/main] and install (OpenHands)[https://github.com/All-Hands-AI/OpenHands/blob/main/evaluation/README.md#development-environment] + +**Step 2**: Create `config.toml` and write + +``` +[core] +workspace_base="~/OpenHands/evaluation/benchmarks/commit0_bench" + +[llm] +model="anthropic/claude-3-5-sonnet-20241022" +api_key="..." +embedding_model="" +temperature = 0.0 +caching_prompt = true +``` + + +**Step 3**: Run +```bash +./evaluation/benchmarks/commit0_bench/scripts/run_infer.sh SPLIT MODEL HEAD CodeActAgent 16 STEPS PARALLEL_NUMBER + +# Example +./evaluation/benchmarks/commit0_bench/scripts/run_infer.sh lite llm.eval_deepseekv3 HEAD CodeActAgent 16 100 2 +``` + +**Step 3.1**: +You can do the following before running code to parallelize them on remote server from OpenHands + +```bash +export RUNTIME=remote +export SANDBOX_REMOTE_RUNTIME_API_URL="https://runtime.eval.all-hands.dev" +export ALLHANDS_API_KEY=... +``` + + +```python ## Quick Start Configure an agent: ```bash @@ -12,6 +51,11 @@ Run an agent on a specific branch: agent run [OPTIONS] BRANCH ``` +### Example +```bash +agent run sonnet --max-parallel-repos 16 --agent-config-file .agent_sonnet.yaml --commit0-config-file .commit0.yaml +``` + For more detailed information on available commands and options: ```bash agent -h