QVeris
运行任务
Dynamic Agent Infrastructure动态 Agent 基础设施

Capability Discovery for AI Agents: Developer GuideAI Agent 能力发现开发指南

Learn capability discovery for AI agents with QVeris to dynamically find, inspect, route, and call financial tools through MCP, Python, and structured APIs.了解如何通过 QVeris 为 AI Agent 动态发现、检查、路由和调用金融工具,并接入 MCP、Python 与结构化 API。

Capability discovery workflow for AI agents using QVeris

Runtime discovery narrows a large capability catalog into a validated, governed call.运行时发现把大型能力目录缩小成经过验证和治理的一次调用。

Capability discovery for AI agents solves a problem that grows as models become more capable: an agent may be able to reason about a task, yet still have no reliable way to know which external tools exist, which one fits the request, or how to invoke it. Developers face thousands of APIs, MCP servers, SDKs, and provider-specific schemas without one searchable execution layer. Capability discovery fills that missing infrastructure between user intent and real-world action.

Updated June 9, 202615 min readFor AI agent and financial infrastructure developers
Core idea

A static tool list tells the model what developers configured in advance. Dynamic capability discovery lets an application search a larger catalog at runtime, inspect only relevant tools, apply policy and cost constraints, then execute the selected capability through a stable interface.

capability discovery for AI agents 解决模型能力提升后越来越明显的问题:Agent 可以理解任务,却不知道有哪些外部工具、哪个工具最匹配以及如何调用。开发者面对成千上万的 API、MCP Server 和不同 schema,缺少统一的搜索与执行层。能力发现正是连接用户意图与真实动作的关键基础设施。

核心概念

静态工具列表只包含开发者预先配置的能力;动态发现会在运行时搜索大型目录、检查少量相关工具、应用权限和成本策略,再通过稳定接口执行。

What Is Capability Discovery for AI Agents?

Capability discovery is the ability of an AI application to find, understand, evaluate, and select external tools according to the current task. A capability can be an API endpoint, data query, document parser, compliance check, market-data feed, or controlled action. Discovery should expose enough metadata for the application to decide whether the capability is relevant and safe before execution.

Traditional integration starts with developers selecting providers and hard-coding a finite tool list. The model can choose among those tools, but it cannot access anything outside that list until an engineer deploys new code. Dynamic AI agent tool discovery reverses the sequence: the application starts with an intent, searches a catalog at runtime, inspects matching tools, and exposes only the best candidates to the model or routing policy.

This distinction becomes important as agents handle less predictable tasks. A fixed investment assistant might contain quote, filing, and news functions. A general finance agent may receive a sanctions-screening request, an options-volatility question, a macroeconomic comparison, or a cryptocurrency liquidity task. Loading every possible schema into the model wastes context and increases tool-selection errors. Runtime discovery keeps the active tool set small.

MCP tool discovery is related but not identical. MCP lets a client connect to servers and list the tools those servers expose. That standardization is valuable, but an application connected to many servers still needs search, ranking, deduplication, cost policy, permissions, and routing across the combined catalog. Capability discovery operates above individual connections.

什么是 Capability Discovery for AI Agents

能力发现是 AI 应用根据当前任务寻找、理解、评估和选择外部工具的能力。能力可以是 API、数据查询、文档解析、合规检查、市场数据或受控动作。

传统方式由开发者提前选择供应商并写死工具列表;动态 AI agent tool discovery 从意图出发,在运行时搜索目录、检查匹配工具,只向模型或路由策略暴露最相关候选。

MCP Tool Discovery 与此相关但不完全相同。MCP 客户端可以枚举服务器工具,但连接多个服务器后仍需要跨目录搜索、排序、去重、成本、权限和路由。能力发现位于单个连接之上。

The Problem Without AI Agent Capability Discovery

