[claude] Local mode: Client.local() + LocalRuntime (generated from sdk-codegen)#185
Draft
cm2435-hcomp wants to merge 7 commits into
Draft
[claude] Local mode: Client.local() + LocalRuntime (generated from sdk-codegen)#185cm2435-hcomp wants to merge 7 commits into
cm2435-hcomp wants to merge 7 commits into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Task-8 audit: every local-mode test exercises a public entry point and guards a likely regression; no scaffolding to prune. Only change is an isort fix in test_client_local.py flagged by ruff. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
Adds local execution to the Python SDK (plan 002 of
eng_plans/30-06-2026-agent-api-local-runtime):A new
hai_agents.localpackage (LocalRuntime+Client.local/AsyncClient.local) manages thehai_agent_runtimebinary — verified install, loopback spawn with a generated bearer token, health poll, cross-process attach/force-kill — then hands back a normalClientpointed at the local endpoint. Sessions, polling, custom tools, and answer schemas work unchanged.Why
Local execution should be a first-class SDK target, not a HoloDesktop-private path. Base
hai_agentsstays lightweight —import hai_agentsnever loadshai_agents.localor touches the network; local mode is opt-in via thelocalextra.How
This mirror's
src/hai_agents/is Fern-generated output; the hand-written local-mode code lives as.staticoverlays inagent_platform(companion PR #1452) and is copied in bygenerate.sh. This PR carries the generated result plus the mirror-ownedpyproject.toml(thelocalextra) and tests.Validation
HAI_AGENT_LOCAL_BINARY_PATH(spawn, health,shutdown_if_idlethrough the generated client)⛔ SHIP-GATE
The manifest's 3 literals (version + 2 sha256s) come from the overlay in #1452 and must repoint to the plan-005 release binary before merge.
Notes
Companion (required): agent_platform #1452 (the overlays). Consumer: holo-desktop-cli (plan 003) depends on the published
hai-agents[local].🤖 Generated with Claude Code