QVeris
Run a task
Developer guide · Finance AI agents

Build an SEC Filings Analysis Agent

A practical Python guide for discovering SEC data capabilities, inspecting schemas, retrieving filing data, and building a traceable research workflow.

SEC filing discovery Discover Find tools for 10-K, 10-Q, 8-K, company facts, and filing retrieval.
SEC filing schema inspection Inspect Review required parameters, output schemas, cost, and provider metadata.
SEC filing capability execution Call Execute the selected capability and return structured data to the agent.

Building an SEC filings analysis agent sounds straightforward until the workflow meets real filings. Data sits across submissions, inline XBRL, exhibits, company facts, and third-party enrichment sources. Documents vary in length and structure, tables do not always map cleanly to a single schema, and a human analyst may spend hours locating risk changes, liquidity signals, management commentary, or unusual disclosures. An AI agent can reduce that burden by retrieving the right filing, extracting structured evidence, comparing periods, and producing a review queue. The difficult part is not the language model. It is connecting the model to reliable filing, financial, and news capabilities without creating a fragile web of one-off integrations. This guide shows how QVeris can provide that tool layer through a Discover → Inspect → Call workflow. Without a consistent tool layer, teams spend more time maintaining retrieval code than testing whether the agent produces accurate, reviewable financial research for analysts.

What Is SEC Filings Analysis?

SEC filings are regulatory disclosures submitted by public companies and other market participants to the U.S. Securities and Exchange Commission. The filings are available through the SEC's EDGAR search system. Three forms appear frequently in automated research workflows. A 10-K is the annual report and includes audited financial statements, business descriptions, risk factors, management discussion, and controls. A 10-Q is a quarterly filing with interim financial statements and updates to material risks or operating conditions. An 8-K reports significant events such as acquisitions, leadership changes, bankruptcy, financing activity, or other developments that investors may need promptly.

SEC filings analysis means turning these documents into evidence that supports a decision. A developer may extract revenue, debt, cash flow, segment metrics, or filing dates. A quant team may compare language or financial values across hundreds of issuers. An analyst may trace a management claim back to the exact filing section. A reliable AI SEC filing analyzer must preserve accession numbers, form types, reporting periods, source URLs, and quoted context so a reviewer can verify the result.

Financial agents need this information because filings contain primary-source disclosures that may not appear in normalized market datasets. A 10-K can reveal long-term risk and accounting policy changes; a 10-Q can expose deteriorating working capital; an 8-K can surface a material event before it is fully reflected in slower research products. An SEC 10-K analysis AI therefore needs retrieval, parsing, comparison, and citation capabilities—not merely a prompt asking an LLM to summarize a PDF.

Structured SEC filings data
Primary-source data needs traceability Store the form type, accession number, filing date, period, source URL, extracted evidence, and tool execution ID with every result.

Why Traditional API Integration Fails at Scale

A prototype can call one SEC endpoint and send the response to a model. A production workflow quickly becomes broader. The agent may need SEC submissions for filing history, filing documents for narrative text, XBRL facts for standardized financial values, a market data API for price context, a company identifier service for ticker-to-CIK resolution, and a news API for events surrounding the filing date. Each source introduces a different authentication model, URL structure, pagination rule, rate policy, response schema, and error format.

Developers then write adapters that normalize field names, retry transient failures, respect provider limits, and handle missing data. They also need to distinguish between a provider outage and a company that genuinely lacks a requested fact. When an API changes, the integration may fail silently or return a shape the downstream prompt does not expect. Adding a second provider for fallback doubles part of the maintenance burden.

The operational problem is larger than API access. The agent needs to know which tool fits the current question. A request for "latest material event" should prefer an 8-K retrieval capability, while "compare operating cash flow over five years" needs structured facts. Loading every tool schema into the model context wastes tokens and can reduce tool-selection accuracy. A team trying to build a finance AI agent needs discovery, schema inspection, execution, and observability as separate concerns. Traditional direct integration tends to collapse all four into application code, making the system harder to extend and audit.

How QVeris Supports an SEC Filings Analysis Agent

QVeris is a capability routing network for AI agents. Instead of assuming that the application already knows the exact endpoint and provider, the agent describes the capability it needs. QVeris returns matching capabilities, lets the application inspect a selected capability, and then executes it through a unified interface. The same workflow is available through the Python SDK, REST API, MCP server, and CLI.

The first stage, Discover, is semantic tool search. The application can search for "retrieve the latest 10-K filing and company facts" rather than hardcoding a provider-specific endpoint. Discovery returns ranked candidates and identifiers that the application can evaluate. This keeps the active tool set narrow and relevant to the current research task.

