Introducing Harness Engine: portable agent runtimes for CAIPE #2405
sriaradhyula
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
TL;DR
Harness Engine is a provider-neutral execution layer for CAIPE. It lets the same agent-facing contract run on multiple agent harnesses while keeping channels, authorization, sessions, and streaming consistent.
The first implementation supports:
Existing agents do not need to migrate: an agent without a harness marker continues to use the default runtime. New harnesses are opt-in.
Why introduce a Harness Engine?
Agent SDKs expose different models for sessions, memory, tools, sandboxes, prompts, streaming, and multi-agent delegation. Binding CAIPE directly to each SDK would push provider-specific behavior into the UI, bots, CLI, and authorization paths.
Harness Engine creates one portable control and execution contract, with explicit provider extensions where portability is not practical. This gives CAIPE:
SpecKit design package
PR #2401 includes a complete SpecKit package so the architecture can be reviewed from requirements through executable contracts:
Scope boundary
langchain-deepagentsduring the staged transition.The rendered architecture and source diagrams immediately below are generated from the editable Excalidraw sources in the PR.
Request-routing architecture
The Harness Gateway lives at the BFF boundary. It resolves the selected agent, applies the existing authorization checks, chooses the runtime, and translates the canonical stream back to the client contract. The existing default-runtime path remains intact.
Detailed Harness Engine architecture
The detailed view distinguishes implemented paths from planned or optional integrations and shows how the unchanged Dynamic Agents default remains backward compatible.
Open the editable CAIPE system architecture
High-level source graph
The source graph maps the public routes and UI through the BFF Harness Gateway into the Harness Engine service, adapters, persistence, deployment assets, contracts, and tests.
Open the editable Harness Engine source graph
Portable agent blueprint
The descriptor registry tells the UI which fields a harness needs, which capabilities it supports, and which provider extensions are valid. The UI can therefore render a harness-aware agent form without hard-coding every provider SDK.
Portable interfaces cover:
A harness may combine providers behind these interfaces—for example, a Claude Agent SDK adapter can use an AgentCore-backed memory implementation—when the selected capabilities are compatible.
Session and reconnect lifecycle
The CAIPE session manager owns the durable client-facing session. A provider-specific session manager can be selected behind it, and the binding between CAIPE and provider session IDs is persisted. Provider execution continues independently of the HTTP connection.
User experience
Agent catalog
The catalog shows which harness backs each agent while preserving the existing agent workflow.
Harness-aware agent creation
Selecting a harness changes the form to show supported capabilities and required provider configuration.
Harness identity in chat
Chat displays both the agent name and harness identity so parallel conversations remain distinguishable.
The screenshots contain only generic sample data and intentionally omit deployment addresses, user identities, credentials, provider resource identifiers, and organization-specific configuration.
Implementation status
The draft implementation includes:
Backward compatibility is intentional:
Current boundaries
The new adapters are experimental and are not yet a claim of exact feature parity with the default runtime. Follow-up work includes:
Centralized authorization work remains complementary and independently mergeable. Harness Gateway currently preserves the existing BFF/OpenFGA checks before dispatching a request.
Pull requests and related design
Feedback requested
We would especially value feedback on:
Please review the draft PRs, try the harness-aware workflows, and share use cases for additional SDKs or sandbox providers.
All reactions