提示词库/任务指令/Building a Coding Agent with GPT-5.1 and the OpenAI Agents SDK
Building a Coding Agent with GPT-5.1 and the OpenAI Agents SDK
exp-0419未验证
# Building a Coding Agent with GPT-5.1 and the OpenAI Agents SDK
GPT-5.1 is exceptionally strong at coding, and with the new code-editing and command-execution tools available in the [Responses API](https://platform.openai.com/docs/api-reference/responses), it’s now easier than ever to build coding agents that can work across full codebases and iterate quickly.
In this guide, we’ll use the [Agents SDK](https://openai.github.io/openai-agents-python/) to build a **coding agent that can scaffold a brand-new app from a prompt and refine it through user feedback**. Our agent will be equipped with the following tools:
- **apply_patch** — to edit files
- **shell** — to run shell commands
- **web_search** — to pull fresh information from the web
- **Context7 MCP** — to access up-to-date documentation
We’ll begin by focusing on the `shell` and `web_search` tools to generate a new project with web-sourced context. Then we’ll add `apply_patch` so the agent can iterate on the codebase, and we’ll connect it to the [Context7 MCP server](https://context7.com/) so it can write code informed by the most recent docs.