Contributing
Want to change abt itself? You can run it from source, try your change on the example project, and open a pull request.
Set up
You need Python 3.12+ and uv.
git clone https://github.com/getyourguide/abt-core.git
cd abt-core
uv sync --all-extras --all-groups
uv sync uses the Python pinned in .python-version (3.12). For 3.13, export UV_PYTHON=3.13 before the first sync and keep it set.
The unit suite (uv run pytest) needs the extras installed above, but no credentials and no profiles.yaml. The docs-UI tests need Node.js and skip until you run (cd src/abt/site && npm ci). Integration tests read git-ignored profiles.yaml files in the fixture projects. Copy tests/fixtures/stress_project/profiles.yaml.example to profiles.yaml in that project, as .github/workflows/tests.yml does. cp -n keeps a file you already have, and the tests then run against yours; to reproduce CI exactly, move yours aside and use cp -f (the commands are in CONTRIBUTING.md).
Run abt from source
examples/hello-world is a small project you can run locally. Compile it, then dry-run an agent. Nothing calls a model and no profiles.yaml is needed:
uv run abt compile --project-root examples/hello-world
uv run abt run -s hello -p "say hi" --project-root examples/hello-world --dry-run
For a real model call, copy examples/hello-world/profiles.yaml.example to profiles.yaml, set ANTHROPIC_API_KEY, and drop --dry-run. The other projects in examples/ show sources, exposures and test judges.
The tests compile the fixture projects under tests/fixtures/ (stress_project, workflow_project, selector_project). They need no credentials.
Edit the docs
uv run --group docs mkdocs serve
The docs site UI lives in src/abt/site/js/. After you change it, run cd src/abt/site && npm ci && npm run build, because CI checks that the committed bundle is up to date.
Open a pull request
- Put new behavior in the existing place for it. The choke-point map in CONTRIBUTING.md lists them.
- Keep the PR small and focused. Describe the problem and show an example of the change.
- Run
uv run ruff check --fix src/ tests/ packages/,uv run lint-importsanduv run pytestbefore you push. CI runs these and more. SeeCONTRIBUTING.mdfor the full list. - Treat the PR as public. Remove internal names, channel IDs, and URLs from examples and fixtures.