autoagent README

The project's README from github.com/thirdlayerinc/autoagent. As one markdown file: README.md.

thirdlayer

We're launching a product around self-configuring agents soon. Sign up here.
We're hiring engineers. If this work interests you, reach out to [email protected] with your Github link.

AutoAgent

Like autoresearch but for agent engineering. Give an AI agent a task, let it build and iterate on an agent harness autonomously overnight. It modifies the system prompt, tools, agent configuration, and orchestration, runs the benchmark, checks the score, keeps or discards the change, and repeats.

teaser

The core idea is the same: you're not touching the harness Python files like you normally would as an engineer. Instead, you program program.md, the Markdown file that provides context to the meta-agent and defines the agent-engineering loop.

How it works

The repo has a few files and directories that matter:

The metric is total score produced by the benchmark's task test suites. The meta-agent hill-climbs on this score.

Quick start

Requirements: Docker, Python 3.10+, uv, and whatever model-provider credentials your current agent.py harness requires.

# 1. Install uv (if you don't have it)
curl -LsSf https://astral.sh/uv/install.sh | sh

# 2. Install dependencies
uv sync

# 3. Set up the environment variables required by your current agent/runtime
# Example:
cat > .env << 'EOF'
OPENAI_API_KEY=...
EOF

# 4. Build base image
docker build -f Dockerfile.base -t autoagent-base .

# 5. Add tasks to tasks/ (see Task format section below)

# 6. Run a single benchmark task
rm -rf jobs; mkdir -p jobs && uv run harbor run -p tasks/ --task-name "<task-name>" -l 1 -n 1 --agent-import-path agent:AutoAgent -o jobs --job-name latest > run.log 2>&1

# 7. Run all tasks in parallel (-n = concurrency, default 4)
rm -rf jobs; mkdir -p jobs && uv run harbor run -p tasks/ -n 100 --agent-import-path agent:AutoAgent -o jobs --job-name latest > run.log 2>&1

Running the meta-agent

Point your coding agent at the repo and prompt:

Read program.md and let's kick off a new experiment!

The meta-agent will read the directive, inspect the current harness, run the benchmark, diagnose failures, modify agent.py, and iterate.

Project structure

agent.py                       -- single-file harness under test
  editable harness section     -- prompt, registries, tools, routing
  fixed adapter section        -- Harbor integration + trajectory serialization
program.md                     -- meta-agent instructions + directive
Dockerfile.base                -- base image
.agent/                        -- optional agent workspace artifacts
tasks/                         -- benchmark tasks, typically added in benchmark-specific branches
jobs/                          -- Harbor job outputs
results.tsv                    -- experiment log (created by meta-agent, gitignored)
run.log                        -- latest run output

Task format

The repo ships without tasks. Add your own to tasks/ following Harbor's task format:

tasks/my-task/
  task.toml           -- config (timeouts, metadata)
  instruction.md      -- prompt sent to the agent
  tests/
    test.sh           -- entry point, writes /logs/reward.txt
    test.py           -- verification (deterministic or LLM-as-judge)
  environment/
    Dockerfile        -- task container (FROM autoagent-base)
  files/              -- reference files mounted into container

Tests write a score (0.0-1.0) to the verifier logs. The meta-agent hill-climbs on this. See the Harbor docs for full details on writing and porting tasks.

Design choices

Cleanup

Docker images and containers accumulate across runs. Clean up regularly:

# Harbor's cached task images + task cache
uv run harbor cache clean -f

# Full Docker nuke (all unused images, build cache, etc.)
docker system prune -a -f

# Lighter: just dead containers
docker container prune -f

If Docker becomes unresponsive (for example after many concurrent runs), restart Docker Desktop:

killall Docker && open -a Docker

Improving performance with skills

You can equip the agent with Agent Skills for Context Engineering and context7 skills to improve performance.

License

MIT

autoagent (thirdlayerinc/autoagent)

Searching Database…

Что это?AutoAgent позволяет ИИ-агенту автономно, за ночь, строить и итерировать агентский харнесс (agent.py): он подстраивает системный промпт, инструменты, конфиг и оркестрацию, оценивает каждое изменение по бенчмарку и оставляет только улучшения.
Я редактирую харнесс напрямую или что-то другое?Сам agent.py вы не трогаете. Вместо этого вы пишете program.md — Markdown-файл, задающий мета-агенту контекст и директиву, — а мета-агент сам редактирует однофайловый харнесс (agent.py).
Как на самом деле запустить цикл мета-агента?Направьте своего кодинг-агента на репозиторий и дайте ему задание; дальше мета-агент читает директиву в program.md, изучает текущий харнесс, запускает бенчмарк, диагностирует сбои, изменяет agent.py и повторяет цикл.
Что нужно установить перед попыткой?Нужны Docker, Python 3.10+, uv и те учётные данные API провайдера модели, которые требует ваш текущий харнесс agent.py.
Есть ли готовые бенчмарки, работающие из коробки?Нет, репозиторий поставляется без задач для оценки. Нужно добавить свои задачи в tasks/ в формате задач Harbor, прежде чем у мета-агента появится оценка для оптимизации.
Зачем здесь изоляция через Docker?Эксперименты мета-агента с харнессом выполняются внутри контейнера, чтобы неудачное изменение или вышедший из-под контроля процесс не могли повредить хост-машину, пока он итерирует всю ночь.
Как мета-агент решает, что оставить?Каждый эксперимент выдаёт числовую оценку (0.0-1.0), которую тест-сьюты бенчмарка пишут в логи верификатора; мета-агент оставляет изменение, если оценка улучшилась, и отбрасывает его в противном случае.
Почему agent.py — один файл?Авторы выбрали однофайловый дизайн на основе реестра ради простоты, сохранив при этом достаточно структурированную регистрацию агентов и инструментов, чтобы харнесс мог аккуратно развиваться.
Можно ли поднять собственную результативность мета-агента?Да, его можно оснастить Agent Skills for Context Engineering и навыками context7, чтобы улучшить качество его итераций.
Size
1.2 MB
Stars
4.6K
Updated
CommitApr 03
Age
6mo
Commits · 90 Days