Skip to content

Add optional agent-kernel execution backend (FlowExecutor via Kernel) #89

@dgenio

Description

@dgenio

Why

weaver-spec BOUNDARIES.md states:

ChainWeaver orchestrates flows but does not execute capabilities directly. Each tool-invocation step in a flow is delegated to agent-kernel via the standard CapabilityToken + RoutingDecision contract.

Currently, ChainWeaver's FlowExecutor executes tools directly. While this works for standalone usage, it conflicts with the spec boundary when used as part of the Weaver Stack. The fix is an optional kernel-backed executor that coexists with the standalone executor.

Scope

A new executor/driver that:

  1. Invokes flow steps via agent-kernel CapabilityToken requests
  2. Returns Frame / Handle objects (no raw outputs into LLM context)
  3. Respects the authorization and audit path (I-02, I-07)

Acceptance Criteria

  • New executor class (e.g., KernelBackedExecutor) implementing the same interface as the existing FlowExecutor
  • Each step:
    • Requests a CapabilityToken from agent-kernel
    • Receives execution results as Frame objects
    • Passes Frame data (not raw output) to subsequent steps
  • README section: "Kernel-backed execution" explaining:
    • When to use it (Weaver Stack integration) vs. standalone executor
    • Configuration required (kernel endpoint, auth)
  • At least one integration test demonstrating a multi-step flow executing via the kernel path
  • The standalone FlowExecutor remains fully functional (no breaking changes to existing users)

References

Context

Part of Milestone E0 — Connect + Align Boundaries.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions