--- title: OpenAI Functions Agent node documentation description: Learn how to use the OpenAI Functions Agent of the AI Agent node in n8n. Follow technical documentation to integrate the OpenAI Functions Agent into your workflows. contentType: [integration, reference] priority: critical --- # OpenAI Functions Agent node Use the OpenAI Functions Agent node to use an [OpenAI functions model](https://platform.openai.com/docs/guides/function-calling). These are models that detect when a function should be called and respond with the inputs that should be passed to the function. Refer to [AI Agent](/08-0-0-Workflow/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/index.md) for more information on the AI Agent node itself. ```{include} ../../../../../../_snippets/integrations/builtin/cluster-nodes/use-with-chat-trigger.md ``` ```{note} OpenAI Chat Model required You must use the [OpenAI Chat Model](/08-0-0-Workflow/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/index.md) with this agent. ``` ## Node parameters Configure the OpenAI Functions Agent using the following parameters. ### Prompt ```{include} ../../../../../../_snippets/integrations/builtin/cluster-nodes/langchain-root-nodes/prompt.md ``` ### Require Specific Output Format ```{include} ../../../../../../_snippets/integrations/builtin/cluster-nodes/langchain-root-nodes/output-format.md ``` ## Node options Refine the OpenAI Functions Agent node's behavior using these options: ### System Message ```{include} ../../../../../../_snippets/integrations/builtin/cluster-nodes/langchain-root-nodes/system-message.md ``` ### Max Iterations ```{include} ../../../../../../_snippets/integrations/builtin/cluster-nodes/langchain-root-nodes/max-iterations.md ``` ### Return Intermediate Steps ```{include} ../../../../../../_snippets/integrations/builtin/cluster-nodes/langchain-root-nodes/return-intermediate-steps.md ``` ## Templates and examples Refer to the main AI Agent node's [Templates and examples](/08-0-0-Workflow/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/index.md#templates-and-examples) section. ## Common issues For common questions or issues and suggested solutions, refer to [Common issues](/08-0-0-Workflow/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/common-issues.md).