Without a discovery layer, developers become the search engine, integration team, and runtime router. They read provider documentation, compare endpoints, build adapters, normalize errors, and decide which tools every agent may see.

  • Manual research: engineers must inspect API documentation, coverage, pricing, and licensing before each integration.
  • Hard-coded catalogs: tool definitions live in prompts or source code and become stale when providers change.
  • Context overload: exposing hundreds of tool schemas consumes tokens and makes similar functions difficult for the model to distinguish.
  • Limited autonomy: an agent cannot extend to a new task even when a suitable capability already exists elsewhere.
  • Repeated maintenance: authentication, rate limits, retries, pagination, and response normalization are rebuilt across products.
  • Weak governance: static lists rarely encode dynamic user permissions, cost ceilings, data regions, or commercial rights.

Finance magnifies every issue. Market data, fundamentals, filings, analyst estimates, compliance, macroeconomics, and crypto often come from different providers. The same ticker can use different exchange suffixes, fiscal periods, adjustment rules, and units. Data coverage and entitlement can change by country or account.

A static integration can still be the correct choice for a small, high-volume workload that needs one contract and maximum control. Discovery matters when the task set and provider universe are diverse enough that choosing and maintaining tools becomes a bottleneck.

缺少 AI Agent Capability Discovery 的问题

没有发现层时,开发者需要研究每份 API 文档、比较覆盖和价格、构建适配器并决定 Agent 能看到哪些工具。

  • 工具定义硬编码在代码或提示词中,供应商变化后容易过期。
  • 加载大量 schema 浪费上下文,并增加相似工具选择错误。
  • Agent 无法扩展到尚未部署的新任务。
  • 认证、限流、重试、分页和归一化在多个产品中重复建设。
  • 权限、成本、地区和商业授权很难动态治理。

金融场景更复杂:行情、基本面、公告、预期、合规、宏观和加密来自不同来源,ticker、财年、调整规则和单位也可能不同。

How QVeris Capability Discovery Works

QVeris organizes runtime access into Discover, Inspect, and Call. The current asynchronous Python SDK exposes these operations through QverisClient, along with usage and ledger methods for auditing execution and credits.

Discover

Search Capabilities with Natural Language

Describe the required outcome instead of naming a provider. Discovery is free and returns ranked capability metadata plus a search ID for correlation.

import asyncio

from qveris import QverisClient



async def find_quote_tools(client):

    discovered = await client.discover(

        "real-time stock price for US equities "

        "with exchange and timestamp",

        limit=8,

    )

    for tool in discovered.results:

        print(tool.tool_id, tool.name, tool.description)

    return discovered
Inspect

Validate Schemas and Operational Metadata

Inspect the most relevant tool IDs rather than loading the entire catalog. Tool metadata can include parameters, examples, statistics, and billing rules. Inspect is also free.

async def inspect_candidates(client, discovered):

    ids = [tool.tool_id for tool in discovered.results[:3]]

    inspected = await client.inspect(

        ids,

        search_id=discovered.search_id,

    )

    for tool in inspected.results:

        print("ID:", tool.tool_id)

        print("PARAMS:", [p.model_dump() for p in tool.params])

        print("STATS:", tool.stats)

        print("BILLING:", tool.billing_rule)

    return inspected.results
Call

Execute Through One Typed Interface

Select according to schema fit, policy, expected reliability, latency, and cost. Use inspected sample parameters when possible, then override task-specific fields.

async def call_quote(client, tool, search_id, ticker):

    params = {}

    if tool.examples and tool.examples.sample_parameters:

        params.update(tool.examples.sample_parameters)



    # Confirm the exact field name in tool.params.

    params["ticker"] = ticker



    response = await client.call(

        tool.tool_id,

        params,

        search_id=search_id,

        max_response_size=20_480,

    )

    if not response.success:

        raise RuntimeError(response.error_message)

    return response.result

Discover and Inspect are permanently free under the current QVeris model. Only Call consumes credits. The platform currently advertises 1,000 signup credits and 100 daily login credits; confirm current execution prices on the pricing page.

