Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:ANative Lab EvoAgentX RequestBase

From Leeroopedia
Knowledge Sources
Domains Tools, HTTP
Last Updated 2026-10-21 00:00 GMT

Overview

Concrete base class for HTTP request handling with HTML parsing and content extraction.

Description

The RequestBase class extends `BaseModule` with HTTP request handling using the `requests` library. It uses `BeautifulSoup` for HTML parsing and `html2text` for content conversion. Provides URL joining, response processing, and error handling. Serves as the foundation for request-based tools (Arxiv, RSS, search) — providing shared HTTP infrastructure.

Usage

  • Custom HTTP tools: Subclass `RequestBase` to implement API-specific request logic.
  • Content extraction: Use built-in HTML parsing to extract content from HTTP responses.
  • Shared infrastructure: Used by Arxiv, RSS, and search tools for common HTTP operations.

Code Reference

Source Location

Signature

class RequestBase(BaseModule):
    def __init__(self, ...)
    # HTTP request handling with requests library
    # BeautifulSoup for HTML parsing, html2text for content conversion
    # URL joining, response processing, error handling

Import

from evoagentx.tools.request_base import RequestBase

I/O Contract

Inputs

Name Type Required Description
url str Yes URL to request
params dict No Query parameters
headers dict No HTTP headers

Outputs

Name Type Description
response str Parsed content from HTTP response

Usage Examples

Subclass for Custom HTTP Tool

from evoagentx.tools.request_base import RequestBase

class MyAPITool(RequestBase):
    def fetch_data(self, endpoint: str) -> str:
        return self._make_request(url=endpoint)

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment