Skip to content

feat(examples): add sports RPC example with ESPN API tool calls#14

Merged
robinandeer merged 1 commit intomainfrom
04-08-feat-examples-add-sports-rpc-example-with-espn-api-tool-calls
Apr 8, 2026
Merged

feat(examples): add sports RPC example with ESPN API tool calls#14
robinandeer merged 1 commit intomainfrom
04-08-feat-examples-add-sports-rpc-example-with-espn-api-tool-calls

Conversation

@robinandeer
Copy link
Copy Markdown
Collaborator

@robinandeer robinandeer commented Apr 8, 2026

Add a sports assistant RPC example that calls the ESPN public API — same endpoints a client reported 10s freezes on when used with tool calling.

What it demonstrates:

  • 4 backend RPC tools (get_scores, get_standings, get_news, get_leaders) making real HTTP requests to ESPN
  • Instrumented timed() wrapper on each tool handler that logs: when the call arrives, args, execution time, and response size returned to the model
  • Helps isolate whether latency is server-side (API call) or model-side (processing/speaking delay)

What we found testing it:

  • ESPN API calls complete in ~130-160ms
  • Full server-side tool execution is ~157ms
  • The reported freeze is model-side, not API-side
[rpc #1] ▶ get_standings called — args: {"league":"NBA"}
[espn] Fetching: .../basketball/nba/standings
[espn] Done in 157ms
[rpc #1] ◀ get_standings done — 157ms (613 bytes returned to model)

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
avatars-playground Ready Ready Preview, Comment Apr 8, 2026 10:01pm

Request Review

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@robinandeer robinandeer force-pushed the 04-08-feat-examples-add-sports-rpc-example-with-espn-api-tool-calls branch from effeda9 to e06d968 Compare April 8, 2026 22:01
@robinandeer robinandeer marked this pull request as ready for review April 8, 2026 22:08
@robinandeer robinandeer merged commit 3212e7c into main Apr 8, 2026
6 checks passed
@robinandeer robinandeer deleted the 04-08-feat-examples-add-sports-rpc-example-with-espn-api-tool-calls branch April 8, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants