SPB Git

Repository Public

node-reference.md 5.6 KB 104 lines markdown

1# Node reference23> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.45[Agent Builder](https://platform.openai.com/agent-builder) is a visual canvas for composing agentic workflows. Workflows are made up of nodes and connections that control the sequence and flow. Insert nodes, then configure and connect them to define the process you want your agents to follow.67OpenAI is deprecating Agent Builder. Existing users can continue using it8  during the transition window, and the product is scheduled to shut down on9  November 30, 2026. ChatKit remains available. See the [deprecations10  page](https://developers.openai.com/api/docs/deprecations#2026-06-03-agent-builder) for the current11  timeline.1213Explore all available nodes below. To learn more, read the [Agent Builder guide](https://developers.openai.com/api/docs/guides/agent-builder).1415### Core nodes1617Get started with basic building blocks. All workflows have start and agent nodes.1819![core nodes](https://cdn.openai.com/API/docs/images/core-nodes2.png)2021#### Start2223Define inputs to your workflow. For user input in a chat workflow, start nodes do two things:2425- Append the user input to the conversation history26- Expose `input_as_text` to represent the text contents of this input2728All chat start nodes have `input_as_text` as an input variable. You can add state variables too.2930#### Agent3132Define instructions, tools, and model configuration, or attach evaluations.3334Keep each agent well defined in scope. In our homework helper example, we use one agent to rewrite the user's query for more specificity and relevance with the knowledge base. We use another agent to classify the query as either Q&A or fact-finding, and another agent to field each type of question.3536Add model behavior instructions and user messages as you would with any other model prompt. To pipe output from a previous step, you can add it as context.3738You can have as many agent nodes as you'd like.3940#### Note4142Leave comments and explanations about your workflow. Unlike other nodes, notes don't _do_ anything in the flow. They're just helpful commentary for you and your team.4344### Tool nodes4546Tool nodes let you equip your agents with tools and external services. You can retrieve data, monitor for misuse, and connect to external services.4748![tool nodes](https://cdn.openai.com/API/docs/images/tool-nodes2.png)4950#### File search5152Retrieve data from vector stores you've created in the OpenAI platform. Search by vector store ID, and add a query for what the model should search for. You can use variables to include output from previous nodes in the workflow.5354See the [file search documentation](https://developers.openai.com/api/docs/guides/tools-file-search) to set up vector stores and see supported file types.5556To search outside of your hosted storage with OpenAI, use [MCP](#mcp) instead.5758#### Guardrails5960Set up input monitors for unwanted inputs such as personally identifiable information (PII), jailbreaks, hallucinations, and other misuse.6162Guardrails are pass/fail by default, meaning they test the output from a previous node, and you define what happens next. When there's a guardrails failure, we recommend either ending the workflow or returning to the previous step with a reminder of safe use.6364#### MCP6566Call third-party tools and services. Connect with OpenAI connectors or third-party servers, or add your own server. MCP connections are helpful in a workflow that needs to read or search data in another application, like Gmail or Zapier.6768Browse options in the Agent Builder. To learn more about MCP, see the [MCP documentation](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).6970### Logic nodes7172![logic nodes](https://cdn.openai.com/API/docs/images/logic-nodes.png)7374Logic nodes let you write custom logic and define the control flow—for example, looping on custom conditions, or asking the user for approval before continuing an operation.7576#### If/else7778Add conditional logic. Use [Common Expression Language](https://cel.dev/) (CEL) to create a custom expression. Useful for defining what to do with input that's been sorted into classifications.7980For example, if an agent classifies input as Q&A, route that query to the Q&A agent for a straightforward answer. If it's an open-ended query, route to an agent that finds relevant facts. Else, end the workflow.8182#### While8384Loop on custom conditions. Use [Common Expression Language](https://cel.dev/) (CEL) to create a custom expression. Useful for checking whether a condition is still true.8586#### Human approval8788Defer to end-users for approval. Useful for workflows where agents draft work that could use a human review before it goes out.8990For example, picture an agent workflow that sends emails on your behalf. You'd include an agent node that outputs an email widget, then a human approval node immediately following. You can configure the human approval node to ask, "Would you like me to send this email?" and, if approved, proceeds to an MCP node that connects to Gmail.9192### Data nodes9394Data nodes let you define and manipulate data in your workflow. Reshape outputs or define global variables for use across your workflow.9596![data nodes](https://cdn.openai.com/API/docs/images/data-nodes.png)9798#### Transform99100Reshape outputs (for example, object → array). Useful for enforcing types to adhere to your schema or reshaping outputs for agents to read and understand as inputs.101102#### Set state103104Define global variables for use across the workflow. Useful for when an agent takes input and outputs something new that you'll want to use throughout the workflow. You can define that output as a new global variable.
Files main
Menu

Theme