The workflow reduces context usage as well as integration work. The model or application sees a handful of relevant, inspected tools instead of thousands of raw definitions. Search IDs and execution IDs also make tool selection and billing easier to audit.

QVeris Capability Discovery 如何工作

Discover

使用自然语言搜索能力

描述结果而不是供应商。Discover 免费返回排序结果和 search ID。

from qveris import QverisClient



discovered = await client.discover(

    "美国股票实时价格,包含交易所和时间戳",

    limit=8,

)

for tool in discovered.results:

    print(tool.tool_id, tool.name)
Inspect

检查 schema 与运营信息

ids = [x.tool_id for x in discovered.results[:3]]

inspected = await client.inspect(

    ids, search_id=discovered.search_id

)

for tool in inspected.results:

    print(tool.params, tool.stats, tool.billing_rule)
Call

通过统一接口执行

selected = inspected.results[0]

response = await client.call(

    selected.tool_id,

    {"ticker": "AAPL"},

    search_id=discovered.search_id,

    max_response_size=20_480,

)

if not response.success:

    raise RuntimeError(response.error_message)

print(response.result)

Discover 与 Inspect 当前永久免费,只有 Call 消耗积分。注册活动包括 1,000 积分和每日登录 100 积分,执行价格以价格页面为准。

Why Capability Discovery Matters for Finance AI Agents

A financial request often spans several data domains. “Explain today’s price move” may require a real-time quote, intraday volume, a new filing, earnings context, company news, sector performance, and a macroeconomic event. No single API is always the best source for every component.

A traditional team may separately integrate Polygon.io for market data, Finnhub for news, Alpha Vantage for indicators, the SEC EDGAR APIs for filings, and additional providers for consensus or compliance. Each integration creates credentials, schemas, rate limits, error handling, and licensing work.

QVeris exposes more than 10,000 financial and real-world capabilities through a common discovery layer. The application can search for the required outcome, compare inspected metadata, and dynamically choose a suitable source. That does not mean routing should be unconstrained. Teams should prefer approved providers, enforce freshness and cost limits, and require explicit permission for regulated or account-specific actions.

AI agent capability routing is the policy step after discovery. Discovery produces candidates; routing ranks or filters them according to schema compatibility, user entitlements, jurisdiction, latency, success rate, data quality, and price. Separating these stages makes the decision explainable and testable.

Capability Discovery 为什么对金融 Agent 重要

“解释今天股价变化”可能需要实时行情、成交量、公告、财报、新闻、行业表现和宏观事件。传统团队可能分别接入 Polygon、Finnhub、Alpha Vantage、SEC EDGAR 和其他提供商。

QVeris 通过统一发现层提供 10,000 多项能力。应用可按需求搜索、比较 Inspect metadata,并动态选择来源。发现负责产生候选,AI agent capability routing 再按照 schema、权限、地区、延迟、成功率、质量和价格进行过滤与排序。

Capability Discovery vs Traditional Tool Integration

Dynamic discovery changes when and how tools enter the active agent context.
Dimension Traditional integration Dynamic capability discovery
Tool discovery Developer researches and configures each API Runtime search by task intent
Active tool list Hard-coded or deployed with the application Relevant inspected candidates loaded on demand
Maintenance Application team owns adapters and metadata Capability layer centralizes discovery and execution
Scalability Engineering work rises with each provider New tasks can search existing catalog coverage
MCP support Team connects and manages individual servers MCP can expose shared Discover, Inspect, and Call tools
Financial coverage Limited to integrated contracts Search across 10,000+ available capabilities
Pricing Provider fees plus engineering and operations Free discovery/inspection; usage-based execution

Discovery does not eliminate direct integrations. A latency-sensitive trading path or proprietary licensed feed may remain a dedicated service. A hybrid architecture can use fixed tools for critical deterministic flows and dynamic discovery for long-tail research, enrichment, and new user requests.

