Skip to content

Add RuntimeConfig three-toggle switch layer - #214

Closed
H-maximedelpit wants to merge 1 commit into
claude/sdk-local-modefrom
maxdpt/runtime-config
Closed

H-maximedelpit wants to merge 1 commit into
claude/sdk-local-modefrom
maxdpt/runtime-config

Conversation

@H-maximedelpit

@H-maximedelpit H-maximedelpit commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Fork of PR #185 (local mode / Client.local) — opened as a Draft so it does not touch that PR's own branch or implementation.

Adds hai_agents_runtime: a small, hand-written sibling package to pick where each of the three parts of an agent task runs — agent, environment, model — and get an ordinary Client back. Instantiate RuntimeConfig; presets cloud()/local() are shorthand; override any toggle with .with_().

  • Inference toggle is deliberately simple: H's cloud (Inference.cloud()) or a model you host by URL (Inference.self_hosted(url)).
  • Cloud agent -> Client() (unchanged). User-device agent -> Client.local() (from [claude] Local mode: Client.local() + LocalRuntime (generated from sdk-codegen) #185), with a self-hosted model endpoint handed to the runtime at spawn and the cloud key withheld.
  • The local agent runtime ships as an opt-in extra: local-agent (compiled binary, public) / local-agent-src (source, internal via private CodeArtifact). A user_device config fails at construction with a clear message if neither is installed.
  • Crossing rule kept: a config that would send a screenshot across the internet twice per step is refused at construction.

Builds on #185 (Client.local); the runtime spawn_env hook is hcompai/agent_platform#1452. Regen-proof hand-written sibling, not inside hai_agents. Draft — experimental, interface may change.

Depends on / builds on

@H-maximedelpit
H-maximedelpit changed the base branch from main to claude/sdk-local-mode September 23, 2026 21:08

@adeprezh adeprezh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, will need a bump of agent-interface and agp-types before merging:

uv lock -P agent-interface
uv lock -P agp-types
uv sync

@abonneth

abonneth commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Superseded by #222

@abonneth abonneth closed this Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants