Development environment
Python 3.11 and 3.12 are supported, with uv managing the dependencies. Building or debugging Web and TUI also requires Node.js ≥22.12.0 and npm. See pyproject.toml and package.json for the environment versions and dependency groups.
Prepare the source environment
Run from the repository root:
uv sync --python 3.12
npm install --include=dev
uv sync installs development dependencies such as pytest and Ruff by default. Skip the npm step at first if you only change Python. See package deployment for runtime dependencies and optional extras. Before invoking a model, prepare the settings via configuration basics.
| Entry to debug | Run from source |
|---|---|
| Backend only | uv run --no-sync dataagent serve |
| Web with a local backend | npm run build:web, followed by npm run start |
| Web attached to an existing backend | npm run build:web, followed by npm run start:web; see source deployment for connection settings |
| Terminal client | npm run build:tui, then start or attach using the TUI guide |
Build complete release artifacts through the release workflow.
Debug the backend
Use an independent Home to debug configuration, sessions, and logs. Set DATAAGENT_HOME in the process environment before startup, or explicitly select YAML and environment files:
uv run --no-sync dataagent serve --config /path/to/config.yaml --env-file /path/to/env-file
Check /healthz and /ready first, then use request and run IDs to inspect logs and traces. SDK callers debugging configuration can initialize missing templates with LaunchOptions(config=..., env_file=..., init_home=True).
| Breakpoint | Purpose |
|---|---|
dataagent.bootstrap.startup.prepare_runtime |
Configuration and path preparation |
dataagent.extensions.compiler.compile_extensions |
Extension declaration compilation |
stream inside dataagent.server.app.create_app |
HTTP conversation entry |
dataagent.assembly.graph.build_graph |
Native graph assembly |
After changes, select checks using the testing guide.
Preview documentation locally
Prepare MkDocs in a separate Python environment from the repository root:
python -m venv .venv-docs
source .venv-docs/bin/activate
python -m pip install -r requirements-docs.txt
npm run docs:dev
Open http://127.0.0.1:8000 to preview. Before delivery, run the documentation build and link checks from the testing guide.