Skip to content
This repository was archived by the owner on Apr 17, 2026. It is now read-only.
This repository was archived by the owner on Apr 17, 2026. It is now read-only.

deferred tool registry and ToolSearch for large toolsets #66

Description

@yai-dev

Summary

Implement deferred tool loading and a ToolSearch path for large toolsets in the current architecture.

Background

As the plugin/capability ecosystem grows, eagerly injecting full schemas for every tool into every prompt becomes expensive and harms model accuracy.

Current Architecture Note

This should target the current @agentrail/app + @agentrail/capabilities split rather than the older host/tools package model.

Proposed Design

  1. Introduce a deferred-tool registry in the current host/app layer
  2. Expose a ToolSearch runtime tool that can fetch full schemas on demand
  3. Defer eligible tool sources by default where prompt size would otherwise grow too large
  4. Keep a clearly defined eager-tool allowlist for core execution tools

Affected Areas

  • host/tool assembly in packages/app
  • runtime tool/capability exports in packages/capabilities
  • prompt/tool inventory construction paths

Acceptance Criteria

  • Deferred tool names can be listed without full schemas in the prompt
  • ToolSearch can return full schemas for selected/matched tools
  • Core execution tools remain eager
  • Integration tests prove a deferred tool can be searched and then called successfully
  • No regression for agents that use only eager tools

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureDesign and structural concernsenhancementNew feature or requesthostRelated to @agentrail/host package

    Projects

    Status
    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions