English · Русский
English
HTTP API v1
A stable HTTP interface for running the swarm from another program: a site or a script uploads files, starts a
session with a goal, follows its timeline, answers the agents and takes the result and the files they made. It is
the HTTP form of dreamteam -p, under /api/v1, JSON in and out (#55).
- Its own token.
DREAMTEAM_API_TOKENis needed even on127.0.0.1. It opens only/api/v1, and only the
sessions created through the API; the board, the settings,/mcpand your other sessions stay closed to it.
With neither token set, the API answersapi_disabled. - Uploads as the raw request body (
POST /api/v1/uploads?filename=); a zip can be unpacked into the session. - Sessions: a goal, files, a saved team or a list of roles, a model profile by name, budget and limits. Creating
one answers 202 and starts it in the background;client_refmakes a repeated create return the same session.
Providers and API keys never go through the API. - Events for a timeline: long polls by id or Server-Sent Events resumed with
Last-Event-ID. Every event has a
ready-madetextline in the session's language. - Questions and reviews: with
"answers": "auto"the hub answers the agents itself, as-pdoes; with
"manual"your program gets them as requests and answers them.stop_when_donestops the session when the goal is
reached. - Result and files: the
-presult object with the list of changed files, a file's bytes, or a zip of a folder.
Links are never followed. - Folders on the hub's computer: roots you list in
dreamteam.tomlunder[api.folders.<name>]can be copied
into a session or, where you allowin_place, worked on in place. A client names a root and a path inside it,
never an absolute path. - For access from another computer, run the hub in
dreamteam sandbox, which mounts the[api]folders.
Guide: HTTP API. Settings:
HTTP API settings.
Other changes
- Sessions created through the API are marked "API" on the board and
HTTP APIindreamteam status, the session
list and the TUI picker.dreamteam -c,consoleandtracespass over them; they are reached by name or id.
dreamteam statusprints the API address when an API token is set. - A session's folder (
/cd,--workspace,session_cd, the API) can no longer be another DreamTeam home or a folder
inside one, the hub-tokens folder, or on Linux and macOS a folder under/proc,/sysor/dev. Two sessions on
one folder spelled in another letter case or Unicode form are refused where the file system folds them. - A new repository the Docker sandbox makes in a Windows folder gets
core.filemode=false, and a Git for Windows
checkout whose line endings differ in the container is refused with a hint aboutcore.autocrlf. - The hub no longer spins at shutdown on Python 3.12+, and on Linux and macOS it raises a soft open-files limit below
1024 to 1024 at start.
Sessions of 0.2.0 open as before: the agents' tool set has not changed. To update: uv tool upgrade dreamteam.
Русский
HTTP API v1
Стабильный HTTP-интерфейс, чтобы запускать рой из другой программы: сайт или скрипт загружает файлы, запускает
сессию с целью, следит за её ходом, отвечает агентам и забирает итог и сделанные ими файлы. Это HTTP-версия
dreamteam -p под /api/v1, на входе и на выходе JSON (#55).
- Свой токен.
DREAMTEAM_API_TOKENнужен даже на127.0.0.1. Он открывает только/api/v1и только сессии,
созданные через API: доска, настройки,/mcpи остальные ваши сессии ему закрыты. Если не задан ни один
токен, API отвечаетapi_disabled. - Загрузка файлов телом запроса (
POST /api/v1/uploads?filename=); zip можно распаковать в папку сессии. - Сессии: цель, файлы, сохранённая команда или список ролей, профиль модели по имени, бюджет и лимиты. Создание
отвечает 202 и запускает сессию в фоне; сclient_refповторный запрос вернёт ту же сессию. Провайдеры и ключи
API через API не передаются. - События для таймлайна: длинные опросы по id или Server-Sent Events с продолжением по
Last-Event-ID. У каждого
события есть готовая строкаtextна языке сессии. - Вопросы и ревью: с
"answers": "auto"хаб отвечает агентам сам, как-p; с"manual"ваша программа
получает их как запросы и отвечает на них.stop_when_doneостанавливает сессию, когда цель достигнута. - Итог и файлы: объект итога как у
-pсо списком изменённых файлов, отдельный файл или zip папки. Ссылки никогда
не разыменовываются. - Папки на компьютере хаба: корни, которые вы перечислили в
dreamteam.tomlв[api.folders.<имя>], можно
скопировать в сессию или, где вы разрешилиin_place, работать прямо в них. Клиент называет корень и путь внутри
него, но никогда не абсолютный путь. - Для доступа с другого компьютера запускайте хаб в
dreamteam sandbox: песочница монтирует папки[api].
Руководство: HTTP API. Настройки:
Настройки HTTP API.
Прочее
- Сессии, созданные через API, помечены «API» на доске и
HTTP APIвdreamteam status, списке сессий и выборе
сессии в терминале.dreamteam -c,consoleиtracesих пропускают: к ним обращаются по имени или id.
dreamteam statusпечатает адрес API, когда задан токен API. - Папкой сессии (
/cd,--workspace,session_cd, API) больше не может быть другая домашняя папка DreamTeam или
папка внутри неё, папка токенов хаба, а в Linux и macOS — папка внутри/proc,/sysили/dev. Две сессии на одной
папке, записанной в другом регистре или другой форме Unicode, отклоняются там, где файловая система их не различает. - Новый репозиторий, который песочница Docker создаёт в папке Windows, получает
core.filemode=false, а checkout Git
for Windows с другими окончаниями строк в контейнере отклоняется с подсказкой проcore.autocrlf. - Хаб больше не крутится вхолостую при остановке на Python 3.12+, а в Linux и macOS при старте поднимает мягкий лимит
открытых файлов до 1024, если он ниже.
Сессии 0.2.0 открываются как раньше: набор инструментов агентов не менялся. Обновление: uv tool upgrade dreamteam.