| 1 | # FAQ
|
| 2 |
|
| 3 | ## General
|
| 4 |
|
| 5 | !!! question "Does mini-SWE-agent work on my system?"
|
| 6 |
|
| 7 | mini-SWE-agent should work on any system that has a bash shell or uses a container runtime (e.g., docker, singularity, apptainer, etc.) to emulate one.
|
| 8 |
|
| 9 | ??? question "Should I use mini-SWE-agent or swe-agent?"
|
| 10 |
|
| 11 | You should use `mini-swe-agent` if
|
| 12 |
|
| 13 | - You want a quick command line tool that works locally
|
| 14 | - You want an agent with a very simple control flow
|
| 15 | - You want even faster, simpler & more stable sandboxing & benchmark evaluations
|
| 16 | - You are doing FT or RL and don't want to overfit to a specific agent scaffold
|
| 17 |
|
| 18 | You should use `swe-agent` if
|
| 19 |
|
| 20 | - You need specific tools or want to experiment with different tools
|
| 21 | - You want to experiment with different history processors
|
| 22 | - You want very powerful yaml configuration without touching code
|
| 23 |
|
| 24 | What you get with both
|
| 25 |
|
| 26 | - Excellent performance on SWE-Bench
|
| 27 | - A trajectory browser
|
| 28 |
|
| 29 | ??? question "How is `mini` simpler than `swe-agent`?"
|
| 30 |
|
| 31 | `mini` is simpler than `swe-agent` because it:
|
| 32 |
|
| 33 | - Does not have any tools other than bash — it doesn't even use the tool-calling interface of the LMs.
|
| 34 | This means you don't have to install anything in any environment you're running in. `bash` is all you need.
|
| 35 | - Has a completely linear history — every step of the agent just appends to the messages and that's it.
|
| 36 | - Executes actions with `subprocess.run` — every action is completely independent (as opposed to keeping a stateful shell session running).
|
| 37 | This [avoids so many issues](#why-no-shell-session), trust me.
|
| 38 |
|
| 39 | ??? question "What are the limitations of mini-SWE-agent?"
|
| 40 |
|
| 41 | mini-SWE-agent can be extended trivially in various ways, the following assumes the default setup.
|
| 42 | As reflected in the high SWE-bench scores, none of the following limitations are a problem in practice.
|
| 43 |
|
| 44 | - No tools other than bash
|
| 45 | - Actions are parsed from triple-backtick blocks (rather than assuming a function calling/tool calling format)
|
| 46 | - By default, actions are executed as `subprocess.run`, i.e., every action is independent of the previous ones.
|
| 47 | (meaning that the agent cannot change directories or export environment variables; however environment variables
|
| 48 | can be set per-action). This [avoids so many issues](#why-no-shell-session), trust me.
|
| 49 |
|
| 50 | If you want more flexibility with these items, you can use [SWE-agent](https://swe-agent.com/) instead.
|
| 51 |
|
| 52 | ??? question "Where is global configuration stored?"
|
| 53 |
|
| 54 | The global configuration is stored in the `.env` file in the config directory.
|
| 55 | The location is printed when you run `mini --help`.
|
| 56 |
|
| 57 | The `.env` file is a simple key-value file that is read by the `dotenv` library.
|
| 58 |
|
| 59 |
|
| 60 | ## Models
|
| 61 |
|
| 62 | !!! question "What models do you support?"
|
| 63 |
|
| 64 | Currently, mini-SWE-agent supports all models that are supported by [litellm](https://github.com/BerriAI/litellm)
|
| 65 | or [OpenRouter](https://openrouter.ai/)
|
| 66 | and we're open to extend the `models/` directory with more models should `litellm` not support them.
|
| 67 |
|
| 68 | !!! question "How do I set the API key for a model?"
|
| 69 |
|
| 70 | The API key can be stored either as an environment variable (note that enviroinment variables are not persistent
|
| 71 | unless you set them in your `~/.bashrc` or similar), or as a permanent key in the config file.
|
| 72 |
|
| 73 | To temporarily set the API key as an environment variable, you can use the following command:
|
| 74 |
|
| 75 | ```bash
|
| 76 | export OPENAI_API_KEY=sk-test123
|
| 77 | ```
|
| 78 |
|
| 79 | To permanently set the API key in the config file, you can use the following command:
|
| 80 |
|
| 81 | ```bash
|
| 82 | mini-extra config set OPENAI_API_KEY sk-test123
|
| 83 | ```
|
| 84 |
|
| 85 | Alternatively, you can directly edit the `.env` file in the config directory
|
| 86 | (the location is printed when you run `mini --help`).
|
| 87 |
|
| 88 | !!! question "How can I set the default model?"
|
| 89 |
|
| 90 | The default model is stored in the config/environment as `MSWEA_MODEL_NAME`.
|
| 91 | To permanently change it:
|
| 92 |
|
| 93 | ```bash
|
| 94 | mini-extra config set MSWEA_MODEL_NAME anthropic/claude-sonnet-4-5-20250929
|
| 95 | ```
|
| 96 |
|
| 97 | Alternatively, you can directly edit the `.env` file in the config directory
|
| 98 | (the location is printed when you run `mini --help`).
|
| 99 |
|
| 100 | ## Minutia
|
| 101 |
|
| 102 | ??? question "Why is not needing a running shell session such a big deal?"
|
| 103 | <a name="why-no-shell-session"></a>
|
| 104 |
|
| 105 | Most agents so far kept a running shell session. Every action from the agent was executed in this session.
|
| 106 | However, this is far from trivial:
|
| 107 |
|
| 108 | 1. It's not obvious when a command has terminated. Essentially you're just pasting input into the shell session, and press enter—but when do you stop reading output?
|
| 109 | We've experimented with various heuristics (watching PIDs, watching for the shell to go back to the prompt, etc.) but all of them were flaky.
|
| 110 | The `mini` agent doesn't need any of this!
|
| 111 | 2. Particularly bad commands from the LM can kill the shell session. Then what?
|
| 112 | 3. Interrupting a command running in a shell session can also mess up the shell itself and can in particular interfere with all the following outputs you want to extract.
|
| 113 |
|
| 114 | `mini` is different: There is no running shell session. Every action is executed as a subprocess, that means
|
| 115 | every action is independent of the previous ones (it is literally a `subprocess.run`/`os.system`/`docker exec` call).
|
| 116 |
|
| 117 | This means that the agent cannot even change directories or export environment variables.
|
| 118 | But you don't need this! You can always prefix `cd /path/to/project` or `export FOO=bar` to every action
|
| 119 | (and in fact some LMs like Claude will do that even if you don't ask them to).
|
| 120 |
|
| 121 | {% include-markdown "_footer.md" %}
|
| 122 |
|