The second stage, Inspect, retrieves the capability contract before execution. Your code can review required parameters, optional fields, output information, pricing metadata, and provider details. This step matters for financial workflows because similar tools may require a ticker, CIK, accession number, filing URL, or date range. Inspection allows the agent to request missing inputs before spending credits or producing an invalid call.

The third stage, Call, executes the chosen capability using the inspected parameters. QVeris returns structured output and execution metadata that your application can retain for debugging and audit trails. You can then pass only the relevant filing sections or facts to the reasoning model, rather than pushing an entire filing into context.

This separation also supports better architecture. Retrieval remains deterministic, evidence remains traceable, and the LLM focuses on classification, comparison, explanation, and report generation. Teams can review current plan and credit details on the QVeris pricing page, while implementation details and current SDK behavior belong in the QVeris documentation.

QVeris capability routing architecture
One protocol, separate responsibilities Discovery selects a relevant tool, inspection validates its contract, and execution retrieves evidence for the reasoning layer.

Step-by-Step: Building the Agent with Python

The examples below show the core control flow rather than a complete investment application. Capability names and required parameters can evolve, so inspect the selected capability and use its returned schema instead of assuming fixed field names. Keep your API key in an environment variable, validate all model-generated arguments, and review the current QVeris docs before deployment.

1Create an account and initialize the client

Register with QVeris, obtain an API key, and store it outside source control. Install the Python package, load the key from the environment, and create one reusable asynchronous client.

pip install qveris

import os
from qveris import QverisClient

client = QverisClient(
    api_key=os.environ["QVERIS_API_KEY"]
)

In production, add secret rotation and avoid logging the key. Keep account and credit decisions separate from the analysis logic; QVeris states that discovery is free, while execution consumes credits according to the selected capability.

2Discover SEC-related capabilities

Write a query that describes both the desired source and output. A precise query is more useful than a generic search for "SEC." Include the form type, company identifier, and whether the agent needs structured facts or document text.

import asyncio

async def discover_sec_tools():
    result = await client.discover(
        query=(
            "Retrieve SEC 10-K, 10-Q, and 8-K filings, "
            "including filing metadata and structured company facts"
        ),
        limit=5,
    )
    return result

discovery = asyncio.run(discover_sec_tools())
print(discovery)

Do not automatically execute the first match. Rank candidates using task fit, provider metadata, expected output, cost, and reliability. Store the discovery identifier when available so later calls can be traced back to the search that selected the tool.

3Inspect the selected capability

Select a capability ID from discovery and inspect it before building arguments. The inspection response is the source of truth for parameter names. Your application should compare required fields against the research request and ask the user or another tool for missing identifiers.

async def inspect_capability(capability_id: str):
    detail = await client.inspect(
        capability_ids=[capability_id],
    )
    return detail

capability_id = "CAPABILITY_ID_FROM_DISCOVERY"
schema = asyncio.run(inspect_capability(capability_id))
print(schema)

A robust agent converts the inspected schema into a constrained argument model. For example, if the capability requires a CIK and form type, resolve the ticker first, restrict the form to an allowed set, and reject unsupported date formats. This boundary prevents an LLM from inventing provider parameters.

4Call the capability and normalize evidence

Build the arguments from validated application state, then execute the capability. The example keys below are illustrative; replace them with the exact fields returned by Inspect.

async def fetch_latest_filing(capability_id: str):
    response = await client.call(
        capability_id=capability_id,
        arguments={
            "ticker": "MSFT",
            "form_type": "10-K",
            "limit": 1,
        },
    )
    return response

filing = asyncio.run(fetch_latest_filing(capability_id))
print(filing)

Normalize the response into an internal evidence object containing the company, form type, accession number, filing date, reporting period, source URL, extracted text or facts, provider, and execution ID. Send that evidence object to the model with a narrow instruction such as "compare risk-factor changes" or "explain the year-over-year cash-flow movement." Require citations to the stored filing sections.

SEC analysis agent audit trail
Keep the model downstream of evidence Retrieve and normalize first. Ask the model to analyze only verifiable filing facts and preserve execution metadata for review.

The production loop should also handle ambiguity and failure. If discovery returns weak matches, refine the query. If inspection reveals an unsupported form type, choose another capability. If execution fails, log the structured error and decide whether to retry, select a fallback provider, or send the item to a human review queue. Cache immutable filings by accession number, but refresh filing indexes and company metadata according to your application's latency requirements.

Real-World Use Cases