MCP standardizes the connection and tool interface. A tool discovery platform adds catalog search, ranking, inspection, cross-provider policy, and execution economics on top of those connections.

Capability Discovery 与传统工具集成对比

维度 传统集成 动态能力发现
工具发现 开发者研究每个 API 运行时按意图搜索
工具列表 硬编码并随应用部署 按需加载候选
维护 团队维护适配器 能力层集中执行
扩展性 每个供应商增加工程工作 新任务搜索已有覆盖
MCP 管理单独服务器 共享 Discover/Inspect/Call
金融覆盖 仅限已接入合同 搜索 10,000+ 能力
定价 供应商费用加工程成本 免费发现,按调用付费

延迟敏感或专有数据可以继续直接接入,长尾研究和新用户需求则使用动态发现,形成混合架构。

Build an Agent with Dynamic Capability Discovery

The following example accepts a user request, discovers candidates, inspects the best few, applies a simple policy, executes the selected tool, and returns an auditable envelope. In production, replace keyword scoring with schema validation and a tested router.

import asyncio

from dataclasses import dataclass

from typing import Any



from qveris import QverisClient



@dataclass

class AgentResult:

    query: str

    search_id: str

    tool_id: str

    execution_id: str

    data: Any

    cost: float | None



def choose_tool(inspected):

    """Prefer tools with parameters and usable sample input."""

    eligible = [

        tool for tool in inspected

        if tool.params and tool.examples

    ]

    if not eligible:

        raise RuntimeError("No inspected tool passed policy")



    # Add allowlists, freshness, success rate, and cost here.

    return eligible[0]



def build_parameters(tool, user_parameters):

    """Start from a verified example, then apply user values."""

    params = {}

    if tool.examples and tool.examples.sample_parameters:

        params.update(tool.examples.sample_parameters)

    params.update(user_parameters)

    return params



async def dynamic_finance_agent(query, user_parameters):

    client = QverisClient()

    try:

        # 1. Find capabilities by user intent.

        discovered = await client.discover(query, limit=10)

        if not discovered.results:

            raise RuntimeError("No matching capabilities")



        # 2. Load complete schemas for only the top candidates.

        candidate_ids = [

            item.tool_id for item in discovered.results[:4]

        ]

        inspected = await client.inspect(

            candidate_ids,

            search_id=discovered.search_id,

        )



        # 3. Apply application policy before execution.

        selected = choose_tool(inspected.results)

        params = build_parameters(selected, user_parameters)



        # 4. Execute with a bounded response size.

        called = await client.call(

            selected.tool_id,

            params,

            search_id=discovered.search_id,

            max_response_size=30_000,

        )

        if not called.success:

            raise RuntimeError(called.error_message)



        # 5. Return correlation IDs for logs and billing audits.

        return AgentResult(

            query=query,

            search_id=discovered.search_id,

            tool_id=selected.tool_id,

            execution_id=called.execution_id,

            data=called.result,

            cost=called.cost,

        )

    finally:

        await client.close()



async def main():

    result = await dynamic_finance_agent(

        query=(

            "real-time stock price with timestamp "

            "and exchange information"

        ),

        user_parameters={"ticker": "AAPL"},

    )

    print(result)



if __name__ == "__main__":

    asyncio.run(main())

The example keeps the decision deterministic, but an LLM can participate after candidate inspection. Give it concise inspected metadata, not the full catalog, and ask it to choose within an allowlist. Validate the selected tool and arguments in code before Call. Treat descriptions and provider output as untrusted external content.

Production Routing and Evaluation

Record every candidate, rejection reason, selected tool, parameters, latency, result validity, and cost. Build evaluation cases for common and adversarial requests. Measure retrieval recall, top-k relevance, schema compatibility, successful execution, and unsupported-tool selection. A discovery system can return a semantically similar capability that still lacks the required exchange, region, or update frequency.

