mcpField
G
get-executions

get-executions

github.com/bolna-ai数据与数据库368 次安装3 天前更新
代码仓库

关于 get-executions

用于通过 Bolna 获取单次执行、原始日志和分页通话记录的 Skill,帮助运营人员检查通话结果、排查问题并查看成本与执行数据。

主要功能

  1. 01获取执行详情
  2. 02读取原始执行日志
  3. 03列出 Agent 和批次执行
  4. 04分页读取 Agent 历史记录
  5. 05查看状态、成本和通话数据

适用场景

  1. 01查看通话记录与结果
  2. 02排查延迟或工具调用失败
  3. 03调查通话成本与重试历史

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/bolna-ai/skills --skill get-executions

安装后在 Claude Code 中输入/get-executions确认已加载。

附带文件scripts/fetch_executions_paginated.py

详细介绍

获取 Bolna 执行记录

端点

  • 获取执行记录:GET https://api.bolna.ai/executions/{execution_id}
  • 获取原始日志:GET https://api.bolna.ai/executions/{execution_id}/log
  • 列出 Agent 执行记录:GET https://api.bolna.ai/v2/agent/{agent_id}/executions
  • 列出批次执行记录:GET https://api.bolna.ai/batches/{batch_id}/executions

使用 Authorization: Bearer $BOLNA_API_KEY。

执行对象

常见字段包括:

  • id、agent_id、batch_id
  • conversation_time、total_cost、cost_breakdown
  • status、error_message、answered_by_voice_mail
  • transcript、recording_url
  • created_at、updated_at
  • telephony_data:服务提供商、呼入/呼出号码、通话类型、服务提供商通话 ID、挂断原因/代码、振铃时长、拨号后延迟、运营商详情。
  • transfer_call_data:转接通话的详情。
  • batch_run_details:重试和批次元数据。
  • extracted_data:来自处置结果或提取提示词的结构化数据。
  • context_details:上下文变量和相关元数据。

需要处理的状态

常见状态包括 scheduled、queued、rescheduled、initiated、ringing、in-progress、call-disconnected、completed、balance-low、busy、no-answer、canceled、failed、stopped 和 error。

completed 表示后处理已完成,而不只是音频结束。

单次执行

curl --request GET \
  --url "https://api.bolna.ai/executions/$EXECUTION_ID" \
  --header "Authorization: Bearer $BOLNA_API_KEY"

原始日志

curl --request GET \
  --url "https://api.bolna.ai/executions/$EXECUTION_ID/log" \
  --header "Authorization: Bearer $BOLNA_API_KEY"

在调试延迟、检查提示词、排查服务提供商请求/响应问题、工具调用失败或意外模型输出时,请使用原始日志。

分页查看 Agent 历史记录

curl --request GET \
  --url "https://api.bolna.ai/v2/agent/$AGENT_ID/executions?page_number=1&page_size=50" \
  --header "Authorization: Bearer $BOLNA_API_KEY"

使用 has_more 获取下一页。page_size 最大为 50。

调试对照表

  • 长时间停顿:检查转录器端点检测、大模型延迟、合成器延迟和 incremental_delay。
  • 用户被截断:增大 number_of_words_for_interruption 或调整端点检测。
  • 无声挂断:检查 hangup_after_silence、call_terminate 和挂断代码。
  • 未收到 webhook:在此处查询执行状态,然后检查 setup-webhook 配置。
  • 费用激增:检查 conversation_time、重试历史记录和 cost_breakdown。

完整的排查手册请参阅 debug-bolna-calls/SKILL.md 和 debug-bolna-calls/references/latency-metrics.md。

脚本

# Paginate through all executions for an agent
python3 get-executions/scripts/fetch_executions_paginated.py --agent-id $AGENT_ID

另请参阅

  • https://raw.githubusercontent.com/bolna-ai/skills/main/references/execution-payload.md — 集中列出执行对象的所有字段。
  • https://raw.githubusercontent.com/bolna-ai/skills/main/references/call-statuses.md — 完整的生命周期和终止状态模式。
  • https://raw.githubusercontent.com/bolna-ai/skills/main/references/hangup-codes.md — hangup_by、hangup_code 和 hangup_reason 的解读。
  • setup-webhook — 实时推送相同结构的载荷。
  • debug-bolna-calls — 基于执行记录和原始日志整理的症状与修复方法对照表。

评论

支持 Markdown