Building with the OpenAI Apps SDK: A Field Guide
OpenAI's Apps SDK extends the Model Context Protocol with a widget layer: tools that return structuredContent with `_meta.openai/outputTemplate` metadata get rendered as inline React components in ChatGPT. Lessons from building a movie recommendation app (Express, TypeScript, Postgres, Valkey, Vite-bundled widgets) include keeping MCP tools portable across clients, iterating via an ngrok tunnel, and building a local widget harness with fixtures and a stubbed `window.openai.callTool()`. Opaque `424 Unhandled errors in TaskGroup` failures almost always come from response-shape mismatches, so log payloads and keep reference fixtures. The full chat loop has no built-in telemetry, so add timing instrumentation yourself.
Related posts
- Building a VSCode Chat Extension to Order Lunch
Neon mediumAdept
A VS Code Copilot chat participant can order Grubhub food by exposing reverse-engineered Grubhub endpoints as language model tools. Intercepting a real checkout with Chrome DevTools and Postman Interceptor showed that an order takes five calls: create cart, add line, set delivery info, attach payment, and checkout. Each endpoint becomes a JSON-schema tool declared in package.json and implemented with vscode.LanguageModelTool. The main lesson is that raw APIs make poor agent interfaces because they expose sessions and IDs that need extra calls, so they should be wrapped in simplified workflows.
- Working with ChatGPT Functions on Heroku
Heroku Engineering mediumAdeptMenu Maker is a Node.js reference app with a React front end and Express back end that turns a user's ingredient list into a fine-dining dish description, ingredient list and recipe using OpenAI's Chat Completions API. Function calling with a JSON-schema `updateDish` definition makes the model return structured arguments, so the front end can parse the response and pass it straight into React state instead of handling free-form prose. The walkthrough covers the prompt and function settings, the POST endpoint, testing with curl, and deploying to Heroku from GitHub with config vars. Development API costs were under $1, and an Eco dyno is enough for hosting.
- Making a web app generator with open ML models
Hugging Face mediumAdeptA Node.js/Express server can generate web apps from a text prompt by streaming tokens from a code LLM (WizardCoder-15B on Hugging Face Inference Endpoints) straight into the browser as HTML. Prompt tuning does most of the work: terse imperative instructions, pre-seeding the output with `<html><body class=...>`, and requiring TailwindCSS so styles arrive inline without a stylesheet that stalls rendering. Image URLs come from a Stable Diffusion `/image` endpoint that the model is told to call. Alpine.js provides a minimal UI, and DaisyUI's shorthand classes cut token usage compared with verbose Tailwind utility classes.
- The Open Source AI Stack
Together AI easyNoviceAdopting open models for agentic coding is framed as a five-layer "MIGHT" stack: model, inference provider, gateways/routers, harness and tools (skills and MCP), with each layer swappable independently so new models can be tried in minutes. Large MoE models like Kimi K3 suit ambiguous multi-step work such as refactors and debugging, while small models like GLM 5.3 Flash are roughly 20x cheaper and match them on tightly scoped tasks. Gateways such as OpenRouter, Vercel AI Gateway and LiteLLM route across providers, and harnesses like OpenCode or Amp execute the tool calls the model requests. The practical advice is to treat model choice as tool selection and to start fresh sessions often to keep context clean.
- Tiny Agents: an MCP-powered agent in 50 lines of code
Hugging Face mediumAdeptAn LLM agent built on the Model Context Protocol reduces to a simple while loop around an MCP-aware inference client: connect to MCP servers, convert their tools into OpenAI-style function definitions, pass them to the chat-completion call, execute returned tool calls via the MCP SDK, and feed results back. The TypeScript implementation in huggingface.js extends InferenceClient into an McpClient that holds one session per server and maps tool names to sessions. An Agent class adds a system prompt plus two control-flow tools (task_complete, ask_question). The loop alternates tool calls and results until an exit tool is called, the model answers twice without tools, or a turn limit is reached. The default setup uses Qwen2.5-72B on Nebius, and the model, provider and MCP servers can be swapped.