{"id":129,"date":"2026-10-17T14:16:03","date_gmt":"2026-10-17T14:16:03","guid":{"rendered":"http:\/\/plugin-docs.com\/?post_type=doc&#038;p=129"},"modified":"2026-10-18T11:04:34","modified_gmt":"2026-10-18T11:04:34","slug":"ai-agent-workflows-by-dragwyb-connect-openai","status":"publish","type":"doc","link":"https:\/\/dragwyb.com\/docs\/ai-agent-workflows-by-dragwyb-connect-openai\/","title":{"rendered":"Connect OpenAI"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The OpenAI chat action generates text using a model available through the WordPress AI Client integration included with AI Agent Workflows. You can use it as a regular workflow action or attach an OpenAI chat model to an AI Agent.<\/p>\n\n\n\n\n<p class=\"wp-block-paragraph\">Screenshot to add: OpenAI action configuration showing the API key and model fields<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Configure OpenAI<\/h2>\n\n\n<ol class=\"wp-block-list\">\n\n<li>Open the workflow editor and add the <strong>OpenAI Chat<\/strong> action from the available actions, or add an AI Agent and connect an OpenAI chat model.<\/li>\n\n\n<li>Select the OpenAI node to open its configuration.<\/li>\n\n\n<li>Enter a valid OpenAI API key when the node asks for provider credentials. The plugin checks the key with the provider before accepting it.<\/li>\n\n\n<li>Choose a text-generation model from the available model list. The list is loaded from the provider; model names are not fixed in the plugin documentation.<\/li>\n\n\n<li>Configure the prompt and map the input values required for the task.<\/li>\n\n\n<li>Save the workflow, run a test, and review the node output and any error message.<\/li>\n\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Use OpenAI with an AI Agent<\/h2>\n\n\n<p class=\"wp-block-paragraph\">For an agent, connect an OpenAI chat model to the AI Agent node on the canvas. The model connection is required. The agent&#8217;s prompt, optional system prompt, and other attachments are configured on the AI Agent node; the model node supplies the language model used to run it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n<ul class=\"wp-block-list\">\n\n<li><strong>No model options:<\/strong> confirm that the key was accepted, that the server can reach the provider, and that the provider returns text-generation models.<\/li>\n\n\n<li><strong>Provider request fails:<\/strong> check the key and provider account limits, then test again.<\/li>\n\n\n<li><strong>Unexpected output:<\/strong> make the prompt more specific and inspect the mapped input values.<\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Saving a key or choosing a model does not prove that the full workflow works. Verify the result with a test run.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Configure the OpenAI action and credentials for workflow AI tasks.<\/p>\n","protected":false},"author":0,"featured_media":0,"parent":128,"menu_order":0,"template":"","class_list":["post-129","doc","type-doc","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc\/129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc"}],"about":[{"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/types\/doc"}],"version-history":[{"count":2,"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc\/129\/revisions"}],"predecessor-version":[{"id":845,"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc\/129\/revisions\/845"}],"up":[{"embeddable":true,"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc\/128"}],"wp:attachment":[{"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/media?parent=129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}