Hedge funds can monitor 8-K disclosures. An event-monitoring agent can poll recent filings for a defined universe, retrieve new 8-K documents, classify item types, and flag disclosures involving leadership changes, debt amendments, acquisitions, impairments, or bankruptcy risk. The agent should attach the filing URL and relevant excerpt to every alert. Analysts can then review a short, evidence-backed queue instead of scanning every filing manually.

Quant teams can analyze 10-K metrics in batches. A scheduled workflow can retrieve annual filings or structured company facts, normalize fiscal periods, calculate ratios, and store comparable features. The LLM should not perform the authoritative arithmetic when deterministic code can do it. Use the model to identify narrative changes, explain anomalies, or classify risk language after the numeric pipeline has validated the data.

Financial analysts can accelerate research reports. An agent can gather the latest 10-K and 10-Q, retrieve relevant 8-K events, add price and news context, and draft a research outline. A human analyst remains responsible for interpretation and investment conclusions, but the agent can reduce document collection and first-pass extraction time. This pattern works best when every generated claim links back to source evidence.

Conclusion: Build a Traceable SEC Filings Analysis Agent

A production SEC filings analysis agent needs more than document summarization. It needs reliable discovery, explicit schemas, structured execution, source preservation, and a clear boundary between retrieved evidence and model reasoning. QVeris provides a unified Discover → Inspect → Call workflow that can reduce integration work while keeping the agent compatible with Python, REST, MCP, and CLI environments.

Discovery is free, and new accounts receive 1,000 starter credits according to the current QVeris offer. Confirm current terms on the pricing page, begin with a narrow filing workflow, and add providers or capabilities only when the agent demonstrates reliable evidence handling.

This guide is for software engineering and research workflow design. It is not investment, legal, accounting, or compliance advice. Always verify filing evidence against the original SEC source.
Start building with verified finance capabilities

Discover SEC filing and financial data tools for free, inspect their schemas, and execute only the capabilities your agent needs.

开发者指南 · 金融 AI Agent

Build an SEC 申报分析 Agent

一份实用的 Python 指南,涵盖发现 SEC 数据能力、检查 Schema、获取申报数据以及构建可追溯的研究工作流。

SEC 申报发现 发现 查找用于 10-K、10-Q、8-K、公司事实及申报检索的工具。
SEC 申报 Schema 检查 检查 审查所需参数、输出 Schema、成本及提供商元数据。
SEC 申报能力执行 调用 执行所选能力,并将结构化数据返回给 Agent。

构建 SEC 申报分析 Agent 听起来很简单,直到工作流遇到真实申报。数据分散在提交文件、内联 XBRL、附件、公司事实以及第三方增强来源中。文档长度和结构各异,表格并非总能干净地映射到单一 Schema,人类分析师可能需要花费数小时定位风险变化、流动性信号、管理层评论或异常披露。AI Agent 可以通过检索正确申报、提取结构化证据、比较各期并生成审核队列来减轻这一负担。难点不在于语言模型,而在于将模型连接到可靠的申报、财务和新闻能力,而不创建脆弱的一次性集成网络。本指南展示 QVeris 如何通过“发现 → 检查 → 调用”工作流提供该工具层。没有一致的工具层,团队花费在维护检索代码上的时间将超过测试 Agent 是否能为分析师生成准确、可审核的金融研究的时间。

什么是 SEC 申报分析?

SEC 申报是由上市公司及其他市场参与者向美国证券交易委员会提交的监管披露文件。这些申报可通过 SEC 的 EDGAR 搜索系统获取。三种表格在自动化研究工作流中频繁出现。10-K 是年度报告,包含经审计的财务报表、业务描述、风险因素、管理层讨论及内部控制。10-Q 是季度申报,包含中期财务报表及重大风险或经营状况的更新。8-K 报告重大事件,如收购、领导层变更、破产、融资活动或其他投资者可能需要及时了解的事态发展。

SEC 申报分析意味着将这些文档转化为支持决策的证据。开发者可以提取收入、债务、现金流、分部指标或申报日期。量化团队可以比较数百家发行人的语言或财务数值。分析师可以将管理层的说法追溯到具体的申报章节。一个可靠的 AI SEC 申报分析器 必须保留接入号、表格类型、报告期、来源 URL 及引用上下文,以便审核人员验证结果。

金融 Agent 需要这些信息,因为申报包含标准化市场数据集中可能不会出现的一手披露。10-K 可以揭示长期风险及会计政策变化;10-Q 可以暴露恶化的营运资本;8-K 可以在较慢的研究产品完全反映之前,率先呈现重大事件。一个 SEC 10-K 分析 AI 因此需要检索、解析、比较和引用能力——而不仅仅是让 LLM 总结 PDF 的简单提示。

结构化 SEC 申报数据
一手数据需要可追溯性 每次结果都需存储表格类型、接入号、申报日期、报告期、来源 URL、提取的证据及工具执行 ID。

传统 API 集成为何在规模化时失败

原型可以调用一个 SEC 端点并将响应发送给模型。生产工作流很快变得更为广泛。Agent 可能需要 SEC 提交记录以获取 filing 历史、filing 文档获取叙述文本、XBRL 事实获取标准化的财务数值、市场数据 API 获取价格背景、公司标识服务实现 ticker 到 CIK 的解析,以及新闻 API 获取围绕 filing 日期的事件。每个来源都引入不同的认证模型、URL 结构、分页规则、速率策略、响应模式和错误格式。

开发人员随后编写适配器来规范化字段名称、重试瞬时故障、遵守提供商限制以及处理缺失数据。他们还需要区分提供商中断与公司确实缺少所请求的事实。当 API 发生变化时,集成可能会静默失败,或返回下游 prompt 不期望的形状。添加第二个提供商作为备用会使维护负担加倍。

运营问题比 API 访问更大。Agent 需要知道哪个工具适合当前问题。对于 "latest material event" 的请求应优先选择 8-K 检索能力,而 "compare operating cash flow over five years" 则需要结构化事实。将所有工具 schema 加载到模型上下文中会浪费 token 并可能降低工具选择准确率。一个团队试图 构建一个金融 AI Agent 需要将发现、schema 检查、执行和可观测性作为独立关注点。传统的直接集成往往将这四个方面都合并到应用程序代码中,使系统更难以扩展和审计。

QVeris 如何支持 SEC 申报分析 Agent

QVeris 是一个面向 AI Agent 的能力路由网络。应用程序无需假设已知道确切的端点和提供商,而是由 Agent 描述所需能力。QVeris 返回匹配的能力,让应用程序检查所选能力,然后通过统一接口执行。同样的工作流可通过 Python SDK、REST API、MCP server 和 CLI 使用。

第一阶段, 发现,即语义工具搜索。应用程序可以搜索 "retrieve the latest 10-K filing and company facts",而不是硬编码特定提供商的端点。发现(Discovery)返回排序后的候选者和标识符,供应用程序评估。这使活动工具集保持狭窄且与当前研究任务相关。

第二阶段, 检查,即执行前检索能力合约。你的代码可以查看必需参数、可选字段、输出信息、定价元数据和提供商详情。这一步对金融工作流至关重要,因为类似工具可能需要 ticker、CIK、accession number、filing URL 或日期范围。检查(Inspection)允许 Agent 在花费信用或产生无效调用前请求缺失的输入。

第三阶段, 调用,即使用检查后的参数执行所选能力。QVeris 返回结构化输出和执行元数据,你的应用程序可以保留用于调试和审计追踪。然后你可以仅将相关的 filing 部分或事实传递给推理模型,而不是将整个 filing 推入上下文。

这种分离还支持更好的架构。检索保持确定性,证据保持可追溯,LLM 专注于分类、比较、解释和报告生成。团队可以查看当前计划和信用详情在 QVeris 定价页面,而实现细节和当前 SDK 行为则属于 QVeris 文档.

QVeris 能力路由架构
单一协议,职责分离 发现(Discovery)选择相关工具,检查(Inspection)验证其合约,执行(Execution)为推理层检索证据。

逐步指南:使用 Python 构建 Agent

以下示例展示核心控制流程,而非完整的投资应用程序。能力名称和所需参数可能变化,因此请检查所选能力并使用其返回的 schema,而不是假设固定字段名。将 API 密钥保存在环境变量中,验证所有模型生成的参数,并查看当前的 QVeris 文档 在部署之前。

1创建账户并初始化客户端

注册 QVeris,获取 API 密钥,并将其存储在源代码控制之外。安装 Python 包,从环境加载密钥,并创建一个可复用的异步客户端。

pip install qveris

import os
from qveris import QverisClient

client = QverisClient(
    api_key=os.environ["QVERIS_API_KEY"]
)

在生产环境中,添加密钥轮换并避免记录密钥。将账户和信用决策与分析逻辑分离;QVeris 声明发现(Discovery)免费,而执行则根据所选能力消耗信用。

2发现与 SEC 相关的能力

编写一个同时描述所需来源和输出的查询。精确的查询比泛泛搜索 "SEC" 更有用。包括表单类型、公司标识符以及 Agent 是否需要结构化事实或文档文本。

import asyncio

async def discover_sec_tools():
    result = await client.discover(
        query=(
            "Retrieve SEC 10-K, 10-Q, and 8-K filings, "
            "including filing metadata and structured company facts"
        ),
        limit=5,
    )
    return result

discovery = asyncio.run(discover_sec_tools())
print(discovery)

不要自动执行第一个匹配。根据任务匹配度、提供商元数据、预期输出、成本和可靠性对候选者进行排序。存储发现标识符(如果可用),以便后续调用可以追溯到选择该工具的搜索。

3检查所选能力

从发现中选择一个能力 ID,并在构建参数之前检查它。检查响应是参数名称的真相来源。你的应用程序应将必需字段与研究请求进行比较,并询问用户或其他工具以获取缺失的标识符。

async def inspect_capability(capability_id: str):
    detail = await client.inspect(
        capability_ids=[capability_id],
    )
    return detail

capability_id = "CAPABILITY_ID_FROM_DISCOVERY"
schema = asyncio.run(inspect_capability(capability_id))
print(schema)

健壮的 agent 会将检查后的 schema 转换为受约束的参数模型。例如,如果能力需要 CIK 和表单类型,则先解析 ticker,将表单限制在允许的集合内,并拒绝不支持的日期格式。这种边界防止 LLM 编造提供商参数。

4调用能力并标准化证据

从验证后的应用状态构建参数,然后执行能力。以下示例键仅供参考;请替换为 Inspect 返回的确切字段。

async def fetch_latest_filing(capability_id: str):
    response = await client.call(
        capability_id=capability_id,
        arguments={
            "ticker": "MSFT",
            "form_type": "10-K",
            "limit": 1,
        },
    )
    return response

filing = asyncio.run(fetch_latest_filing(capability_id))
print(filing)

将响应归一化为内部证据对象,包含公司、表单类型、档案号、提交日期、报告期、来源URL、提取文本或事实、提供者和执行ID。将该证据对象连同窄指令(如“比较风险因素变化”或“解释同比现金流变动”)发送给模型。要求引用存储的申报章节。

SEC 分析代理审计追踪
将模型置于证据下游 先检索并归一化。仅要求模型分析可验证的申报事实,并保留执行元数据供审查。

生产循环还应处理模糊性和失败。如果发现返回弱匹配,则优化查询。如果检查显示不支持的表单类型,则选择其他能力。如果执行失败,记录结构化错误并决定是重试、选择备用提供者还是将项目发送到人工审核队列。按档案号缓存不可变的申报文件,但根据应用的延迟要求刷新申报索引和公司元数据。

实际应用案例

对冲基金可以监控 8-K 披露。 事件监控代理可以轮询指定范围内的近期申报,检索新的 8-K 文档,分类项目类型,并标记涉及领导层变更、债务修订、收购、减值或破产风险的披露。代理应在每条警报中附加申报 URL 和相关摘录。分析师随后可以审查基于证据的短队列,而无需手动扫描每份申报。

量化团队可以批量分析 10-K 指标。 定时工作流可以检索年度申报或结构化公司事实,归一化财务期间,计算比率,并存储可比特征。当确定性代码可以完成时,LLM 不应执行权威算术。在数值管道验证数据后,使用模型识别叙述变化、解释异常或分类风险语言。

金融分析师可以加速研究报告。 代理可以收集最新的 10-K 和 10-Q,检索相关的 8-K 事件,添加价格和新闻背景,并草拟研究大纲。人类分析师仍然负责解读和投资结论,但代理可以减少文档收集和初步提取时间。当每条生成的声明都链接回源证据时,此模式效果最佳。

结论:构建可追溯的 SEC 申报分析代理

一个生产 SEC 申报分析 Agent 需要的不只是文档摘要。它需要可靠的发现、明确的模式、结构化的执行、来源保留,以及检索证据与模型推理之间的清晰边界。QVeris 提供了统一的 Discover → Inspect → Call 工作流,可减少集成工作,同时保持代理与 Python、REST、MCP 和 CLI 环境的兼容性。

发现功能免费,新账户根据当前 QVeris 优惠可获得 1,000 个启动积分。请在定价页面确认当前条款,从窄范围的申报工作流开始,仅在代理展示可靠证据处理能力后添加提供者或功能。

本指南面向软件工程和研究工作流设计。非投资、法律、会计或合规建议。务必对照原始 SEC 来源验证申报证据。
开始使用经过验证的金融能力进行构建

免费发现 SEC 申报和金融数据工具,检查其模式,仅执行代理所需的能力。