lloyal-agents API Reference
    Preparing search index...

    Class WebSearchTool

    Web search tool backed by a pluggable SearchProvider.

    Delegates to the provider's search method and returns an array of SearchResult objects. Use alongside FetchPageTool to let agents read full page content from promising results.

    Hierarchy

    • Tool<{ query: string }>
      • WebSearchTool
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    description: "Search the web. Returns results with titles, snippets, and URLs. Use fetch_page to read full content of promising results." = 'Search the web. Returns results with titles, snippets, and URLs. Use fetch_page to read full content of promising results.'

    Human-readable description shown to the model

    name: "web_search" = 'web_search'

    Tool name — used as the function identifier in tool calls

    parameters: JsonSchema = ...

    JSON Schema describing the tool's expected arguments

    Methods

    • Execute the tool with parsed arguments

      Called by the agent pool when the model emits a tool call matching this tool's name. The return value is JSON-serialized and prefilled back into the agent's context as a tool result.

      Returns an Effection Operation — implement as a generator method. The operation runs inside the agent pool's scope, so it has access to Ctx, Store, and Events contexts for nested agent spawning.

      Parameters

      • args: { query: string }

        Parsed arguments from the model's tool call

      Returns Operation<unknown>

      Tool result (will be JSON-serialized)