lloyal-agents API Reference
    Preparing search index...

    Class FetchPageTool

    Fetch a web page and extract readable article content.

    Uses the Fetch API with a 10-second timeout, then extracts the article body via linkedom + Readability. Content is truncated to maxChars (default 6000). PDF URLs are rejected early since binary content cannot be extracted as readable text.

    Hierarchy

    • Tool<{ url: string }>
      • FetchPageTool
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    description: "Fetch a web page and extract its article content. Returns readable text with title and excerpt. Use to read search results or follow links discovered in pages." = 'Fetch a web page and extract its article content. Returns readable text with title and excerpt. Use to read search results or follow links discovered in pages.'

    Human-readable description shown to the model

    name: "fetch_page" = 'fetch_page'

    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: { url: string }

        Parsed arguments from the model's tool call

      Returns Operation<unknown>

      Tool result (will be JSON-serialized)