CrewAI Tools for Brazil CVM Filings

Building CrewAI CVM filings agents? Expose apicvm as tools: resolve company, list documents, download file. Crews should cite document UUIDs. This is not a hosted CrewAI integration.

The problem

Multi-agent research crews that mention Brazilian issuers need primary filings, not blog summaries. Portal HTML is a poor tool surface. HTTPS JSON with Bearer auth fits tool-calling loops.

Tool sketch

import os, requests
from crewai.tools import tool

BASE = os.environ["APICVM_URL"]
H = {"Authorization": f"Bearer {os.environ['APICVM_KEY']}"}

@tool("List Brazil CVM filings")
def list_cvm_filings(ticker: str, doc_type: str = "DFP", year: int = 2024) -> str:
    """List CVM documents for a B3 ticker via apicvm."""
    r = requests.get(
        f"{BASE}/v1/documents",
        headers=H,
        params={"ticker": ticker, "type": doc_type, "year": year, "perPage": 20},
        timeout=60,
    )
    r.raise_for_status()
    rows = r.json()["data"]
    return "\n".join(f"{d['id']}\t{d['name']}" for d in rows)

Crew roles that fit

  • Researcher: list FRE risk sections (name filter) for a ticker
  • Archivist: download PDF bytes to object storage by UUID
  • Analyst: wait for async extraction callbacks before quoting page text

Do not invent a sync "get full FRE text" tool — extraction is async via callback (Pro).

Current limitations

  • No push notifications for new filings; crews must re-list
  • Rate limits apply; share one key carefully across parallel agents
  • Empty lists can be corpus gaps

Next steps

Ready to integrate?

Get an API key and start querying Brazilian CVM filings programmatically.