Skip to content

Commit a453d47

Browse files
docs(agentex): use canonical agentex.protocol.acp import paths (#254)
> **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>
1 parent 94e7452 commit a453d47

10 files changed

Lines changed: 23 additions & 23 deletions

File tree

agentex/docs/docs/acp/agentic/base.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ async def process_workflow_step(params: SendEventParams):
157157

158158
Used in `@acp.on_task_create` for task initialization:
159159

160-
::: agentex.lib.types.acp.CreateTaskParams
160+
::: agentex.protocol.acp.CreateTaskParams
161161
options:
162162
heading_level: 4
163163
show_root_heading: false
@@ -167,7 +167,7 @@ Used in `@acp.on_task_create` for task initialization:
167167

168168
Used in `@acp.on_task_event_send` for processing events:
169169

170-
::: agentex.lib.types.acp.SendEventParams
170+
::: agentex.protocol.acp.SendEventParams
171171
options:
172172
heading_level: 4
173173
show_root_heading: false
@@ -177,7 +177,7 @@ Used in `@acp.on_task_event_send` for processing events:
177177

178178
Used in `@acp.on_task_cancel` for cleanup:
179179

180-
::: agentex.lib.types.acp.CancelTaskParams
180+
::: agentex.protocol.acp.CancelTaskParams
181181
options:
182182
heading_level: 4
183183
show_root_heading: false

agentex/docs/docs/acp/agentic/temporal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Instead of ACP handlers, you implement standard Temporal workflows:
4848
```python
4949
from temporalio import workflow
5050
from agentex import adk
51-
from agentex.lib.types.acp import CreateTaskParams, SendEventParams
51+
from agentex.protocol.acp import CreateTaskParams, SendEventParams
5252
from agentex.core.temporal.workflows.workflow import BaseWorkflow
5353
from agentex.core.temporal.types.workflow import SignalName
5454
from agentex.types.message_author import MessageAuthor

agentex/docs/docs/agent_types/async/base.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ sequenceDiagram
3939
```python
4040
from agentex.lib.sdk.fastacp.fastacp import FastACP
4141
from agentex.lib.types.fastacp import AsyncACPConfig
42-
from agentex.lib.types.acp import CreateTaskParams, SendEventParams, CancelTaskParams
42+
from agentex.protocol.acp import CreateTaskParams, SendEventParams, CancelTaskParams
4343
from agentex.lib import adk
4444

4545
# Create Base Async ACP server
@@ -78,7 +78,7 @@ async def handle_task_cancel(params: CancelTaskParams) -> None:
7878

7979
Used in `@acp.on_task_create` for task initialization:
8080

81-
::: agentex.lib.types.acp.CreateTaskParams
81+
::: agentex.protocol.acp.CreateTaskParams
8282
options:
8383
heading_level: 4
8484
show_root_heading: false
@@ -88,7 +88,7 @@ Used in `@acp.on_task_create` for task initialization:
8888

8989
Used in `@acp.on_task_event_send` for processing events:
9090

91-
::: agentex.lib.types.acp.SendEventParams
91+
::: agentex.protocol.acp.SendEventParams
9292
options:
9393
heading_level: 4
9494
show_root_heading: false
@@ -98,7 +98,7 @@ Used in `@acp.on_task_event_send` for processing events:
9898

9999
Used in `@acp.on_task_cancel` for cleanup:
100100

101-
::: agentex.lib.types.acp.CancelTaskParams
101+
::: agentex.protocol.acp.CancelTaskParams
102102
options:
103103
heading_level: 4
104104
show_root_heading: false

agentex/docs/docs/agent_types/async/temporal.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ sequenceDiagram
5151
```python
5252
from temporalio import workflow
5353
from agentex import adk
54-
from agentex.lib.types.acp import CreateTaskParams, SendEventParams
54+
from agentex.protocol.acp import CreateTaskParams, SendEventParams
5555
from agentex.core.temporal.workflows.workflow import BaseWorkflow
5656
from agentex.core.temporal.types.workflow import SignalName
5757
from agentex.types.message_author import MessageAuthor
@@ -159,7 +159,7 @@ if __name__ == "__main__":
159159

160160
Used in `@workflow.run` (replaces `@acp.on_task_create`):
161161

162-
::: agentex.lib.types.acp.CreateTaskParams
162+
::: agentex.protocol.acp.CreateTaskParams
163163
options:
164164
heading_level: 4
165165
show_root_heading: false
@@ -169,7 +169,7 @@ Used in `@workflow.run` (replaces `@acp.on_task_create`):
169169

170170
Used in `@workflow.signal(name=SignalName.RECEIVE_EVENT)` (replaces `@acp.on_task_event_send`):
171171

172-
::: agentex.lib.types.acp.SendEventParams
172+
::: agentex.protocol.acp.SendEventParams
173173
options:
174174
heading_level: 4
175175
show_root_heading: false

agentex/docs/docs/agent_types/sync.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ sequenceDiagram
3131

3232
```python
3333
from agentex.lib.sdk.fastacp.fastacp import FastACP
34-
from agentex.lib.types.acp import SendMessageParams
34+
from agentex.protocol.acp import SendMessageParams
3535
from agentex.types.text_content import TextContent
3636
from agentex.types.message_author import MessageAuthor
3737

@@ -61,7 +61,7 @@ async def handle_message(params: SendMessageParams):
6161

6262
The `@acp.on_message_send` handler receives:
6363

64-
::: agentex.lib.types.acp.SendMessageParams
64+
::: agentex.protocol.acp.SendMessageParams
6565
options:
6666
heading_level: 4
6767
show_root_heading: false

agentex/docs/docs/api/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Python library for use **WITHIN** your agent code. The ADK provides high-level a
6262
from agentex.types.task_message_content import TaskMessageContent
6363
from agentex.types.text_content import TextContent
6464
from agentex.types.message_author import MessageAuthor
65-
from agentex.lib.types.acp import SendMessageParams, CreateTaskParams, SendEventParams
65+
from agentex.protocol.acp import SendMessageParams, CreateTaskParams, SendEventParams
6666
from agentex.types.task import Task
6767
from agentex.types.event import Event
6868
```

agentex/docs/docs/api/types.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ Comprehensive API reference for all core object types in Agentex. These types ar
66

77
### CreateTaskParams
88

9-
::: agentex.lib.types.acp.CreateTaskParams
9+
::: agentex.protocol.acp.CreateTaskParams
1010

1111
### SendMessageParams
1212

13-
::: agentex.lib.types.acp.SendMessageParams
13+
::: agentex.protocol.acp.SendMessageParams
1414

1515
### SendEventParams
1616

17-
::: agentex.lib.types.acp.SendEventParams
17+
::: agentex.protocol.acp.SendEventParams
1818

1919
### CancelTaskParams
2020

21-
::: agentex.lib.types.acp.CancelTaskParams
21+
::: agentex.protocol.acp.CancelTaskParams
2222

2323
## Agent
2424

agentex/docs/docs/concepts/streaming.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Here's a complete example showing how to stream content in an Async Agent:
146146

147147
```python
148148
from agentex.lib import adk
149-
from agentex.lib.types.acp import SendEventParams
149+
from agentex.protocol.acp import SendEventParams
150150
from agentex.types.text_content import TextContent
151151
from agentex.types.task_message_delta import TextDelta
152152
from agentex.types.task_message_update import (

agentex/docs/docs/getting_started/project_structure.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Your ACP server defines how the agent responds to incoming messages. For sync ag
4242

4343
```python
4444
from agentex.lib.sdk.fastacp.fastacp import FastACP
45-
from agentex.lib.types.acp import SendMessageParams
45+
from agentex.protocol.acp import SendMessageParams
4646
from agentex.types.task_message_content import TaskMessageContent
4747
from agentex.types.text_content import TextContent
4848

@@ -111,7 +111,7 @@ The base async ACP server gives you a starting point for custom async implementa
111111
```python
112112
from agentex.lib.sdk.fastacp.fastacp import FastACP
113113
from agentex.lib.types.fastacp import AgenticBaseACPConfig
114-
from agentex.lib.types.acp import CreateTaskParams, SendEventParams, CancelTaskParams
114+
from agentex.protocol.acp import CreateTaskParams, SendEventParams, CancelTaskParams
115115

116116
# Create a base agentic ACP server
117117
acp = FastACP.create(
@@ -216,7 +216,7 @@ Your workflow is where all the agent logic lives. It's a class that Temporal man
216216
import json
217217
from temporalio import workflow
218218
from agentex.lib import adk
219-
from agentex.lib.types.acp import CreateTaskParams, SendEventParams
219+
from agentex.protocol.acp import CreateTaskParams, SendEventParams
220220
from agentex.lib.core.temporal.workflows.workflow import BaseWorkflow
221221
from agentex.lib.core.temporal.types.workflow import SignalName
222222
from agentex.types.text_content import TextContent

agentex/docs/docs/temporal_development/openai_integration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ The new streaming implementation uses Temporal's interceptor pattern to enable r
146146
# workflow.py
147147
from agents import Agent, Runner
148148
from agentex import adk
149-
from agentex.lib.types.acp import SendEventParams
149+
from agentex.protocol.acp import SendEventParams
150150
from agentex.lib.core.temporal.types.workflow import SignalName
151151
from agentex.types.text_content import TextContent
152152
from temporalio import workflow

0 commit comments

Comments
 (0)