Once you have your OpenAI API key, go to project settings (click the “wizard” in the top right > Workspace > Preferences) and enter the OpenAI API key under the section labeled OpenAI.
Generate pipeline using AI
When creating a new pipeline, select the option labeled Using AI.Then, type the description of what the pipeline should do.For example:Load data from an API,
then clean the column names,
and finally export the dataframe to PostgreSQL.
Generate block using AI
You must turn on the feature named add_new_block_v2
in your project settings. (click the “wizard” in the top right > Workspace > Preferences)
When adding a new block, type in the description of what you want the block to do.
In the autocomplete dropdown list, select the 1st option with a label starting withGenerate block using AI: …
Document code using AI
Add documentation for a block
On the edit pipeline page in the top right corner of a block, click the AI actions icon.
Select the option labeled Document block.
Add documentation for a pipeline and all its blocks
On the edit pipeline page in the top right corner of a block, click the AI actions icon.
Select the option labeled Document pipeline and all blocks.
Add comments in a block
On the edit pipeline page in the top right corner of a block, click the AI actions icon.
Select the option labeled Add comments in code.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Mage","colors":{"primary":"#7E53F8","light":"#BFA8FF","dark":"#4C22C0"},"favicon":"/favicon.png","logo":{"light":"https://mintcdn.com/mage-staging/F-coujhKYsL8TShc/logo/light.svg?fit=max\u0026auto=format\u0026n=F-coujhKYsL8TShc\u0026q=85\u0026s=771e75dc9069a1ba245e251f78951bcd","dark":"https://mintcdn.com/mage-staging/F-coujhKYsL8TShc/logo/dark.svg?fit=max\u0026auto=format\u0026n=F-coujhKYsL8TShc\u0026q=85\u0026s=8d66f112b5ad4b8007c46ea8cee832da"},"api":{"playground":{"display":"none"}},"background":{"image":"https://mintlify.s3.us-west-1.amazonaws.com/mage-staging/background.png","decoration":null,"color":{"light":null,"dark":"#121212"}},"navbar":{"primary":{"type":"github","href":"https://github.com/mage-ai/mage-ai"}},"search":{"prompt":"✨ Make magic..."},"seo":{"metatags":{"og:image":"https://github.com/mage-ai/mage-ai/blob/master/docs/og.png?raw=True","og:description":"Mage is an open-source, hybrid framework for transforming and integrating data. Our docs are the best place to learn about making magical data pipelines.","og:site_name":"Mage Docs","twitter:site":"@mage_ai"},"indexing":"navigable"},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/magetech/","twitter":"https://twitter.com/mage_ai","facebook":"https://www.facebook.com/mageai","instagram":"https://www.instagram.com/mage_ai/","github":"https://www.github.com/mage-ai"}},"integrations":{"amplitude":{"apiKey":"b3c3b09423fea2abaae92c08b44de1c3"}},"navigation":{"global":{"anchors":[{"anchor":"Releases","href":"https://docs.mage.ai/about/releases","icon":"megaphone"},{"anchor":"Roadmap","href":"https://docs.mage.ai/about/roadmap","icon":"map"},{"anchor":"Troubleshooting","href":"https://docs.mage.ai/development/troubleshooting","icon":"question"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"mage-staging","hasAudioNarration":false,"actualSubdomain":"mage-staging","customDomains":[],"gitSource":{"type":"github","owner":"mage-ai","repo":"mage-ai","deployBranch":"docs-dev","contentDirectory":"docs","mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae91d067d088452a25a2aa4:success","clientVersion":"0.0.4347","searchFilterCounts":[{"language":"default","tag":"Docs","count":142},{"language":"default","tag":"Concepts","count":99},{"language":"default","tag":"Reference","count":58},{"language":"default","tag":"Deploy","count":40},{"language":"default","tag":"Configuration","count":31},{"language":"default","tag":"API","count":30},{"language":"default","tag":"Blocks","count":29},{"language":"default","tag":"Get Started","count":29},{"language":"default","tag":"Streaming","count":27},{"language":"default","tag":"Endpoints","count":26}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"_css/main.css","content":"img{max-height:450px;display:block;margin-left:auto;margin-right:auto}"}]}
{"page":{"pagePath":"guides/ai/overview","slug":"/guides/ai/overview","pageMetadata":{"title":"Using AI (artificial intelligence)","sidebarTitle":"Using AI","description":"Use AI to perform various actions in Mage.","icon":"microchip-ai","href":"/guides/ai/overview"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Use AI to perform various actions in Mage.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,p:`p`,..._provideComponents(),...props.components},{Frame,Heading,Note,OptimizedImage}=_components;if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);return _jsxs(_Fragment,{children:[_jsx(Frame,{children:_jsx(OptimizedImage,{alt:`Using artificial intelligence`,src:`https://steamuserimages-a.akamaihd.net/ugc/813376249149384255/EC3222795DC2961599F7FC0B69E0241C8EC7293E/?imw=5000\u0026imh=5000\u0026ima=fit\u0026impolicy=Letterbox\u0026imcolor=%23000000\u0026letterbox=false`})}),`\n`,_jsx(Heading,{level:`2`,id:`setup`,children:`Setup`}),`\n`,_jsx(_components.p,{children:`You need to add an OpenAI API key to your project before you can use AI for various actions.`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Read `,_jsx(_components.a,{href:`https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key`,children:`OpenAI’s documentation`}),`\nto get your API key.`]})}),`\n`,_jsxs(_components.p,{children:[`Once you have your OpenAI API key, go to project settings (click the “wizard” in the top right > Workspace > Preferences) and enter the OpenAI API key under the section labeled `,_jsx(`b`,{children:`OpenAI`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`generate-pipeline-using-ai`,children:`Generate pipeline using AI`}),`\n`,_jsxs(_components.p,{children:[`When creating a new pipeline, select the option labeled `,_jsx(`b`,{children:`Using AI`}),`.`]}),`\n`,_jsx(_components.p,{children:`Then, type the description of what the pipeline should do.`}),`\n`,_jsx(_components.p,{children:`For example:`}),`\n`,_jsx(_components.p,{children:_jsx(_components.em,{children:`Load data from an API,\nthen clean the column names,\nand finally export the dataframe to PostgreSQL.`})}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{alt:`Generate pipeline using AI`,src:`https://github.com/mage-ai/assets/blob/main/guides/ai/generate-pipeline.png?raw=true`})}),`\n`,_jsx(Heading,{level:`2`,id:`generate-block-using-ai`,children:`Generate block using AI`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`You must turn on the feature named `,_jsx(_components.code,{children:`add_new_block_v2`}),`\nin your project settings. (click the “wizard” in the top right > Workspace > Preferences)`]})}),`\n`,_jsx(_components.p,{children:`When adding a new block, type in the description of what you want the block to do.\nIn the autocomplete dropdown list, select the 1st option with a label starting with`}),`\n`,_jsx(`b`,{children:`Generate block using AI: …`}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{alt:`Generate block using AI`,src:`https://github.com/mage-ai/assets/blob/main/guides/ai/generate-block.png?raw=true`})}),`\n`,_jsx(Heading,{level:`2`,id:`document-code-using-ai`,children:`Document code using AI`}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{alt:`Add documentation using AI`,src:`https://github.com/mage-ai/assets/blob/main/guides/ai/document.png?raw=true`})}),`\n`,_jsx(Heading,{level:`3`,id:`add-documentation-for-a-block`,children:`Add documentation for a block`}),`\n`,_jsxs(_components.p,{children:[`On the edit pipeline page in the top right corner of a block, click the AI actions icon.\nSelect the option labeled `,_jsx(`b`,{children:`Document block`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`add-documentation-for-a-pipeline-and-all-its-blocks`,children:`Add documentation for a pipeline and all its blocks`}),`\n`,_jsxs(_components.p,{children:[`On the edit pipeline page in the top right corner of a block, click the AI actions icon.\nSelect the option labeled `,_jsx(`b`,{children:`Document pipeline and all blocks`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`add-comments-in-a-block`,children:`Add comments in a block`}),`\n`,_jsxs(_components.p,{children:[`On the edit pipeline page in the top right corner of a block, click the AI actions icon.\nSelect the option labeled `,_jsx(`b`,{children:`Add comments in code`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Using AI (artificial intelligence)","sidebarTitle":"Using AI","description":"Use AI to perform various actions in Mage.","icon":"microchip-ai","href":"/guides/ai/overview"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Setup","slug":"setup","depth":2,"children":[]},{"title":"Generate pipeline using AI","slug":"generate-pipeline-using-ai","depth":2,"children":[]},{"title":"Generate block using AI","slug":"generate-block-using-ai","depth":2,"children":[]},{"title":"Document code using AI","slug":"document-code-using-ai","depth":2,"children":[{"title":"Add documentation for a block","slug":"add-documentation-for-a-block","depth":3,"children":[]},{"title":"Add documentation for a pipeline and all its blocks","slug":"add-documentation-for-a-pipeline-and-all-its-blocks","depth":3,"children":[]},{"title":"Add comments in a block","slug":"add-comments-in-a-block","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"mage-staging","siteName":"Mage","title":"Using AI (artificial intelligence) - Mage","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-06T23:44:09.250Z","originalFileLocation":"guides/ai/overview.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Use AI to perform various actions in Mage.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Mage\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/mage-staging/9hbSRsJaqH6uNa8l/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/mage-staging/9hbSRsJaqH6uNa8l/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/mage-staging/9hbSRsJaqH6uNa8l/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/mage-staging/9hbSRsJaqH6uNa8l/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/mage-staging/9hbSRsJaqH6uNa8l/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/mage-staging/9hbSRsJaqH6uNa8l/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/mage-staging/9hbSRsJaqH6uNa8l/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/mage-staging/9hbSRsJaqH6uNa8l/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/mage-staging/9hbSRsJaqH6uNa8l/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Using AI (artificial intelligence) - Mage\">\u003cmeta data-mint-head property=\"og:description\" content=\"Mage is an open-source, hybrid framework for transforming and integrating data. Our docs are the best place to learn about making magical data pipelines.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Mage Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://mage-staging.mintlify.app/guides/ai/overview\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://github.com/mage-ai/mage-ai/blob/master/docs/og.png?raw=True\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Using AI (artificial intelligence) - Mage\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Mage is an open-source, hybrid framework for transforming and integrating data. Our docs are the best place to learn about making magical data pipelines.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://github.com/mage-ai/mage-ai/blob/master/docs/og.png?raw=True\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/mage-staging/9hbSRsJaqH6uNa8l/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Mage\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#7E53F8\">\u003clink data-mint-head rel=\"canonical\" href=\"https://mage-staging.mintlify.app/guides/ai/overview\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/ai/overview.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://mage-staging.mintlify.app/#organization\",\"name\":\"Mage\",\"url\":\"https://mage-staging.mintlify.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/mage-staging/F-coujhKYsL8TShc/logo/light.svg?fit=max\u0026auto=format\u0026n=F-coujhKYsL8TShc\u0026q=85\u0026s=771e75dc9069a1ba245e251f78951bcd\"}},{\"@type\":\"WebSite\",\"@id\":\"https://mage-staging.mintlify.app#website\",\"name\":\"Mage\",\"url\":\"https://mage-staging.mintlify.app\",\"publisher\":{\"@id\":\"https://mage-staging.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://mage-staging.mintlify.app/guides/ai/overview#webpage\",\"url\":\"https://mage-staging.mintlify.app/guides/ai/overview\",\"name\":\"Using AI (artificial intelligence)\",\"description\":\"Use AI to perform various actions in Mage.\",\"dateModified\":\"2026-01-06T23:44:09.250Z\",\"isPartOf\":{\"@id\":\"https://mage-staging.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://mage-staging.mintlify.app/guides/ai/overview#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://mage-staging.mintlify.app/guides/ai/overview#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tutorials\",\"item\":\"https://mage-staging.mintlify.app/guides/blocks/transformer-blocks\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using AI (artificial intelligence)\",\"item\":\"https://mage-staging.mintlify.app/guides/ai/overview\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://mage-staging.mintlify.app/guides/ai/overview#article\",\"headline\":\"Using AI (artificial intelligence)\",\"name\":\"Using AI (artificial intelligence)\",\"description\":\"Use AI to perform various actions in Mage.\",\"url\":\"https://mage-staging.mintlify.app/guides/ai/overview\",\"mainEntityOfPage\":{\"@id\":\"https://mage-staging.mintlify.app/guides/ai/overview#webpage\"},\"image\":\"https://github.com/mage-ai/mage-ai/blob/master/docs/og.png?raw=True\",\"dateModified\":\"2026-01-06T23:44:09.250Z\",\"publisher\":{\"@id\":\"https://mage-staging.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://mage-staging.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Mage\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Mage\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/guides/ai/overview.md","siteName":"Mage","nav":{"global":{"anchors":[{"anchor":"Releases","href":"https://docs.mage.ai/about/releases","icon":"megaphone"},{"anchor":"Roadmap","href":"https://docs.mage.ai/about/roadmap","icon":"map"},{"anchor":"Troubleshooting","href":"https://docs.mage.ai/development/troubleshooting","icon":"question"}]},"tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":"/introduction/overview"}]},{"tab":"Guides","groups":[{"group":"Get Started","pages":[{"title":"Mage Guides","icon":"fly","sidebarTitle":"Overview","href":"/guides/overview"}]},{"group":"Quickstarts","pages":[{"title":"ETL pipeline tutorial","sidebarTitle":"ETL pipeline","icon":"truck-ramp-box","href":"/guides/load-api-data"},{"title":"How to build a data integration pipeline","sidebarTitle":"Data integration","icon":"pipe-circle-check","href":"/guides/data-integration-pipeline"},{"title":"Make dbt magical","sidebarTitle":"Run dbt","icon":"table-tree","href":"/guides/setup-dbt"},{"title":"Integrate Mage into an existing Airflow project","sidebarTitle":"Trigger Mage from Airflow","icon":"arrows-spin","href":"/guides/integrate-mage-airflow"}]},{"group":"Tutorials","pages":[{"group":"Blocks","icon":"block-brick","pages":[{"title":"Transformer blocks","href":"/guides/blocks/transformer-blocks"},{"title":"SQL blocks","href":"/guides/blocks/sql-blocks"},{"title":"Dynamic blocks","href":"/guides/blocks/dynamic-blocks"},{"title":"Custom blocks","href":"/guides/blocks/custom-blocks"},{"title":"Markdown blocks","href":"/guides/blocks/markdown-blocks"},{"title":"R blocks","href":"/guides/blocks/r-blocks"},{"title":"Replicating blocks","href":"/guides/blocks/replicate-blocks"}]},{"group":"Pipelines","icon":"pipe-section","pages":[{"title":"Kafka streaming pipeline","href":"/guides/streaming-pipeline"},{"title":"🎏 Local stream to dbt transform","sidebarTitle":"Streaming + dbt transform","href":"/guides/streaming/magic-devcontainer"},{"title":"RabbitMQ streaming pipeline","href":"/guides/streaming-pipeline-rabbitmq"},{"title":"Machine learning pipeline tutorial","sidebarTitle":"ML pipeline","href":"/guides/train-model"}]},{"title":"Develop dbt in Mage","sidebarTitle":"Develop dbt","icon":"block","description":"Learn how to develop your favorite dbt models in Mage.","href":"/guides/dbt/developing-dbt-in-mage"},{"group":"Using AI","icon":"microchip-ai","pages":[{"title":"Using AI (artificial intelligence)","sidebarTitle":"Using AI","icon":"microchip-ai","href":"/guides/ai/overview"},{"title":"AI Clients","description":"Use and enable differnt AI clients.","href":"/guides/ai/ai-client"}]},{"title":"Connect a local db in Docker","sidebarTitle":"Connect a local db in Docker","icon":"docker","href":"/guides/docker/connecting-a-database"},{"title":"Community Examples","icon":"people","href":"/guides/community-examples"},{"title":"Mage tips \u0026 tricks","sidebarTitle":"Tips \u0026 tricks","icon":"question","href":"/guides/tips-and-tricks"}]}]},{"tab":"API","pages":[{"title":"API","href":"/api-reference/overview"}]},{"tab":"Deploy","pages":[{"title":"Deploy","href":"/production/deploying-to-cloud/architecture"}]},{"tab":"Contribute","pages":[{"title":"Contribute","href":"/contributing/overview"}]},{"tab":"Slack","href":"https://www.mage.ai/chat"}]},"basePath":"","title":"Using AI (artificial intelligence) - Mage","deploymentId":"dpl_6UE2cqB47X6P7P3F2hD3UphW6ijc","buildId":"dpl_6UE2cqB47X6P7P3F2hD3UphW6ijc","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-otd7Y6S-.js","DynamicMarkdown-QJ7LkRm3.js","zoom-image-lightbox-BodsesVp.js","lightbox-handle-r17bVUz3.js"]}