Skip to content

Add RuntimeConfig three-toggle switch layer - #213

Closed
H-maximedelpit wants to merge 11 commits into
mainfrom
claude/runtime-config
Closed

H-maximedelpit wants to merge 11 commits into
mainfrom
claude/runtime-config

Conversation

@H-maximedelpit

Copy link
Copy Markdown
Contributor

Fork of PR185 (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.

cm2435-hcomp and others added 11 commits July 4, 2026 17:06
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>
# Conflicts:
#	pyproject.toml
#	src/hai_agents/client.py
#	tests/conftest.py
#	uv.lock
@H-maximedelpit
H-maximedelpit deleted the claude/runtime-config branch September 23, 2026 21:06
@H-maximedelpit
H-maximedelpit restored the claude/runtime-config branch September 23, 2026 21:16
@H-maximedelpit
H-maximedelpit deleted the claude/runtime-config branch September 23, 2026 21:18
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.

2 participants