Thanks for helping out. This document covers setup, the checks your change has to pass, and what we look for in a pull request.
By participating you agree to abide by our Code of Conduct.
This repo is the API server and CLI layer (10xscale-agentflow-cli). The core
orchestration engine - StateGraph, ToolNode, state, persistence, memory - lives in
the separate 10xscale-agentflow package. If your
change is about graph execution rather than serving or scaffolding, it likely belongs
there.
Requires Python 3.12 or 3.13 and uv.
git clone https://github.com/10xHub/agentflow-cli.git
cd agentflow-cli
uv sync --dev
uv run pre-commit installEverything below runs in CI. Run it locally before opening a pull request.
uv run pytest # tests + 80% branch-coverage gate
uv run pytest --integration # adds tests needing real Redis/Postgres
uv run ruff check . && uv run ruff format --check .
uv run mypy
uv run pre-commit run --all-files # the full gate: ruff, bandit, hygiene hooksNotes:
- Coverage is enforced at 80% with branch coverage on. A pull request that drops coverage below the gate fails.
- Tests must not make unmocked outbound network calls.
- Tests that need real external services must be marked
@pytest.mark.integrationso they stay behind the--integrationflag. agentflow_cli/cli/templates/is excluded from ruff, mypy, and bandit. It is emitted scaffolding, not library code, and references modules that only exist once a project is scaffolded.
- Branch off
main. - Write the test first when you can. New behaviour needs a test; a bug fix needs a test that fails before the fix.
- Update
CHANGELOG.mdunder[Unreleased], in the right subsection (Added/Changed/Fixed/Removed/Breaking). - Update
README.mdif you changed a CLI flag, an HTTP route, or anagentflow.jsonkey. - Open the pull request against
mainand fill in the template.
Anything exported from agentflow_cli, any CLI command or flag, any HTTP route, and any
agentflow.json key is public surface. It is governed by the compatibility policy at the
top of CHANGELOG.md: nothing is removed without a deprecation cycle, moved
modules keep a shim for at least one minor release, and breaking changes are documented
under a ### Breaking heading with migration steps.
agentflow_cli/cli/templates/ ships inside the wheel, including dotfiles
(.env.example, .python-version) and prod/pyproject.toml. If you add a file there,
verify it survives packaging:
uv build
python -c "import zipfile,glob; print(*zipfile.ZipFile(sorted(glob.glob('dist/*.whl'))[-1]).namelist(), sep='\n')" | grep templatesNever assume config that "looks right" is shipping the file. Check the artifact.
Auth, authorization, the route guard, and rate limiting are enforcement code. Changes
there need a test that exercises the denial path, not only the allow path. See
tests/integration_tests/test_isolation_idor.py for the pattern.
Do not report a vulnerability through a pull request or issue. See SECURITY.md.
- One logical change per pull request. Split refactors from behaviour changes.
- Write commit subjects in the imperative mood:
fix wheel packaging for template dotfiles. - Explain why in the pull request body, not just what.
- Rebase on
mainrather than merging it in. - CI must be green. Do not mark a pull request ready while a check is failing.
Maintainers only. See the release procedure in
PRODUCTION_READINESS.md and RELEASE_NOTES.md. Releases are
cut by pushing a vX.Y.Z tag matching pyproject.toml; the workflow refuses to build if
they disagree. Publishing to PyPI is a deliberate manual make publish.
Agentflow is MIT licensed and made by 10xScale. Contributions are accepted under the same license.