Skip to content

RFE: Make agent pluggable #431

Closed
Closed

Description

@cgwalters

Hi, I want to formally propose making the agent core pluggable and not hardwired to Claude Code. I care about FOSS, and model choice among other things.

Any concerns? Feel free to 👍 or 👎 too.

Activity

  1. cgwalters commented on Dec 15, 2025

    @cgwalters
    Author

    BTW I only recently discovered https://agentclientprotocol.com/ exists. I think it makes a ton of sense to use it here - it's implemented by multiple tools, including https://github.com/block/goose/ and I also found https://github.com/sst/opencode which is quite nice too.

  2. jeremyeder commented on Dec 15, 2025

    @jeremyeder
    Contributor

    @amber are you still with us?

  3. github-actions commented on Dec 15, 2025

    @github-actions
    Contributor

    Amber Change Summary

    The following files were modified:

     components/backend/handlers/sessions.go            | 14 ++++++++
     components/backend/types/session.go                |  9 +++++
     .../manifests/base/crds/agenticsessions-crd.yaml   | 16 +++++++++
     components/manifests/base/operator-deployment.yaml |  7 ++++
     .../manifests/minikube/operator-deployment.yaml    |  7 ++++
     components/operator/internal/config/config.go      | 39 ++++++++++++++++++++++
     components/operator/internal/handlers/sessions.go  | 11 +++++-
     7 files changed, 102 insertions(+), 1 deletion(-)
    
    

    Next Steps:

    • Review that changes match the issue description
    • Verify no scope creep or unintended modifications
    • A PR will be created shortly for formal review

    🔍 View AI decision process (logs available for 90 days)

  4. github-actions commented on Dec 15, 2025

    @github-actions
    Contributor

    🤖 Amber has created a pull request to address this issue: #466

    The changes are ready for review. All automated checks will run on the PR.


    🔍 View AI decision process (logs available for 90 days)

  5. jeremyeder commented on Dec 15, 2025

    @jeremyeder
    Contributor

    Hey I'm not tracking these issues closely enough. Are there any others you need looked into? Ping me on them.


    These interfaces are intended to be pluggable. Checking and I did not put it into the constitution for this repo. Shame! I'll fix that and the bot.

    Offline, I used the @amber bot to add a generic adapter. We will have to tweak this a bit and do some renaming, but tldr yes I want it (esp gpt-oss once we have actual GPUs) and it can happen immediately if you want to do one for like OpenAI. It doesn't have to be exactly like below either way please have @MichaelClifford review.

    How to test RUNNER_TYPE: test with yaml and kubectl on minikube before PR.

    # Pluggable Agent Implementation - Minimal Patch Summary
    
    ## Changes Made
    
    ### 1. Created Agent Adapter Interface
    **File**: `components/runners/claude-code-runner/agent_adapter.py` (NEW)
    - Abstract base class `AgentAdapter` with required methods
    - Defines contract for all agent implementations
    
    ### 2. Updated Wrapper to Use Adapter Pattern
    **File**: `components/runners/claude-code-runner/wrapper.py` (MODIFIED)
    - Made `ClaudeCodeAdapter` inherit from `AgentAdapter`
    - Added `create_adapter()` factory function
    - Updated `main()` to read `RUNNER_TYPE` env var and create appropriate adapter
    - Defaults to "claude" if `RUNNER_TYPE` not set or invalid
    
    ### 3. Added runnerType to CRD
    **File**: `components/manifests/base/crds/agenticsessions-crd.yaml` (MODIFIED)
    - Added optional `runnerType` field to spec
    - Default: "claude"
    - Enum: ["claude"] (extensible for future types)
    
    ### 4. Updated Operator to Set RUNNER_TYPE
    **File**: `components/operator/internal/handlers/sessions.go` (MODIFIED)
    - Reads `spec.runnerType` from CR (defaults to "claude" if missing)
    - Sets `RUNNER_TYPE` environment variable in job pod
    
    ## How Users Configure Runner Type
    
    ### Option 1: Via CRD Spec (Recommended)
    Users set `spec.runnerType` in the `AgenticSession` Custom Resource:
    
    ```yaml
    apiVersion: vteam.ambient-code/v1alpha1
    kind: AgenticSession
    metadata:
      name: my-session
    spec:
      runnerType: "claude"  # Optional, defaults to "claude"
      repos:
        - url: "https://github.com/user/repo"
      initialPrompt: "Analyze this codebase"
    
  6. github-actions commented on Dec 15, 2025

    @github-actions
    Contributor

    Amber Change Summary

    The following files were modified:

     components/backend/handlers/sessions.go            | 14 ++++++++
     components/backend/types/session.go                |  9 +++++
     .../manifests/base/crds/agenticsessions-crd.yaml   | 16 +++++++++
     components/manifests/base/operator-deployment.yaml |  7 ++++
     .../manifests/minikube/operator-deployment.yaml    |  7 ++++
     components/operator/internal/config/config.go      | 39 ++++++++++++++++++++++
     components/operator/internal/handlers/sessions.go  | 11 +++++-
     7 files changed, 102 insertions(+), 1 deletion(-)
    
    

    Next Steps:


    🔍 View AI decision process (logs available for 90 days)

  7. github-actions commented on Dec 15, 2025

    @github-actions
    Contributor

    🤖 Amber pushed additional changes to the existing PR #466.


    🔍 View AI decision process (logs available for 90 days)

  8. cgwalters commented on Dec 15, 2025

    @cgwalters
    Author

    I'm fine with runnerType as a concept (though bikeshed: agentBackend or just agent ?).

    But isn't the harder work to revisit ADR 0004 and do something like the ACP instead? And since we don't allow configuring the runner image right now (ref #364 ) we'd want to at least say also add one other tool that implements ACP (opencode, goose, etc.) into the default container image etc.

  9. cgwalters commented on Jan 9, 2026

    @cgwalters
    Author

    My team has mostly cut over to https://opencode.ai/ now, I'm pretty happy with it. It's fully FOSS, very flexible, well maintained and popular.

  10. Gkrumbach07 commented on Jan 23, 2026

    @Gkrumbach07
    Contributor

    Closing as resolved externally - team has migrated to opencode.ai which meets these needs.

  11. cgwalters commented on Feb 3, 2026

    @cgwalters
    Author

    Closing as resolved externally - team has migrated to opencode.ai which meets these needs.

    Wait but the backend for this project is still Claude Code and there's tons of usage of it across the project...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions