Skip to content

agent-sdk-ts parity: Plugins + custom tool loading (plugin model + directory loader + remote support) (deferred) #662

@enyst

Description

@enyst

agent-sdk-ts is basically a transpilation of the original python SDK that we can find at enyst/agent-sdk (it’s a fork for our use). Clone yourself agent-sdk so you have the original codebase and you can understand the code deeply before transpiling.

Gap

Parity doc lists Python plugin/custom tool support missing in TS:

  • plugin data model
  • load tools from directories
  • remote custom tools support

TS currently expects tools to be provided programmatically and RemoteConversation sends only a tool name list.

Python reference

  • openhands-sdk/openhands/sdk/plugin/*
  • tool loading in openhands-sdk/openhands/sdk/agent/* / tool/*

TS locations

  • packages/agent-sdk-ts/src/tools/*
  • packages/agent-sdk-ts/src/sdk/runtime/Agent.ts (tool registration)
  • packages/agent-sdk-ts/src/sdk/conversation/RemoteConversation.ts (tool list sent to agent-server)

Implementation plan

  1. Define a TS plugin model (JSON schema) matching the minimum Python plugin metadata.
  2. Implement plugin discovery:
    • load from a configured directory (workspace + ~/.openhands)
    • validate schemas and tool definitions
  3. Add custom tool loader:
    • map plugin tool definitions → ToolDefinition instances
  4. Remote support:
    • include custom tool schemas when starting RemoteConversation (if agent-server supports it)
    • or provide a compatibility layer that uploads plugin manifests first.
  5. Add tests with fixture plugin directories.

Acceptance criteria

  • Users can drop a plugin/tool into a directory and have it become available without code changes.
  • RemoteConversation can optionally include custom tools (or a clear error if server can’t).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions