Skip to content

docs(agentex): use canonical agentex.protocol.acp import paths#254

Merged
max-parke-scale merged 2 commits into
mainfrom
maxparke/agx1-292-docs-canonical-protocol-paths
Jun 9, 2026
Merged

docs(agentex): use canonical agentex.protocol.acp import paths#254
max-parke-scale merged 2 commits into
mainfrom
maxparke/agx1-292-docs-canonical-protocol-paths

Conversation

@max-parke-scale

@max-parke-scale max-parke-scale commented May 27, 2026

Copy link
Copy Markdown
Contributor

Stacked on #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, 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.

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

🧑‍💻🤖 — posted via Claude Code

Greptile Summary

This PR updates all agentex mkdocs documentation to use the new canonical agentex.protocol.acp import path in place of the legacy agentex.lib.types.acp path for the five protocol-shape types (CreateTaskParams, SendMessageParams, SendEventParams, CancelTaskParams, and the referenced variants). No content or behavioral changes are made; only import paths in code samples and mkdocstrings directives are touched.

  • 9 Python code snippets across 8 files updated from from agentex.lib.types.acp import ... to from agentex.protocol.acp import ....
  • 13 mkdocstrings directives across 5 files updated from ::: agentex.lib.types.acp.X to ::: agentex.protocol.acp.X.
  • A post-diff grep confirms no remaining agentex.lib.types.acp references exist anywhere in the docs tree.

Confidence Score: 5/5

Purely mechanical doc-path update with no logic changes; all old references have been replaced and none remain in the docs tree.

Every changed line is a string substitution in markdown files — no executable code, no schema changes, no API surface changes. A post-diff grep confirms zero remaining agentex.lib.types.acp references in the docs directory, so the migration is complete and consistent.

No files require special attention.

Important Files Changed

Filename Overview
agentex/docs/docs/api/types.md Updates 4 mkdocstrings directives in the comprehensive API types reference to the new canonical path.
agentex/docs/docs/acp/agentic/base.md Updates 3 mkdocstrings directives (CreateTaskParams, SendEventParams, CancelTaskParams) to the new canonical path.
agentex/docs/docs/agent_types/async/base.md Updates one Python import snippet and 3 mkdocstrings directives for the async base agent type to the new canonical path.
agentex/docs/docs/agent_types/async/temporal.md Updates one Python import snippet and 2 mkdocstrings directives for the async Temporal agent type to the new canonical path.
agentex/docs/docs/getting_started/project_structure.md Updates two Python import snippets (sync and async sections) to the new canonical path.
agentex/docs/docs/agent_types/sync.md Updates one Python import snippet and one mkdocstrings directive for SendMessageParams to the new canonical path.
agentex/docs/docs/api/overview.md Updates one Python import snippet for the API overview page to the new canonical path.
agentex/docs/docs/acp/agentic/temporal.md Updates one Python import snippet from agentex.lib.types.acp to agentex.protocol.acp.
agentex/docs/docs/concepts/streaming.md Updates one Python import snippet for SendEventParams in the streaming concept guide to the new canonical path.
agentex/docs/docs/temporal_development/openai_integration.md Updates one Python import snippet for SendEventParams in the OpenAI integration guide to the new canonical path.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["10 markdown doc files\n(code samples + mkdocstrings directives)"]
    B["agentex.lib.types.acp\n(legacy path — back-compat shim)"]
    C["agentex.protocol.acp\n(canonical path — agentex-sdk ≥ 0.12.0)"]
    D["Types migrated:\nCreateTaskParams\nSendMessageParams\nSendEventParams\nCancelTaskParams"]

    A -->|"old import path"| B
    A -->|"new import path ✅"| C
    B -.->|"re-exports via shim"| C
    C --> D
Loading

Reviews (6): Last reviewed commit: "Merge branch 'main' into maxparke/agx1-2..." | Re-trigger Greptile

@max-parke-scale max-parke-scale requested a review from a team as a code owner May 27, 2026 14:59
@max-parke-scale max-parke-scale force-pushed the maxparke/agx1-292-docs-canonical-protocol-paths branch from 165038d to 5d283e4 Compare June 8, 2026 19:37
max-parke-scale added a commit that referenced this pull request Jun 8, 2026
#254 migrated the docs' mkdocstrings directives to agentex.protocol.acp.* (scale-agentex-python#371, first released in agentex-sdk 0.11.5). The doc build installs the frozen lock pinned at 0.9.4, so griffe could not collect the symbols and `mkdocs build` aborted.

Bumping floors openai-agents>=0.14.3 (requires websockets>=15), which conflicts with the backend's websockets~=14.2 pin; relaxed to ~=15.0 (backend doesn't import websockets; uvicorn 0.35 supports 15). Cascades openai-agents 0.4.2->0.14.8, openai 2.24->2.41, temporalio 1.23->1.28.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@max-parke-scale max-parke-scale force-pushed the maxparke/agx1-292-docs-canonical-protocol-paths branch from 72a1eec to 6d3bc0e Compare June 8, 2026 20:35
@max-parke-scale max-parke-scale changed the base branch from main to maxparke/agx1-292-docs-build-isolation June 8, 2026 20:35
max-parke-scale added a commit that referenced this pull request Jun 9, 2026
## Summary

Decouples the documentation build from the backend's workspace `uv.lock`
so documenting a newly released SDK API surface no longer forces backend
dependency bumps.

## Problem

The mkdocs site documents the published `agentex` SDK via mkdocstrings,
which introspects the *installed* `agentex` package. The build installed
it from the frozen workspace lock (`uv sync --group docs`), pinning the
docs to whatever `agentex-sdk` the backend's lock resolved. Documenting
a new path like `agentex.protocol.*` (released in `agentex-sdk` 0.11.5)
therefore required bumping `agentex-sdk` in the lock — and because every
protocol-supporting SDK floors `openai-agents>=0.14.3` (→
`websockets>=15`) and `temporalio>=1.26`, that cascaded backend-runtime
bumps the docs don't need.

## Change

Docs deps now live in `agentex/docs/requirements.txt` and install into
an ephemeral environment, independent of the workspace lock:

- **CI** (`ci.yml`, `build-agentex.yml`) and **Makefile** (`serve-docs`,
`build-docs`): `uv run --isolated --no-project --with-requirements
requirements.txt mkdocs build`
- **Dockerfile** `docs-builder` stage: `uv pip install --system -r
docs/requirements.txt` (honors `UV_INDEX_URL` for private-index prod
builds)

The workspace lock and backend dependency resolution are untouched —
**zero `pyproject.toml` / `uv.lock` changes**. Docs always render
against the latest published SDK.

## Verified

- Isolated `mkdocs build` green locally — griffe introspects an
ephemeral uv env, not `.venv`.
- `make build-docs` green.

## Notes

- The `docs` dependency-group in `agentex/pyproject.toml` is now unused
by the build (left in place; `install-docs` still references it).
Removing it + relocking is a trivial follow-up.
- [#254](#254) (canonical
`agentex.protocol.acp` doc paths) stacks on this branch and goes green
because the isolated build pulls `agentex-sdk>=0.12.0`.

🧑‍💻🤖 — posted via [Claude Code](https://claude.com/claude-code)
<!-- claude-code -->

<!-- greptile_comment -->

<h3>Greptile Summary</h3>

This PR decouples the mkdocs documentation build from the workspace
`uv.lock` by introducing `agentex/docs/requirements.txt` and switching
all build paths (CI, Makefile, Dockerfile) to an isolated `uv`
invocation that installs directly from that file. Backend runtime
dependencies are completely untouched.

- **New `docs/requirements.txt`**: `agentex-sdk>=0.12.0` floats so the
docs always track the latest SDK release; the mkdocs toolchain
(`mkdocs`, `mkdocs-material`, `mkdocstrings-python`, etc.) is pinned to
known-good versions with Dependabot keeping them current.
- **CI & Makefile**: All `uv sync --group docs` invocations replaced
with `uv run --isolated --no-project --with-requirements
requirements.txt mkdocs build`; the docs job in `ci.yml` intentionally
omits uv caching to always resolve the latest SDK.
- **Dockerfile `docs-builder` stage**: Now runs `uv pip install --system
-r docs/requirements.txt` with a `UV_INDEX_URL` conditional preserved
for private-index production builds; the `docs` dependency group removed
from both `pyproject.toml` files and `uv.lock`.

<details><summary><h3>Confidence Score: 5/5</h3></summary>

Safe to merge — build isolation is well-structured and backend
dependencies are untouched.

The change is purely mechanical: three build surfaces (CI workflows,
Makefile, Dockerfile) are updated in a consistent pattern, all verified
locally by the author. Backend runtime dependencies and uv.lock are
untouched.

agentex/Dockerfile — minor layer-ordering opportunity to avoid busting
the install cache on every markdown edit.
</details>

<h3>Important Files Changed</h3>

| Filename | Overview |
|----------|----------|
| .github/workflows/build-agentex.yml | Docs build step switched from uv
sync --group docs to isolated uv run --isolated --no-project
--with-requirements requirements.txt; no issues. |
| .github/workflows/ci.yml | Same isolated docs-build invocation as
build-agentex.yml; docs job intentionally omits uv caching to always
resolve the latest agentex-sdk. |
| agentex/Dockerfile | docs-builder stage now installs from
docs/requirements.txt via uv pip install; COPY of full docs/ before the
install step sacrifices Docker layer cache efficiency. |
| agentex/Makefile | Removed install-docs target; serve-docs and
build-docs now use isolated uv invocations consistent with CI. |
| agentex/docs/requirements.txt | New file with agentex-sdk>=0.12.0
floating and all mkdocs toolchain packages pinned to known-good
versions; clean. |
| agentex/pyproject.toml | Removed the docs dependency-group; workspace
lock is untouched. |
| pyproject.toml | Removed the top-level docs group that forwarded to
agentex[docs]; clean. |
| uv.lock | All docs-only packages removed from lock; backend runtime
dependencies untouched. |

</details>

<details><summary><h3>Flowchart</h3></summary>

```mermaid
%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph OLD["Before (workspace-coupled)"]
        A1["uv sync --group docs\n(reads uv.lock)"] --> B1["uv run mkdocs build"]
        A1 -.->|"forces lock bump\nfor new SDK APIs"| C1["agentex-sdk in uv.lock"]
    end

    subgraph NEW["After (isolated)"]
        A2["docs/requirements.txt\nagentex-sdk>=0.12.0 (float)\nmkdocs==1.6.1 (pinned)\n..."] --> B2["uv run --isolated --no-project\n--with-requirements requirements.txt\nmkdocs build"]
        A2 -.->|"no workspace lock\ninvolved"| C2["agentex-sdk from PyPI\n(latest >= 0.12.0)"]
    end

    subgraph DOCKER["Dockerfile docs-builder stage"]
        D1["COPY docs/requirements.txt"] --> D2["uv pip install --system\n-r docs/requirements.txt\n(UV_INDEX_URL conditional)"]
        D2 --> D3["COPY docs/ + src/"]
        D3 --> D4["mkdocs build"]
    end

    NEW --> DOCKER
```
</details>

<a
href="https://app.greptile.com/api/ide/cursor?prompt=Fix%20the%20following%201%20code%20review%20issue.%20Work%20through%20them%20one%20at%20a%20time%2C%20proposing%20concise%20fixes.%0A%0A---%0A%0A%23%23%23%20Issue%201%20of%201%0Aagentex%2FDockerfile%3A68-77%0AOnly%20%60docs%2Frequirements.txt%60%20is%20needed%20to%20run%20the%20install%20step%20%E2%80%94%20copying%20the%20entire%20%60docs%2F%60%20directory%20first%20means%20any%20change%20to%20a%20markdown%20file%20or%20config%20will%20bust%20the%20%60uv%20pip%20install%60%20cache%20layer%2C%20forcing%20a%20fresh%20package%20download%20on%20every%20docs%20edit.%20Copy%20just%20the%20requirements%20file%20for%20the%20install%2C%20then%20copy%20the%20rest%20of%20%60docs%2F%60.%0A%0A%60%60%60suggestion%0ACOPY%20%24%7BSOURCE_DIR%7D%2Fdocs%2Frequirements.txt%20docs%2Frequirements.txt%0A%23%20Docs%20build%20is%20decoupled%20from%20the%20workspace%20lock%3A%20install%20the%20toolchain%20%2B%20latest%0A%23%20SDK%20from%20docs%2Frequirements.txt%20so%20doc%20generation%20tracks%20SDK%20releases.%0ARUN%20if%20%5B%20-n%20%22%24%7BUV_INDEX_URL%7D%22%20%5D%3B%20then%20%5C%0A%20%20%20%20%20%20%20%20uv%20pip%20install%20--system%20--index-url%20%22%24%7BUV_INDEX_URL%7D%22%20-r%20docs%2Frequirements.txt%3B%20%5C%0A%20%20%20%20else%20%5C%0A%20%20%20%20%20%20%20%20uv%20pip%20install%20--system%20-r%20docs%2Frequirements.txt%3B%20%5C%0A%20%20%20%20fi%0ACOPY%20%24%7BSOURCE_DIR%7D%2Fdocs%2F%20docs%2F%0ACOPY%20%24%7BSOURCE_DIR%7D%2Fsrc%2F%20src%2F%0ARUN%20cd%20docs%20%26%26%20mkdocs%20build%0A%60%60%60%0A%0A&pr=286&platform=github"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCursorDark.svg?v=3"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCursor.svg?v=3"><img
alt="Fix All in Cursor"
src="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCursor.svg?v=3"
height="20"></picture></a> <a
href="https://app.greptile.com/ide/claude-code?prompt=Fix%20the%20following%201%20code%20review%20issue.%20Work%20through%20them%20one%20at%20a%20time%2C%20proposing%20concise%20fixes.%0A%0A---%0A%0A%23%23%23%20Issue%201%20of%201%0Aagentex%2FDockerfile%3A68-77%0AOnly%20%60docs%2Frequirements.txt%60%20is%20needed%20to%20run%20the%20install%20step%20%E2%80%94%20copying%20the%20entire%20%60docs%2F%60%20directory%20first%20means%20any%20change%20to%20a%20markdown%20file%20or%20config%20will%20bust%20the%20%60uv%20pip%20install%60%20cache%20layer%2C%20forcing%20a%20fresh%20package%20download%20on%20every%20docs%20edit.%20Copy%20just%20the%20requirements%20file%20for%20the%20install%2C%20then%20copy%20the%20rest%20of%20%60docs%2F%60.%0A%0A%60%60%60suggestion%0ACOPY%20%24%7BSOURCE_DIR%7D%2Fdocs%2Frequirements.txt%20docs%2Frequirements.txt%0A%23%20Docs%20build%20is%20decoupled%20from%20the%20workspace%20lock%3A%20install%20the%20toolchain%20%2B%20latest%0A%23%20SDK%20from%20docs%2Frequirements.txt%20so%20doc%20generation%20tracks%20SDK%20releases.%0ARUN%20if%20%5B%20-n%20%22%24%7BUV_INDEX_URL%7D%22%20%5D%3B%20then%20%5C%0A%20%20%20%20%20%20%20%20uv%20pip%20install%20--system%20--index-url%20%22%24%7BUV_INDEX_URL%7D%22%20-r%20docs%2Frequirements.txt%3B%20%5C%0A%20%20%20%20else%20%5C%0A%20%20%20%20%20%20%20%20uv%20pip%20install%20--system%20-r%20docs%2Frequirements.txt%3B%20%5C%0A%20%20%20%20fi%0ACOPY%20%24%7BSOURCE_DIR%7D%2Fdocs%2F%20docs%2F%0ACOPY%20%24%7BSOURCE_DIR%7D%2Fsrc%2F%20src%2F%0ARUN%20cd%20docs%20%26%26%20mkdocs%20build%0A%60%60%60%0A%0A&repo=scaleapi%2Fscale-agentex&pr=286&platform=github"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInClaudeDark.svg?v=3"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInClaude.svg?v=3"><img
alt="Fix All in Claude Code"
src="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInClaude.svg?v=3"
height="20"></picture></a> <a
href="https://app.greptile.com/api/ide/codex?prompt=IMPORTANT%3A%20Work%20in%20the%20repository%20%22scaleapi%2Fscale-agentex%22%20on%20the%20existing%20branch%20%22maxparke%2Fagx1-292-docs-build-isolation%22.%20Checkout%20that%20branch%20%E2%80%94%20do%20NOT%20create%20a%20new%20branch%20or%20open%20a%20new%20PR.%20Push%20your%20changes%20to%20%22maxparke%2Fagx1-292-docs-build-isolation%22.%0A%0AFix%20the%20following%201%20code%20review%20issue.%20Work%20through%20them%20one%20at%20a%20time%2C%20proposing%20concise%20fixes.%0A%0A---%0A%0A%23%23%23%20Issue%201%20of%201%0Aagentex%2FDockerfile%3A68-77%0AOnly%20%60docs%2Frequirements.txt%60%20is%20needed%20to%20run%20the%20install%20step%20%E2%80%94%20copying%20the%20entire%20%60docs%2F%60%20directory%20first%20means%20any%20change%20to%20a%20markdown%20file%20or%20config%20will%20bust%20the%20%60uv%20pip%20install%60%20cache%20layer%2C%20forcing%20a%20fresh%20package%20download%20on%20every%20docs%20edit.%20Copy%20just%20the%20requirements%20file%20for%20the%20install%2C%20then%20copy%20the%20rest%20of%20%60docs%2F%60.%0A%0A%60%60%60suggestion%0ACOPY%20%24%7BSOURCE_DIR%7D%2Fdocs%2Frequirements.txt%20docs%2Frequirements.txt%0A%23%20Docs%20build%20is%20decoupled%20from%20the%20workspace%20lock%3A%20install%20the%20toolchain%20%2B%20latest%0A%23%20SDK%20from%20docs%2Frequirements.txt%20so%20doc%20generation%20tracks%20SDK%20releases.%0ARUN%20if%20%5B%20-n%20%22%24%7BUV_INDEX_URL%7D%22%20%5D%3B%20then%20%5C%0A%20%20%20%20%20%20%20%20uv%20pip%20install%20--system%20--index-url%20%22%24%7BUV_INDEX_URL%7D%22%20-r%20docs%2Frequirements.txt%3B%20%5C%0A%20%20%20%20else%20%5C%0A%20%20%20%20%20%20%20%20uv%20pip%20install%20--system%20-r%20docs%2Frequirements.txt%3B%20%5C%0A%20%20%20%20fi%0ACOPY%20%24%7BSOURCE_DIR%7D%2Fdocs%2F%20docs%2F%0ACOPY%20%24%7BSOURCE_DIR%7D%2Fsrc%2F%20src%2F%0ARUN%20cd%20docs%20%26%26%20mkdocs%20build%0A%60%60%60%0A%0A&repo=scaleapi%2Fscale-agentex&pr=286&platform=github"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCodexDark.svg?v=3"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCodex.svg?v=3"><img
alt="Fix All in Codex"
src="https://greptile-static-assets.s3.amazonaws.com/badges/FixAllInCodex.svg?v=3"
height="20"></picture></a>

<details><summary>Prompt To Fix All With AI</summary>

`````markdown
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
agentex/Dockerfile:68-77
Only `docs/requirements.txt` is needed to run the install step — copying the entire `docs/` directory first means any change to a markdown file or config will bust the `uv pip install` cache layer, forcing a fresh package download on every docs edit. Copy just the requirements file for the install, then copy the rest of `docs/`.

```suggestion
COPY ${SOURCE_DIR}/docs/requirements.txt docs/requirements.txt
# Docs build is decoupled from the workspace lock: install the toolchain
+ latest
# SDK from docs/requirements.txt so doc generation tracks SDK releases.
RUN if [ -n "${UV_INDEX_URL}" ]; then \
uv pip install --system --index-url "${UV_INDEX_URL}" -r
docs/requirements.txt; \
    else \
        uv pip install --system -r docs/requirements.txt; \
    fi
COPY ${SOURCE_DIR}/docs/ docs/
COPY ${SOURCE_DIR}/src/ src/
RUN cd docs && mkdocs build
```

`````

</details>

<sub>Reviews (3): Last reviewed commit: ["build(docs): drop the
now-unused docs
de..."](1afad5c)
| [Re-trigger
Greptile](https://app.greptile.com/api/retrigger?id=36304983)</sub>

<!-- /greptile_comment -->

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Base automatically changed from maxparke/agx1-292-docs-build-isolation to main June 9, 2026 02:25
Protocol-shape types (RPCMethod, CreateTaskParams, SendMessageParams,
SendEventParams, CancelTaskParams) moved from agentex.lib.types.acp to
the new canonical agentex.protocol.acp location in
scaleapi/scale-agentex-python#371. The old path still works via a
back-compat shim, but scaffolded user code following these docs should
start on the canonical path.

Updates:
- 8 `from agentex.lib.types.acp import ...` imports in code samples
- 2 `::: agentex.lib.types.acp.X` mkdocstrings references in API docs

No content / behavior changes; same classes, new import path.

The other lib/types/* modules (tracing, agent_card, credentials, etc.)
stay on the old path because they have heavier transitive deps and
weren't migrated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@max-parke-scale max-parke-scale force-pushed the maxparke/agx1-292-docs-canonical-protocol-paths branch from 6d3bc0e to 5a42081 Compare June 9, 2026 02:31
@max-parke-scale max-parke-scale enabled auto-merge (squash) June 9, 2026 15:43
@max-parke-scale max-parke-scale merged commit a453d47 into main Jun 9, 2026
28 of 30 checks passed
@max-parke-scale max-parke-scale deleted the maxparke/agx1-292-docs-canonical-protocol-paths branch June 9, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants