build(docs): isolate docs build from the workspace lock#286
Merged
Conversation
The docs build introspects the installed agentex SDK but installed it from the frozen workspace uv.lock (`uv sync --group docs`). That coupled doc generation to the backend's pins: documenting a newly released SDK path (e.g. `agentex.protocol.*`) required bumping agentex-sdk in the lock, cascading backend-facing bumps (temporalio, websockets) the docs don't need. Resolve docs deps independently via docs/requirements.txt, installed into an ephemeral env (`uv run --isolated --no-project --with-requirements` in CI/Makefile, `uv pip install -r` in the Dockerfile docs-builder stage). The workspace lock and backend resolution are now untouched by docs. Updates all five doc-build sites: ci.yml, build-agentex.yml, the Dockerfile docs-builder stage, and the serve-docs/build-docs Makefile targets. The docs dependency-group in agentex/pyproject.toml is now unused by the build (left in place; removing it is a trivial follow-up). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 tasks
Pin mkdocs/mkdocs-material/mkdocs-macros-plugin/mkdocstrings-python/griffe-pydantic/pymdown-extensions/Pygments to current known-good versions for reproducible doc builds; agentex-sdk stays floating (>=0.12.0) so docs track the latest SDK release. Addresses the Greptile P2 on #286. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The docs build resolves its toolchain from docs/requirements.txt in an isolated env, so the `docs` dependency-groups (root + agentex-backend) and the `install-docs` make target are dead. Removing them drops the mkdocs toolchain from uv.lock; agentex-sdk stays via the dev group, so backend deps are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
max-parke-scale
added a commit
that referenced
this pull request
Jun 9, 2026
> **Stacked on [#286](#286 (isolate docs build from the workspace lock) — merge that first. This PR is only the doc-path changes; #286 makes the doc build resolve `agentex-sdk>=0.12.0` in an isolated env, so `agentex.protocol.*` resolves without touching backend deps. ## Summary Updates the agentex mkdocs site to use the new canonical `agentex.protocol.acp` import paths for protocol-shape types (`RPCMethod`, `CreateTaskParams`, `SendMessageParams`, `SendEventParams`, `CancelTaskParams`). Companion to [scaleapi/scale-agentex-python#371](scaleapi/scale-agentex-python#371), which moved these types out of `agentex.lib.types.*` into the new slim-safe `agentex.protocol.*` package. The old path still works via a back-compat shim — this PR isn't fixing a breakage, it's making sure scaffolded user code following these docs starts on the canonical path. Requested in [a review comment on #371](scaleapi/scale-agentex-python#371 (review)). ## Changes 10 markdown files in `agentex/docs/`: | Pattern | Count | |---|---| | `from agentex.lib.types.acp import ...` → `from agentex.protocol.acp import ...` | 8 code samples | | `::: agentex.lib.types.acp.X` → `::: agentex.protocol.acp.X` | 2 mkdocstrings cross-refs (in `agent_types/sync.md` and `api/types.md`) | No content / behavior changes; same classes, new import path. ## What's not touched Other `agentex.lib.types.*` modules (`tracing`, `agent_card`, `credentials`, `fastacp`, `llm_messages`, `converters`) stay on the old path because they have heavier transitive deps and weren't migrated by #371. No doc references to those needed updates. ## Test plan - [x] Isolated `mkdocs build` renders green against `agentex-sdk` 0.12.0 (verified locally via the #286 build path). - [x] `::: agentex.protocol.acp.*` mkdocstrings directives resolve at the new path. 🧑💻🤖 — posted via [Claude Code](https://claude.com/claude-code) <!-- claude-code --> <!-- greptile_comment --> <h3>Greptile Summary</h3> This PR updates 10 documentation markdown files to use the new canonical `agentex.protocol.acp` import paths, replacing the old `agentex.lib.types.acp` references in both Python code samples and mkdocstrings directives. - Replaces `from agentex.lib.types.acp import ...` with `from agentex.protocol.acp import ...` in 10 code sample blocks across 8 files. - Updates 13 mkdocstrings `::: agentex.lib.types.acp.X` directives to `::: agentex.protocol.acp.X` across 5 files, covering `CreateTaskParams`, `SendMessageParams`, `SendEventParams`, and `CancelTaskParams`. - A grep confirms no remaining `agentex.lib.types.acp` references exist anywhere in the docs tree after this PR. <details><summary><h3>Confidence Score: 5/5</h3></summary> Safe to merge — purely mechanical doc path updates with no remaining old-path references in the docs tree. All 23 occurrences of agentex.lib.types.acp across 10 files have been correctly replaced with agentex.protocol.acp. A grep of the entire docs directory confirms zero leftover old-path references. No logic, behavior, or non-doc files are touched. No files require special attention. </details> <h3>Important Files Changed</h3> | Filename | Overview | |----------|----------| | agentex/docs/docs/api/types.md | 4 mkdocstrings directives updated from old to new canonical path; no issues. | | agentex/docs/docs/agent_types/async/base.md | 1 import and 3 mkdocstrings directives updated; no issues. | | agentex/docs/docs/agent_types/async/temporal.md | 1 import and 2 mkdocstrings directives updated; no issues. | | agentex/docs/docs/acp/agentic/base.md | 3 mkdocstrings directives updated; no issues. | | agentex/docs/docs/getting_started/project_structure.md | 3 import statements updated across different agent-type examples; no issues. | | agentex/docs/docs/agent_types/sync.md | 1 import and 1 mkdocstrings directive updated; no issues. | | agentex/docs/docs/api/overview.md | 1 import statement updated; no issues. | | agentex/docs/docs/concepts/streaming.md | 1 import statement updated; no issues. | | agentex/docs/docs/acp/agentic/temporal.md | 1 import statement updated; no issues. | | agentex/docs/docs/temporal_development/openai_integration.md | 1 import statement updated; no issues. | </details> <details><summary><h3>Flowchart</h3></summary> ```mermaid %%{init: {'theme': 'neutral'}}%% flowchart TD A["Doc code samples & mkdocstrings refs\n(10 markdown files)"] --> B{"Import path"} B -- "Before" --> C["agentex.lib.types.acp\n(back-compat shim)"] B -- "After" --> D["agentex.protocol.acp\n(canonical path)"] D --> E["CreateTaskParams"] D --> F["SendMessageParams"] D --> G["SendEventParams"] D --> H["CancelTaskParams"] ``` </details> <sub>Reviews (5): Last reviewed commit: ["docs(agentex): use canonical agentex.pro..."](5a42081) | [Re-trigger Greptile](https://app.greptile.com/api/retrigger?id=34170925)</sub> <!-- /greptile_comment --> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Decouples the documentation build from the backend's workspace
uv.lockso documenting a newly released SDK API surface no longer forces backend dependency bumps.Problem
The mkdocs site documents the published
agentexSDK via mkdocstrings, which introspects the installedagentexpackage. The build installed it from the frozen workspace lock (uv sync --group docs), pinning the docs to whateveragentex-sdkthe backend's lock resolved. Documenting a new path likeagentex.protocol.*(released inagentex-sdk0.11.5) therefore required bumpingagentex-sdkin the lock — and because every protocol-supporting SDK floorsopenai-agents>=0.14.3(→websockets>=15) andtemporalio>=1.26, that cascaded backend-runtime bumps the docs don't need.Change
Docs deps now live in
agentex/docs/requirements.txtand install into an ephemeral environment, independent of the workspace lock:ci.yml,build-agentex.yml) and Makefile (serve-docs,build-docs):uv run --isolated --no-project --with-requirements requirements.txt mkdocs builddocs-builderstage:uv pip install --system -r docs/requirements.txt(honorsUV_INDEX_URLfor private-index prod builds)The workspace lock and backend dependency resolution are untouched — zero
pyproject.toml/uv.lockchanges. Docs always render against the latest published SDK.Verified
mkdocs buildgreen locally — griffe introspects an ephemeral uv env, not.venv.make build-docsgreen.Notes
docsdependency-group inagentex/pyproject.tomlis now unused by the build (left in place;install-docsstill references it). Removing it + relocking is a trivial follow-up.agentex.protocol.acpdoc paths) stacks on this branch and goes green because the isolated build pullsagentex-sdk>=0.12.0.🧑💻🤖 — posted via Claude Code
Greptile Summary
This PR decouples the MkDocs documentation build from the workspace
uv.lockby introducingagentex/docs/requirements.txtand switching CI, the Makefile, and the Dockerfiledocs-builderstage to install docs deps in an isolated ephemeral environment. Zero changes topyproject.tomlruntime deps or the workspace lock.docs/requirements.txt: mkdocs toolchain packages are pinned to known-good versions for reproducibility;agentex-sdk>=0.12.0stays floating so the rendered docs automatically track new SDK releases without forcing backend dependency bumps.build-docs,serve-docs) now useuv run --isolated --no-project --with-requirements requirements.txt mkdocs build/serve.docs-builderstage: Drops theuv export --frozen --group docspath in favour ofuv pip install -r docs/requirements.txt; thedocsdependency group is removed from bothpyproject.tomland the workspace lock.Confidence Score: 5/5
Safe to merge — the change is scoped entirely to the docs build pipeline and leaves the backend runtime deps untouched.
All CI, Makefile, and Dockerfile changes are straightforward substitutions of one install method for another. The workspace lock and backend pyproject.toml runtime dependencies are completely unchanged, so there is no risk to the running service. The only finding is a Docker layer-ordering nit in the docs-builder stage that affects build cache efficiency but not correctness.
The COPY order in the docs-builder stage of agentex/Dockerfile is worth a quick look for the caching optimization, but it does not affect build correctness.
Important Files Changed
uv sync --group docstouv run --isolated --no-project --with-requirements requirements.txt mkdocs build; one-line replacement, straightforward.install-docstarget and updatedserve-docs/build-docsto use isolated uv run; clean change.docsdependency group; clean-up.docsgroup that forwarded toagentex[docs]; consistent with backend cleanup.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD subgraph Before A[uv sync --group docs] --> B[installs from workspace uv.lock] B --> C[mkdocs build] B --> D[forces agentex-sdk pin in lock] end subgraph After E[docs/requirements.txt] --> F{build context} F -->|CI / Makefile| G["uv run --isolated --no-project\n--with-requirements requirements.txt\nmkdocs build"] F -->|Dockerfile docs-builder| H["uv pip install --system\n-r docs/requirements.txt"] G --> I[mkdocs build] H --> I E --> J["agentex-sdk>=0.12.0 floats\ntoolchain pinned for reproducibility"] end D -. eliminated .-> EPrompt To Fix All With AI
Reviews (4): Last reviewed commit: "Merge branch 'main' into maxparke/agx1-2..." | Re-trigger Greptile