Semantic Kernel Tools for Brazil CVM Filings

Building Semantic Kernel CVM filings plugins? Wrap apicvm HTTPS endpoints as native functions. Agents get resolve/list/download tools with stable document UUIDs — not portal scraping.

The problem

SK planners need deterministic tools. HTML scrapers break; /v1/documents returns structured metadata your plugin can serialize into chat context.

Plugin surface (suggested)

Function Endpoint
ResolveCompany GET /v1/companies/resolve
ListDocuments GET /v1/documents
DownloadFiling GET /v1/documents/:id/file

Example: list FRE for PETR4

import os, requests

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

def list_documents(ticker: str, doc_type: str, year: int):
    return requests.get(
        f"{BASE}/v1/documents",
        headers=H,
        params={"ticker": ticker, "type": doc_type, "year": year, "perPage": 20},
    ).json()["data"]

print([d["id"] for d in list_documents("PETR4", "FRE", 2024)[:5]])

Register the same function as a Semantic Kernel native tool in your host language (.NET or Python).

curl

curl -H "Authorization: Bearer $APICVM_KEY" \
  "$APICVM_URL/v1/companies/resolve?query=PETR4&by=ticker"

Text extraction note

POST /v1/document-text-extractions is async. Your plugin should accept a callback URL (HTTPS in production) and return the 202 acknowledgment — do not invent a sync "extract now" tool. See async extraction.

Compare with LangChain, OpenAI tools, and Haystack.

Current limitations

  • No job-status polling endpoint beyond the initial 202
  • perPage max 50
  • Corpus coverage is ingestion-dependent

Next steps

Ready to integrate?

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