Trae Agent
Operating Trae Agent on workers — why it needs a provider, the configuration file the worker writes, and how its result is read.
Install
pip install "git+https://github.com/bytedance/trae-agent.git" dockerThe worker looks for trae-cli on the worker user's PATH.
Sign-in
Trae Agent has no login. It runs only when the worker has a provider it can use (OpenAI, an OpenAI-compatible endpoint, Anthropic, Google, OpenRouter) or an add-on model. On a worker with neither, tasks do not land on it.
How it runs
trae-cli run --file <prompt file> --working-dir <dir> --console-type simple --config-file <yaml> --trajectory-file <file>
- Every run needs a configuration file ("Config file not found" otherwise). The worker writes one into the
task's state directory. It names the provider and model, not the key: the key is passed in the provider's
<PROVIDER>_API_KEYvariable. - Its trajectory file is written to the state directory, not into the project.
- It exits with code 0 whatever happened. The worker reads its summary table ("Success") and error rows instead.
- The
dockerPython package must be installed next to it, or the command fails at start.
Add-on models
Trae Agent's openai provider speaks the Responses API without streaming. For OpenAI-compatible endpoints and
for the model gateway the worker therefore uses its openrouter provider, which is plain chat completions with
a base URL. Ollama reaches it through the gateway as well. A complete task was run through the gateway and on an
OpenAI-compatible endpoint against a test model; OpenAI, Anthropic, Google and OpenRouter were run with a key
they reject.
Sessions
Trae Agent has no resume command. After a crash, recovery starts a fresh session from the checkpoint.
What was verified
Checked against Trae Agent 0.1.0 on 2026-10-06: its --help, and a real run without credentials through the
worker's session runtime. It also completed a task through the model gateway against a test model.