Skip to content

Commit 51c5b42

Browse files
update docs with caveats
1 parent 71375d8 commit 51c5b42

File tree

1 file changed

+58
-1
lines changed
  • examples/tutorials/10_async/10_temporal/090_claude_agents_sdk_mvp

1 file changed

+58
-1
lines changed

examples/tutorials/10_async/10_temporal/090_claude_agents_sdk_mvp/README.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
Integration of Claude Agents SDK with AgentEx's Temporal-based orchestration platform. Claude agents run in durable workflows with real-time streaming to the AgentEx UI.
44

5+
> ⚠️ **Note**: This integration is designed for local agent development and single-worker deployments. For distributed multi-worker Kubernetes deployments, additional infrastructure is required (see [Deployment Considerations](#deployment-considerations) below).
6+
57
## Features
68

7-
- **Durable Execution** - Workflows survive restarts via Temporal's event sourcing
9+
- **Durable Execution** - Workflows survive restarts via Temporal's event sourcing (single-worker)
810
- **Session Resume** - Conversation context maintained across turns via `session_id`
911
- **Workspace Isolation** - Each task gets dedicated directory for file operations
1012
- **Real-time Streaming** - Text and tool calls stream to UI via Redis
@@ -117,6 +119,61 @@ claude_agents/
117119
└── post_tool_use
118120
```
119121

122+
## Deployment Considerations
123+
124+
This integration works well for local development and single-worker deployments. For distributed multi-worker production deployments, consider the following:
125+
126+
### ⚠️ Session Persistence (Multi-Worker)
127+
128+
**Current behavior**: Claude SDK sessions are tied to the worker process.
129+
130+
- **Local dev**: ✅ Works - session persists within single worker
131+
- **K8s multi-pod**: ⚠️ Session ID stored in Temporal state, but session itself lives in Claude CLI process
132+
- **Impact**: If task moves to different pod, session becomes invalid
133+
- **Infrastructure needed**: Session persistence layer or sticky routing to same pod
134+
135+
### ⚠️ Workspace Storage (Multi-Worker)
136+
137+
**Current behavior**: Workspaces are local directories (`./workspace/{task_id}`).
138+
139+
- **Local dev**: ✅ Works - single worker accesses all files
140+
- **K8s multi-pod**: ⚠️ Each pod has isolated filesystem
141+
- **Impact**: Files created by one pod are invisible to other pods
142+
- **Infrastructure needed**: Shared storage (NFS, EFS, GCS Fuse) via `CLAUDE_WORKSPACE_ROOT` env var
143+
144+
**Solution for production**:
145+
```bash
146+
# Mount shared filesystem (NFS, EFS, etc.) to all pods
147+
export CLAUDE_WORKSPACE_ROOT=/mnt/shared/workspaces
148+
149+
# All workers will now share workspace access
150+
```
151+
152+
### ℹ️ Filesystem-Based Configuration
153+
154+
**Current approach**: Agents and configuration are defined programmatically in code.
155+
156+
- **Not used**: `.claude/agents/`, `.claude/skills/`, `CLAUDE.md` files
157+
- **Why**: Aligns with AgentEx's code-as-configuration philosophy
158+
- **Trade-off**: More explicit and version-controlled, but can't leverage existing Claude configs
159+
- **To enable**: Would need to add `setting_sources=["project"]` to `ClaudeAgentOptions`
160+
161+
**Current approach** (programmatic config in workflow.py):
162+
```python
163+
subagents = {
164+
'code-reviewer': AgentDefinition(
165+
description='...',
166+
prompt='...',
167+
tools=['Read', 'Grep', 'Glob'],
168+
model='sonnet',
169+
),
170+
}
171+
```
172+
173+
---
174+
175+
**Summary**: The integration is production-ready for **single-worker deployments**. Multi-worker deployments require additional infrastructure for session persistence and workspace sharing.
176+
120177
## Quick Start
121178

122179
### Prerequisites

0 commit comments

Comments
 (0)