Skip to content

Commit a484c0a

Browse files
Minimal Claude Agent SDK support (#212)
* Add Claude SDK dependencies and env vars * Add minimal Claude activity wrapper * Add Claude MVP example workflow and worker setup * Add basic text streaming to UI * Add MVP documentation and roadmap * Fix manifest validation - add required fields and Docker config * Fix import: StreamTaskMessageDelta is in task_message_update * Use relative workspace path and fix determinism issue * Fix workflow import path * Add .gitignore for workspace and env files * works but no context * claude sdk tool callign. works! * Add session resume, tool call streaming, and subagent support - Session resume: Maintain conversation context across turns via session_id - Tool streaming: Stream ToolRequestContent/ToolResponseContent to UI - Handle UserMessage as tool results (when permission_mode=acceptEdits) - Subagent support: Task tool with nested tracing spans - Add AgentDefinition imports and example subagents (code-reviewer, file-organizer) - Update documentation with subagent examples - Fix ContextInterceptor to support run_claude_agent_activity * Fix AgentDefinition serialization - reconstruct dataclass instances in activity * Fix tracing API - use adk.tracing.span() directly * subagent tracing support * working state, updated readme * fix context contuinuiation * logging cleanup * switch from manual parsing to hooks * claude agent sdk readme updated * fix linting * update docs with caveats * updated agent workspace logic --------- Co-authored-by: Prassanna Ravishankar <prassanna.ravishankar@scale.com>
1 parent fb9c0f9 commit a484c0a

File tree

19 files changed

+1592
-4
lines changed

19 files changed

+1592
-4
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ Brewfile.lock.json
1616

1717
.DS_Store
1818

19-
examples/**/uv.lock
19+
examples/**/uv.lock
20+
21+
# Claude workspace directories
22+
.claude-workspace/
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
build/
8+
develop-eggs/
9+
dist/
10+
downloads/
11+
eggs/
12+
.eggs/
13+
lib/
14+
lib64/
15+
parts/
16+
sdist/
17+
var/
18+
wheels/
19+
*.egg-info/
20+
.installed.cfg
21+
*.egg
22+
23+
# Environments
24+
.env**
25+
.venv
26+
env/
27+
venv/
28+
ENV/
29+
env.bak/
30+
venv.bak/
31+
32+
# IDE
33+
.idea/
34+
.vscode/
35+
*.swp
36+
*.swo
37+
38+
# Git
39+
.git
40+
.gitignore
41+
42+
# Misc
43+
.DS_Store
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Local environment variables (contains secrets)
2+
.env.local
3+
4+
# Workspace directory (created at runtime)
5+
workspace/
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# syntax=docker/dockerfile:1.3
2+
FROM python:3.12-slim
3+
COPY --from=ghcr.io/astral-sh/uv:0.6.4 /uv /uvx /bin/
4+
5+
# Install system dependencies
6+
RUN apt-get update && apt-get install -y \
7+
htop \
8+
vim \
9+
curl \
10+
tar \
11+
python3-dev \
12+
postgresql-client \
13+
build-essential \
14+
libpq-dev \
15+
gcc \
16+
cmake \
17+
netcat-openbsd \
18+
nodejs \
19+
npm \
20+
&& apt-get clean \
21+
&& rm -rf /var/lib/apt/lists/**
22+
23+
# Install tctl (Temporal CLI)
24+
RUN curl -L https://github.com/temporalio/tctl/releases/download/v1.18.1/tctl_1.18.1_linux_arm64.tar.gz -o /tmp/tctl.tar.gz && \
25+
tar -xzf /tmp/tctl.tar.gz -C /usr/local/bin && \
26+
chmod +x /usr/local/bin/tctl && \
27+
rm /tmp/tctl.tar.gz
28+
29+
RUN uv pip install --system --upgrade pip setuptools wheel
30+
31+
ENV UV_HTTP_TIMEOUT=1000
32+
33+
# Copy pyproject.toml and README.md to install dependencies
34+
COPY 060_open_ai_agents_sdk_hello_world/pyproject.toml /app/060_open_ai_agents_sdk_hello_world/pyproject.toml
35+
COPY 060_open_ai_agents_sdk_hello_world/README.md /app/060_open_ai_agents_sdk_hello_world/README.md
36+
37+
WORKDIR /app/060_open_ai_agents_sdk_hello_world
38+
39+
# Copy the project code
40+
COPY 060_open_ai_agents_sdk_hello_world/project /app/060_open_ai_agents_sdk_hello_world/project
41+
42+
# Install the required Python packages from pyproject.toml
43+
RUN uv pip install --system .
44+
45+
WORKDIR /app/060_open_ai_agents_sdk_hello_world
46+
47+
48+
ENV PYTHONPATH=/app
49+
# Run the ACP server using uvicorn
50+
CMD ["uvicorn", "project.acp:acp", "--host", "0.0.0.0", "--port", "8000"]
51+
52+
# When we deploy the worker, we will replace the CMD with the following
53+
# CMD ["python", "-m", "run_worker"]

0 commit comments

Comments
 (0)