[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73772":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},73772,"openai-agents-js","openai\u002Fopenai-agents-js","openai","A lightweight, powerful framework for multi-agent workflows and voice agents","https:\u002F\u002Fopenai.github.io\u002Fopenai-agents-js\u002F",null,"TypeScript",3196,809,35,34,0,15,44,193,45,110.73,"MIT License",false,"main",true,[27,7,28,29,30],"agents","openai-api","realtime-api","typescript","2026-06-12 04:01:11","# OpenAI Agents SDK (JavaScript\u002FTypeScript)\n\n[![npm version](https:\u002F\u002Fbadge.fury.io\u002Fjs\u002F@openai%2Fagents.svg)](https:\u002F\u002Fbadge.fury.io\u002Fjs\u002F@openai%2Fagents) [![CI](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-agents-js\u002Factions\u002Fworkflows\u002Ftest.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-agents-js\u002Factions\u002Fworkflows\u002Ftest.yml)\n\nThe OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows in JavaScript\u002FTypeScript. It is provider-agnostic, supporting OpenAI APIs and more.\n\n\u003Cimg src=\"https:\u002F\u002Fcdn.openai.com\u002FAPI\u002Fdocs\u002Fimages\u002Forchestration.png\" alt=\"Image of the Agents Tracing UI\" style=\"max-height: 803px;\">\n\n> [!NOTE] \n> Looking for the Python version? Check out [OpenAI Agents SDK Python](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-agents-python).\n\n## Core concepts\n\n1. [**Agents**](https:\u002F\u002Fopenai.github.io\u002Fopenai-agents-js\u002Fguides\u002Fagents): LLMs configured with instructions, tools, guardrails, and handoffs\n1. [**Sandbox Agents**](https:\u002F\u002Fopenai.github.io\u002Fopenai-agents-js\u002Fguides\u002Fsandbox-agents): Agents paired with a filesystem workspace and sandbox environment for longer-running work\n1. **[Agents as tools](https:\u002F\u002Fopenai.github.io\u002Fopenai-agents-js\u002Fguides\u002Ftools\u002F#4-agents-as-tools) \u002F [Handoffs](https:\u002F\u002Fopenai.github.io\u002Fopenai-agents-js\u002Fguides\u002Fhandoffs\u002F)**: Delegating to other agents for specific tasks\n1. [**Tools**](https:\u002F\u002Fopenai.github.io\u002Fopenai-agents-js\u002Fguides\u002Ftools\u002F): Various Tools let agents take actions (functions, MCP, hosted tools)\n1. [**Guardrails**](https:\u002F\u002Fopenai.github.io\u002Fopenai-agents-js\u002Fguides\u002Fguardrails\u002F): Configurable safety checks for input and output validation\n1. [**Human in the loop**](https:\u002F\u002Fopenai.github.io\u002Fopenai-agents-js\u002Fguides\u002Fhuman-in-the-loop\u002F): Built-in mechanisms for involving humans across agent runs\n1. [**Sessions**](https:\u002F\u002Fopenai.github.io\u002Fopenai-agents-js\u002Fguides\u002Fsessions\u002F): Automatic conversation history management across agent runs\n1. [**Tracing**](https:\u002F\u002Fopenai.github.io\u002Fopenai-agents-js\u002Fguides\u002Ftracing\u002F): Built-in tracking of agent runs, allowing you to view, debug and optimize your workflows\n1. [**Realtime Agents**](https:\u002F\u002Fopenai.github.io\u002Fopenai-agents-js\u002Fguides\u002Fvoice-agents\u002Fquickstart\u002F): Build powerful voice agents with full features\n\nExplore the [`examples\u002F`](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-agents-js\u002Ftree\u002Fmain\u002Fexamples) directory to see the SDK in action.\n\n## Get started\n\n### Supported environments\n\n- Node.js 22 or later\n- Deno\n- Bun\n\n#### Experimental support:\n\n- Cloudflare Workers with `nodejs_compat` enabled\n\n[Check out the documentation](https:\u002F\u002Fopenai.github.io\u002Fopenai-agents-js\u002Fguides\u002Ftroubleshooting\u002F) for more detailed information.\n\n### Installation\n\n```bash\nnpm install @openai\u002Fagents zod\n```\n\n### Run your first Sandbox Agent\n\n[Sandbox Agents](https:\u002F\u002Fopenai.github.io\u002Fopenai-agents-js\u002Fguides\u002Fsandbox-agents) are in beta. A sandbox agent can inspect files, run commands, apply patches, and carry workspace state across longer tasks.\n\n```js\nimport { run } from '@openai\u002Fagents';\nimport { gitRepo, SandboxAgent } from '@openai\u002Fagents\u002Fsandbox';\nimport { UnixLocalSandboxClient } from '@openai\u002Fagents\u002Fsandbox\u002Flocal';\n\nconst agent = new SandboxAgent({\n  name: 'Workspace Assistant',\n  instructions: 'Inspect the sandbox workspace before answering.',\n  defaultManifest: {\n    entries: {\n      repo: gitRepo({\n        repo: 'openai\u002Fopenai-agents-js',\n        ref: 'main',\n      }),\n    },\n  },\n});\n\nconst result = await run(\n  agent,\n  'Inspect repo\u002FREADME.md and summarize what this project does.',\n  {\n    sandbox: {\n      client: new UnixLocalSandboxClient(),\n    },\n  },\n);\n\nconsole.log(result.finalOutput);\n\u002F\u002F This project provides a JavaScript\u002FTypeScript SDK for building agent workflows.\n```\n\n(_If running this, ensure you set the `OPENAI_API_KEY` environment variable_)\n\n### Run an agent without a sandbox\n\nYou can still use a regular `Agent` when your workflow does not need a filesystem workspace or sandbox lifecycle.\n\n```js\nimport { Agent, run } from '@openai\u002Fagents';\n\nconst agent = new Agent({\n  name: 'Assistant',\n  instructions: 'You are a helpful assistant',\n});\n\nconst result = await run(\n  agent,\n  'Write a haiku about recursion in programming.',\n);\nconsole.log(result.finalOutput);\n\u002F\u002F Code within the code,\n\u002F\u002F Functions calling themselves,\n\u002F\u002F Infinite loop's dance.\n```\n\nExplore the [`examples\u002F`](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-agents-js\u002Ftree\u002Fmain\u002Fexamples) directory to see the SDK in action.\n\n## Acknowledgements\n\nWe'd like to acknowledge the excellent work of the open-source community, especially:\n\n- [zod](https:\u002F\u002Fgithub.com\u002Fcolinhacks\u002Fzod) (schema validation)\n- [Starlight](https:\u002F\u002Fgithub.com\u002Fwithastro\u002Fstarlight)\n- [vite](https:\u002F\u002Fgithub.com\u002Fvitejs\u002Fvite) and [vitest](https:\u002F\u002Fgithub.com\u002Fvitest-dev\u002Fvitest)\n- [pnpm](https:\u002F\u002Fpnpm.io\u002F)\n- [Next.js](https:\u002F\u002Fgithub.com\u002Fvercel\u002Fnext.js)\n\nWe're committed to building the Agents SDK as an open source framework so others in the community can expand on our approach.\n\nFor more details, see the [documentation](https:\u002F\u002Fopenai.github.io\u002Fopenai-agents-js) or explore the [`examples\u002F`](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-agents-js\u002Ftree\u002Fmain\u002Fexamples) directory.\n","OpenAI Agents SDK 是一个轻量级但功能强大的框架，用于在 JavaScript\u002FTypeScript 中构建多代理工作流。其核心功能包括配置有指令、工具、防护措施和任务交接的代理（Agents），以及支持文件系统工作区和沙箱环境的沙箱代理（Sandbox Agents）。此外，它还提供了代理作为工具使用、各种工具集成、安全检查、人类参与机制、会话管理和实时跟踪等功能。该框架适合需要创建复杂对话或自动化流程的应用场景，如客户服务聊天机器人、个人助手等，并且能够无缝集成到现有的Node.js、Deno或Bun环境中运行。",2,"2026-06-11 03:47:18","high_star"]