fix(seo): correct OpenAI Agents SDK tutorial with real Python/API code#165
Open
BuyWhere wants to merge 4 commits into
Open
fix(seo): correct OpenAI Agents SDK tutorial with real Python/API code#165BuyWhere wants to merge 4 commits into
BuyWhere wants to merge 4 commits into
Conversation
…ce api-catalog - Add route handler for /.well-known/llms serving llms.txt with proper Content-Type - Add public/agents.json for AI agent discovery metadata - Add public/apps.json for app listing metadata - Enhance api-catalog route with MCP tools, auth, pricing, regions, categories - Follow existing inline Response.json pattern from the repo BUY-45795 (Traffic growth — 2,033→25,000 monthly visits)
…ence The static public/.well-known/api-catalog file was served by Next.js with application/octet-stream content-type and lacked MCP tools, auth details, pricing, and regions that the route handler provides. Removing it lets the route handler at src/app/.well-known/api-catalog/ serve the enhanced JSON with proper application/json content-type.
The previous draft used fictional npm packages (openai-agents, @buywhere/mcp-server) and TypeScript imports that don't exist. Fixed to use: - OpenAI Agents SDK (Python) with proper pip install - BuyWhere HTTP MCP API with httpx - Real function_tool decorators matching actual BuyWhere tools - Accurate tool list matching the BuyWhere MCP API schema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
The blog post
openai-agents-sdk-buywhere-mcp-tutorialwas drafted with fabricated code:openai-agents,@buywhere/mcp-server) and TypeScript imports — but OpenAI Agents SDK is Python-onlycreateBuyWhereMCPServer()does not exist; BuyWhere MCP is accessed via its HTTP APIget_price_history,get_price_alerts,compare_prices— actual BuyWhere tools aresearch_products,compare_products,get_deals,get_product,list_categories,find_best_priceRewrite includes
pip install openai-agents httpx python-dotenv@function_tooldecorated functions calling BuyWhere HTTP MCP APIserver.jsonPublishes this overdue blog post to the
buzz/blog-posts-2026-06-18branch alongside the other queued posts.