Minimal Claude Agent SDK support#212
Conversation
- 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
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
danielmillerp
left a comment
There was a problem hiding this comment.
Great job getting this together, my only feedback here is that we don't have a way of creating activities as tools since you have wrapped the whole agent loop as an activity. This is important because it enables us to do human in the loop and have idempotent tools. Maybe we can talk to Temporal team for a V1 version?
examples/tutorials/10_async/10_temporal/090_claude_agents_sdk_mvp/project/workflow.py
Outdated
Show resolved
Hide resolved
src/agentex/lib/core/temporal/plugins/claude_agents/activities.py
Outdated
Show resolved
Hide resolved
Regarding this, basically claude agent sdk doesn't offer too much control on what goes on within an agent call (thats offloaded to the agent). Basically the approach here has been to run the loop within an activity. But the loop itself just runs for one turn (maybe a multi-step turn). And then returns back with a session id. And when we make the next call "we resume" the session with the id and based on the user prompt. This allows us to do human in the loop. |
8bbaf31 to
3f31654
Compare
No description provided.