Repository navigation
Description
Context
AgentProfile UX needs one picker for launch profiles, but runtime switching is capability-limited:
- OpenHands conversations can switch only the LLM/profile live.
- ACP conversations can switch only the ACP model live, and only for the same provider/session when runtime model switching is supported.
- Changes to agent kind, ACP command, MCP, skills, instructions, condenser, verification, confirmation policy, or other launch-only settings require a new conversation.
Canvas has explored this as frontend runtime-plan logic, but the field semantics should not live only in UI code. The SDK owns the agent settings models, ACP provider capability flags, and conversation runtime metadata, so it should expose the compatibility contract that clients use.
Goal
Add a shared, tested runtime compatibility planner for AgentProfiles / materialized agent profile specs.
The planner should answer: for this running conversation and this target profile, is the profile current, live-switchable, or launch-only/incompatible with a reason?
Proposed API shape
Exact names can change, but the SDK should expose a pure function along these lines:
class ProfileRuntimePlan(BaseModel):
action: Literal["current", "switch_live", "disabled"]
mutable_fields: list[str] = []
reason: RuntimeIncompatibilityReason | None = None
RuntimeIncompatibilityReason = Literal[
"different_agent_kind",
"different_acp_provider",
"different_acp_command",
"different_acp_credentials",
"provider_does_not_support_runtime_switch",
"session_not_initialized",
"non_runtime_settings_differ",
"mcp_settings_differ",
"skills_settings_differ",
"instructions_differ",
"verification_not_runtime_switchable",
]Inputs should be normalized SDK-side data, not raw UI state. For example:
- current conversation runtime context: agent kind, effective launch settings snapshot, current model, ACP provider capabilities/session state
- target AgentProfile or materialized target settings
- optional active profile id/revision metadata
Compatibility rules to cover
OpenHands conversation:
- OpenHands target profile is live-switchable only when the effective difference is LLM config/profile.
- Any non-runtime setting difference disables live switching with a reason.
- ACP target profile always requires a new conversation.
ACP conversation:
- ACP target profile is live-switchable only when all launch identity fields match and only
acp_modeldiffers. - Same-provider model switch also requires provider/runtime support and initialized session state.
- Different ACP provider/command/credentials/MCP/skills/instructions requires a new conversation.
- OpenHands target profile always requires a new conversation.
Acceptance criteria
- The compatibility planner is pure and exhaustively unit-tested across OpenHands and ACP cases.
- Reason values are stable enough for generated clients / Canvas to map to labels.
- The planner uses SDK-owned ACP provider capability flags instead of duplicating provider rules in Canvas.
- The planner can be used by both:
- conversation-start profile picker: all profiles selectable
- in-conversation picker: only
switch_liveprofiles actionable, disabled profiles visible with reason
- No path silently applies only part of a profile. If the whole profile cannot be applied live, the planner must not return
switch_live.
Why this matters for AgentProfiles
AgentProfile is a launch configuration, not just a model alias. A user selecting a profile must never think they switched skills, MCP, verification, command, or provider when only the model changed. Centralizing the compatibility plan in the SDK keeps the UX honest and prevents every client from inventing slightly different runtime-switch rules.
Activity
simonrosenberg commentedon Jun 15, 2026
Closing — superseded by a fresh, greenfield agent-profiles design that takes a different approach. The new work will be tracked separately.