Use tenant-aware policies. Enterprise users may have different providers, regions, budgets, or compliance permissions. Cache discovery results for stable intents, but re-inspect when schemas or operational metadata change. Never let cached routing bypass current authorization.

构建 Dynamic Capability Discovery Agent

完整代码应执行用户需求 → Discover → Inspect → 策略选择 → Call,并返回 search ID、tool ID 和 execution ID。英文版本提供可运行完整代码。生产系统应加入 allowlist、schema 验证、成本上限、时效要求和租户权限。

生产路由与评估

记录所有候选、拒绝原因、选中工具、参数、延迟、结果有效性和费用。评估检索召回率、top-k 相关性、schema 匹配、执行成功率和错误工具选择。语义相关并不代表工具支持所需地区、交易所或更新频率。

企业用户还需要按租户配置供应商、地区、预算和合规权限。可以缓存稳定意图的搜索结果,但 schema 或运营信息变化后必须重新 Inspect,缓存不能绕过当前授权。

Production Design for AI Agent Tool Discovery

Build a Searchable Capability Index

High-quality discovery depends on metadata, not only embeddings. Index capability names, descriptions, parameter names, output fields, provider coverage, regions, freshness, authentication requirements, and examples. Add controlled taxonomy for asset class, document type, action risk, and data latency. Hybrid retrieval can combine lexical matching for exact concepts such as “10-K” with semantic matching for broader requests such as “latest annual filing.”

Version the index and retain the metadata used for every decision. When a description or schema changes, the team should be able to reproduce why an older request selected a particular tool. Relevance tuning should use real user tasks and labeled acceptable tools rather than generic similarity benchmarks.

Apply Security Before Tools Reach the Model

Filter candidates by tenant permissions, data contracts, geography, environment, and action risk before placing them in model context. Read-only research tools may be automatically available, while trading, account modification, or personally identifiable information should require stronger authorization and confirmation. Keep API credentials outside prompts and inject them only inside the trusted execution layer.

Treat tool descriptions and returned content as untrusted input. A provider response can contain text that looks like instructions to the model. Separate data from system instructions, validate structured output, enforce response-size limits, and remove unsupported fields before the result enters the reasoning loop.

Design Fallbacks Without Hiding Data Differences

A fallback should not silently replace one dataset with another. Providers may differ in adjustment policies, timestamps, currency, venue, or licensing. Define equivalence groups only for capabilities that satisfy the same research contract. When routing switches provider, include the source change in logs and downstream output.

Use circuit breakers for failing tools and health-aware ranking for temporary outages. However, operational success rate should not overpower schema relevance or user entitlement. The fastest tool is not the right tool when it lacks the required field or market.

AI Agent 工具发现的生产环境设计

建立可检索的能力索引

高质量发现不能只依赖向量相似度,还需要完整元数据。索引中应包含能力名称、 描述、参数名、输出字段、提供商覆盖、地区、数据新鲜度、认证要求和示例, 并为资产类别、文档类型、动作风险和数据延迟建立受控分类体系。 混合检索可以用关键词匹配“10-K”这类精确概念,再用语义检索理解 “最近的年度申报文件”等更宽泛请求。

能力索引需要版本化,并保留每次路由决策使用的元数据。当描述或 Schema 发生变化时,团队应能够复现旧请求为何选择了某个工具。相关性调优应基于 真实用户任务和人工标注的可接受工具,而不是只看通用相似度分数。

在工具进入模型上下文前执行安全过滤

候选工具进入模型上下文前,应先按租户权限、数据合同、地区、环境和动作风险 过滤。只读研究工具可以自动开放;交易、账户修改或涉及个人信息的能力, 则需要更严格的授权与确认。API 凭证必须留在可信执行层,不能写入提示词。

工具描述和返回内容都应视为不可信输入。提供商响应可能包含看似指令的文本, 因此要把数据与系统指令分离,验证结构化输出,限制响应大小,并在结果重新进入 推理循环前删除不受支持的字段。

