feat: add ClaudeAgentRunner using claude-agent-sdk#245
Merged
DhavalRepo18 merged 20 commits intomainfrom Apr 7, 2026
Merged
Conversation
Closes #244 - Add `src/agent/claude_agent/` subpackage with `ClaudeAgentRunner` that implements `AgentRunner` via the claude-agent-sdk agentic loop - Wire the same IoT/FMSR/TSFM/utilities/WO MCP servers as stdio servers via `ClaudeAgentOptions.mcp_servers` - Add `claude-agent` CLI entry point (`agent.claude_agent.cli:main`) - Add `claude-agent-sdk>=0.0.14` to project dependencies - Export `ClaudeAgentRunner` from `agent.__init__` - Add 7 unit tests (all pass, no real API calls) Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
…_execute/models - Delete src/agent/models.py - Add AgentResult to src/agent/plan_execute/models.py alongside Plan/PlanStep/StepResult - Update AgentRunner ABC and all subclasses to use AgentResult - Export AgentResult from agent.__init__ Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
…stratorResult for plan-execute - src/agent/models.py: AgentResult(question, answer, history: Any) — thin base result for all AgentRunner subclasses; history type TBD - src/agent/plan_execute/models.py: OrchestratorResult(question, answer, plan, history: list[StepResult]) — kept for PlanExecuteRunner with full plan/step-result detail - ClaudeAgentRunner.run() returns AgentResult(history=None) - AgentRunner ABC return type is AgentResult Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
…OPIC_BASE_URL Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
…tellm_proxy/ model ID Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
…y/ model ID Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
…tool use Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
…K message stream Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
…execute Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
Add output field to ToolCall and register a PostToolUse hook so the MCP server response is attached to each ToolCall in the trajectory. Tool outputs are flushed onto the previous turn's calls when the next AssistantMessage or ResultMessage arrives. Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
The SDK passes tool_response as a plain string, not a nested dict. The hook now handles both string and dict responses gracefully. Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
Collaborator
Author
|
@DhavalRepo18 I have implement a preliminary trajectory in claude agent (related to #239). |
DhavalRepo18
approved these changes
Apr 7, 2026
| text: str | ||
| tool_calls: list[ToolCall] = field(default_factory=list) | ||
| input_tokens: int = 0 | ||
| output_tokens: int = 0 |
Collaborator
There was a problem hiding this comment.
There are reasoning model and their output schema are different. Pleasr see LLM vs LRM.
caroline-cahill
pushed a commit
to jasonlee-1024/AssetOpsBench
that referenced
this pull request
Apr 29, 2026
feat: add ClaudeAgentRunner using claude-agent-sdk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
$(cat <<'EOF'
Closes #244
Summary
src/agent/claude_agent/subpackage withClaudeAgentRunnerthat implements theAgentRunnerABC using theclaude-agent-sdkagentic loopClaudeAgentOptions.mcp_servers— no custom plan loop neededclaude-agentCLI entry point backed byagent.claude_agent.cli:mainclaude-agent-sdkto project dependenciesClaudeAgentRunnerfromagent.__init__Usage
Or programmatically:
Test plan
uv run pytest src/agent/claude_agent/tests/ -v— 7 passeduv run pytest src/ -v -k "not integration"— 185 passed (1 pre-existing CouchDB failure unrelated to this PR)EOF
)