设计回退时不要掩盖数据差异

回退机制不能静默地用另一套数据替换原数据。不同提供商可能在复权规则、 时间戳、币种、交易场所和授权条件上存在差异。只有满足同一研究契约的能力 才能归入等价组;发生供应商切换时,应在日志与下游结果中明确标注来源变化。

对持续失败的工具使用熔断器,并让临时健康状态参与排序。但运行成功率不能 凌驾于 Schema 相关性和用户权限之上:缺少必需字段或目标市场时, 响应最快的工具也不是正确工具。

Capability Discovery Use Cases for AI Agents

Financial Research Agent

Discover filings, estimates, transcripts, market data, and macro context according to each research question rather than one fixed workflow.

Compliance Monitoring Agent

Select approved sanctions, adverse-media, KYC, or regulatory capabilities according to jurisdiction and customer policy.

Crypto Market Agent

Find suitable price, volume, liquidity, news, and chain-data capabilities while preserving venue and timestamp metadata.

Enterprise Agent Platform

Expose different capability subsets by role, department, geography, data contract, and cost center.

In each case, discovery expands what the agent can consider while routing policy defines what it may actually execute. This separation prevents “autonomy” from becoming uncontrolled access.

AI Agent Tool Discovery 使用场景

金融研究 Agent

按研究问题动态发现公告、预期、电话会、行情和宏观能力。

合规监控 Agent

按照司法辖区和客户策略选择制裁、负面新闻、KYC 与监管能力。

加密市场 Agent

寻找价格、成交量、流动性、新闻和链上能力,并保留场所与时间戳。

企业 Agent 平台

按照角色、部门、地区、数据合同和成本中心分配能力。

发现扩大 Agent 可以考虑的能力,路由策略则限定它真正可以执行的范围。

Getting Started with AI Agent Tool Discovery

Create a free QVeris account and generate an API key. Current onboarding includes 1,000 signup credits and 100 daily login credits. Discover and Inspect are always free; only Call consumes credits.

Use the Python SDK for application control, or connect Claude Code, Cursor, OpenCode, and other compatible clients through the QVeris MCP server. Start with a narrow intent and an allowlist, inspect candidate schemas, test calls with a small budget, then add routing rules and evaluation cases. Review the current documentation before deployment.

开始使用 AI Agent Tool Discovery

注册 QVeris 免费账户并生成 API Key。当前注册提供 1,000 积分,每日登录提供 100 积分;Discover 和 Inspect 永久免费,Call 才消耗积分。

应用可以使用 Python SDK,也可以通过 MCP 接入 Claude Code、Cursor 和 OpenCode。先从狭窄意图和 allowlist 开始,检查 schema、小预算测试 Call,再增加路由规则和评估案例。部署前查看最新文档

Why Capability Discovery for AI Agents Matters

Agents cannot become broadly useful by loading an ever-growing static list of functions. They need a controlled way to find relevant capabilities, understand contracts, select according to policy, and execute with traceable outcomes. QVeris provides that path through Discover, Inspect, and Call across a finance-oriented catalog.

The central value of capability discovery for AI agents is not unlimited tool access. It is making the path from intent to the right approved tool searchable, explainable, auditable, and economical.

为什么 Capability Discovery for AI Agents 很重要

Agent 不能依靠不断增长的静态函数列表实现通用能力。它需要受控地寻找相关工具、理解契约、按策略选择并执行,同时保留可追踪结果。

capability discovery for AI agents 的核心价值不是无限开放工具,而是让从意图到正确授权工具的路径可以搜索、解释、审计并控制成本。

Try QVeris AI Agent Capability Routing

Search capabilities for free, inspect complete schemas, and call the selected tool from Python or MCP.

体验 QVeris AI Agent Capability Routing

免费搜索能力、检查完整 schema,并通过 Python 或 MCP 调用选中的工具。

Official Sources for MCP Tool Discovery

MCP Tool Discovery 官方资料