The Loop node allows you to repeat a sequence of tasks multiple times in your workflow. You can loop either a fixed
number of times or iterate through a list of items. This is perfect for processing multiple files, handling user data in
batches, or any repetitive operations.
Instead of typing manually, you can use the parameter picker:
Click the “Select Parameter” button
Choose the source task from the dropdown
Select whether you want an input or output parameter
Pick the specific field name
For objects, drill down to the array property you need
The selected parameter must result in either a number (for count loops) or
an array (for list loops). If the parameter type doesn’t match, the loop
won’t work correctly.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"GAIFE Docs","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintlify.s3.us-west-1.amazonaws.com/gaife/public/logo/light.png","dark":"https://mintlify.s3.us-west-1.amazonaws.com/gaife/public/logo/dark.png"},"favicon":"./public/favicon.svg","navbar":{"links":[{"label":"Support","href":"mailto:admin@gaife.com"}]},"footer":{"socials":{"github":"https://github.com/gaife","linkedin":"https://www.linkedin.com/company/gaife/","x":"https://x.com/gaife_official"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"gaife","hasAudioNarration":false,"actualSubdomain":"gaife","customDomains":["docs.gaife.com"],"gitSource":{"type":"github","owner":"gaife","repo":"developer_docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21e6e2f325d2bf10060f9d","collectionId":"5d6d98d9-3501-496b-aa90-1c32ca5f141f","schemaVersion":"v2"},"entitlements":{},"buildId":"6a21e6e2f325d2bf10060f9d:success","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"Guides","count":26},{"language":"default","tag":"Chat","count":9},{"language":"default","tag":"Tasks","count":7},{"language":"default","tag":"Agent","count":3},{"language":"default","tag":"Tools","count":3},{"language":"default","tag":"Firecrawl","count":3},{"language":"default","tag":"Knowledge","count":2},{"language":"default","tag":"Parameters","count":2},{"language":"default","tag":"Examples","count":1},{"language":"default","tag":"WhatsApp","count":1}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","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":"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":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","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":"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":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","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":"workos-signup","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":"workos-enabled","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":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"agent/tasks/loop-task","slug":"/agent/tasks/loop-task","pageMetadata":{"title":"Loop Task","description":"This page gives you an overview of the Loop Task in Agent Builder","sidebarTitle":"Loop Task","icon":"repeat","href":"/agent/tasks/loop-task"},"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: \"This page gives you an overview of the Loop Task in Agent Builder\"\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`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Mermaid,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Mermaid)_missingMdxReference(`Mermaid`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`The Loop node allows you to repeat a sequence of tasks multiple times in your workflow. You can loop either a fixed\nnumber of times or iterate through a list of items. This is perfect for processing multiple files, handling user data in\nbatches, or any repetitive operations.`}),`\n`,_jsx(Heading,{level:`2`,id:`when-to-use-loop-nodes`,children:`When to Use Loop Nodes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Process multiple files or documents`}),`\n`,_jsx(_components.li,{children:`Handle lists of users, orders, or records`}),`\n`,_jsx(_components.li,{children:`Retry operations multiple times`}),`\n`,_jsx(_components.li,{children:`Generate multiple variations of content`}),`\n`,_jsx(_components.li,{children:`Batch process large datasets`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`adding-a-loop-node`,children:`Adding a Loop Node`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Drag the Loop node from the node palette onto your workflow canvas`}),`\n`,_jsx(_components.li,{children:`Connect it to your previous task`}),`\n`,_jsx(_components.li,{children:`Configure the loop settings in the properties panel`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`required-configuration`,children:`Required Configuration`}),`\n`,_jsx(Heading,{level:`3`,id:`basic-settings`,children:`Basic Settings`}),`\n`,_jsx(Heading,{level:`4`,id:`node-name`,children:`Node Name`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Field`}),`: Node Name`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Required`}),`: Yes`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Description`}),`: Give your loop a descriptive name like “Process User Records” or “Retry API Calls”`]}),`\n`]}),`\n`,_jsx(Heading,{level:`4`,id:`iteration-type`,children:`Iteration Type`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Field`}),`: Iteration Type`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Required`}),`: Yes`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Options`}),`:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Count`}),`: Loop a specific number of times`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`List`}),`: Loop through each item in an array`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`4`,id:`iteration-parameter`,children:`Iteration Parameter`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Field`}),`: Iteration Parameter`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Required`}),`: Yes`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Description`}),`: This controls how many times the loop runs or what list to iterate through`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`setting-up-iteration-parameters`,children:`Setting Up Iteration Parameters`}),`\n`,_jsx(Heading,{level:`3`,id:`for-count-loops`,children:`For Count Loops`}),`\n`,_jsxs(_components.p,{children:[`When using `,_jsx(_components.strong,{children:`Count`}),` iteration type, the parameter must be a `,_jsx(_components.strong,{children:`number`}),`:`]}),`\n`,_jsx(Heading,{level:`4`,id:`manual-entry`,children:`Manual Entry`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`5`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`4`,id:`reference-from-previous-task`,children:`Reference from Previous Task`}),`\n`,_jsx(CodeBlock,{numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`setup_task.output.batch_count`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`get_config.input.retry_attempts`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`for-list-loops`,children:`For List Loops`}),`\n`,_jsxs(_components.p,{children:[`When using `,_jsx(_components.strong,{children:`List`}),` iteration type, the parameter must be an `,_jsx(_components.strong,{children:`array`}),`:`]}),`\n`,_jsx(Heading,{level:`4`,id:`basic-array-reference`,children:`Basic Array Reference`}),`\n`,_jsx(CodeBlock,{numberOfLines:`4`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`data_fetch.output.users`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`file_processor.output.documents`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`api_call.input.items_to_process`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`4`,id:`object-with-array-property`,children:`Object with Array Property`}),`\n`,_jsx(CodeBlock,{numberOfLines:`4`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`database_query.output.results.records`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`api_response.output.data.customers`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`user_data.input.profile.addresses`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`4`,id:`nested-object-properties`,children:`Nested Object Properties`}),`\n`,_jsx(CodeBlock,{numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`complex_data.output.response.users.active_users`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`report_data.output.analytics.metrics.daily_stats`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`using-the-parameter-picker`,children:`Using the Parameter Picker`}),`\n`,_jsx(_components.p,{children:`Instead of typing manually, you can use the parameter picker:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Click the `,_jsx(_components.strong,{children:`“Select Parameter”`}),` button`]}),`\n`,_jsx(_components.li,{children:`Choose the source task from the dropdown`}),`\n`,_jsxs(_components.li,{children:[`Select whether you want an `,_jsx(_components.strong,{children:`input`}),` or `,_jsx(_components.strong,{children:`output`}),` parameter`]}),`\n`,_jsx(_components.li,{children:`Pick the specific field name`}),`\n`,_jsx(_components.li,{children:`For objects, drill down to the array property you need`}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The selected parameter must result in either a `,_jsx(_components.strong,{children:`number`}),` (for count loops) or\nan `,_jsx(_components.strong,{children:`array`}),` (for list loops). If the parameter type doesn’t match, the loop\nwon’t work correctly.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`loop-flow-configuration`,children:`Loop Flow Configuration`}),`\n`,_jsx(Heading,{level:`3`,id:`loop-start-block`,children:`Loop Start Block`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Field`}),`: Loop Start Block`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Required`}),`: Yes`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Description`}),`: The first task that runs inside each loop iteration`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`UI`}),`: Dropdown showing available tasks in your workflow`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`loop-end-blocks`,children:`Loop End Block(s)`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Field`}),`: Loop End Blocks`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Required`}),`: Yes`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Description`}),`: The task(s) that can end each loop iteration`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`UI`}),`: Multi-select dropdown for multiple possible end points`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`exit-block`,children:`Exit Block`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Field`}),`: Exit Block`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Required`}),`: Yes`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Description`}),`: The task that runs after all loop iterations complete`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`UI`}),`: Dropdown showing available tasks`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`loop-structure-visual`,children:`Loop Structure Visual`}),`\n`,_jsx(Mermaid,{chart:`graph TD\n A[Previous Task] --> B[Loop Node]\n B --> C[Loop Start Block]\n C --> D[Task 1]\n D --> E[Task 2]\n E --> F[Loop End Block]\n F --> G{More Items?}\n G -->|Yes| C\n G -->|No| H[Exit Block]\n H --> I[Next Task]`}),`\n`,_jsx(Heading,{level:`2`,id:`practical-examples`,children:`Practical Examples`}),`\n`,_jsx(Heading,{level:`3`,id:`example-1-processing-user-list`,children:`Example 1: Processing User List`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Scenario`}),`: You have a list of users and want to send each one a personalized email.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Configuration`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Iteration Type`}),`: List`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Iteration Parameter`}),`: `,_jsx(_components.code,{children:`user_fetch.output.users`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Loop Start Block`}),`: `,_jsx(_components.code,{children:`generate_email`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Loop End Block`}),`: `,_jsx(_components.code,{children:`send_email`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Exit Block`}),`: `,_jsx(_components.code,{children:`send_summary_report`})]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`example-2-retry-mechanism`,children:`Example 2: Retry Mechanism`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Scenario`}),`: Try an API call up to 3 times if it fails.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Configuration`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Iteration Type`}),`: Count`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Iteration Parameter`}),`: `,_jsx(_components.code,{children:`3`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Loop Start Block`}),`: `,_jsx(_components.code,{children:`make_api_call`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Loop End Block`}),`: `,_jsx(_components.code,{children:`check_api_success`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Exit Block`}),`: `,_jsx(_components.code,{children:`handle_final_result`})]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`example-3-batch-file-processing`,children:`Example 3: Batch File Processing`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Scenario`}),`: Process files in batches based on system capacity.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Configuration`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Iteration Type`}),`: Count`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Iteration Parameter`}),`: `,_jsx(_components.code,{children:`config.output.number_of_batches`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Loop Start Block`}),`: `,_jsx(_components.code,{children:`fetch_file_batch`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Loop End Block`}),`: `,_jsx(_components.code,{children:`process_batch`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Exit Block`}),`: `,_jsx(_components.code,{children:`consolidate_results`})]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`advanced-parameter-examples`,children:`Advanced Parameter Examples`}),`\n`,_jsx(Heading,{level:`3`,id:`simple-array-from-api-response`,children:`Simple Array from API Response`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`api_call.output.data`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`nested-array-in-complex-object`,children:`Nested Array in Complex Object`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`database_query.output.results.users.active_list`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`configuration-based-count`,children:`Configuration-Based Count`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`system_config.input.processing_parameters.batch_size`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`calculated-count-from-previous-task`,children:`Calculated Count from Previous Task`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`data_analyzer.output.metrics.recommended_iterations`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`common-validation-errors`,children:`Common Validation Errors`}),`\n`,_jsx(Heading,{level:`3`,id:`”parameter-must-be-an-array”`,children:`”Parameter must be an array”`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Problem`}),`: You selected List iteration but the parameter is not an array`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Solution`}),`: Choose a parameter that contains a list of items, or switch to Count iteration`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`”parameter-must-be-a-number”`,children:`”Parameter must be a number”`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Problem`}),`: You selected Count iteration but the parameter is not a number`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Solution`}),`: Choose a numeric parameter, or switch to List iteration`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`”loop-start-block-not-found”`,children:`”Loop start block not found”`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Problem`}),`: The selected start block doesn’t exist in your workflow`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Solution`}),`: Create the task first, then select it as the start block`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`”circular-dependency-detected”`,children:`”Circular dependency detected”`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Problem`}),`: Your loop configuration creates a circular reference`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Solution`}),`: Ensure the loop exit block connects to a task outside the loop`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`loop-variable-access`,children:`Loop Variable Access`}),`\n`,_jsxs(_components.p,{children:[`During each iteration, your tasks can access loop information through the special `,_jsx(_components.code,{children:`__loop__`}),` variable:`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Available Properties`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`__loop__.current_iteration`}),` - Current iteration number (starts at 0)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`__loop__.total_iterations`}),` - Total number of iterations`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`__loop__.current_item`}),` - Current item being processed (List loops only)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`__loop__.is_first`}),` - True if this is the first iteration`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`__loop__.is_last`}),` - True if this is the last iteration`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`best-practices`,children:`Best Practices`}),`\n`,_jsx(Heading,{level:`3`,id:`-do’s`,children:`✅ Do’s`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use descriptive names`}),` for your loop nodes`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Test with small datasets`}),` before processing large lists`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Set reasonable limits`}),` for count-based loops`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Handle empty arrays`}),` gracefully in your workflow`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use the parameter picker`}),` instead of typing parameter paths manually`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`-don’ts`,children:`❌ Don’ts`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Don’t create infinite loops`}),` - always ensure your count is reasonable`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Don’t forget error handling`}),` - plan for what happens if an iteration fails`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Don’t use loops for single items`}),` - use conditional logic instead`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Don’t nest loops too deeply`}),` - consider breaking complex logic into separate workflows`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsx(Heading,{level:`3`,id:`loop-doesn’t-start`,children:`Loop Doesn’t Start`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Check that your iteration parameter actually contains data`}),`\n`,_jsx(_components.li,{children:`Verify the parameter path is correct using the parameter picker`}),`\n`,_jsx(_components.li,{children:`Ensure the previous task completed successfully`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`loop-runs-forever`,children:`Loop Runs Forever`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Verify you’re using Count iteration with a specific number`}),`\n`,_jsx(_components.li,{children:`Check that List iteration has a finite array`}),`\n`,_jsx(_components.li,{children:`Ensure loop end blocks are properly connected`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`tasks-not-found`,children:`Tasks Not Found`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Make sure all referenced tasks exist in your workflow`}),`\n`,_jsx(_components.li,{children:`Use the dropdowns instead of typing task names manually`}),`\n`,_jsx(_components.li,{children:`Check that task names haven’t changed after configuration`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`related-features`,children:`Related Features`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.a,{href:`/agent/tasks/conditional-nodes`,children:`Conditional Nodes`})}),` - Add logic to control loop behavior`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.a,{href:`/agent/tasks/variables`,children:`Variables`})}),` - Store and reuse values across loop iterations`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.a,{href:`/agent/tasks/error-handling`,children:`Error Handling`})}),` - Manage failures within loops`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.a,{href:`/agent/tasks/testing`,children:`Workflow Testing`})}),` - Test your loops with sample data`]}),`\n`]})]})}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":"Loop Task","description":"This page gives you an overview of the Loop Task in Agent Builder","sidebarTitle":"Loop Task","icon":"repeat","href":"/agent/tasks/loop-task"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"When to Use Loop Nodes","slug":"when-to-use-loop-nodes","depth":2,"children":[]},{"title":"Adding a Loop Node","slug":"adding-a-loop-node","depth":2,"children":[]},{"title":"Required Configuration","slug":"required-configuration","depth":2,"children":[{"title":"Basic Settings","slug":"basic-settings","depth":3,"children":[]},{"title":"Node Name","slug":"node-name","depth":4,"children":[]},{"title":"Iteration Type","slug":"iteration-type","depth":4,"children":[]},{"title":"Iteration Parameter","slug":"iteration-parameter","depth":4,"children":[]}]},{"title":"Setting Up Iteration Parameters","slug":"setting-up-iteration-parameters","depth":2,"children":[{"title":"For Count Loops","slug":"for-count-loops","depth":3,"children":[]},{"title":"Manual Entry","slug":"manual-entry","depth":4,"children":[]},{"title":"Reference from Previous Task","slug":"reference-from-previous-task","depth":4,"children":[]},{"title":"For List Loops","slug":"for-list-loops","depth":3,"children":[]},{"title":"Basic Array Reference","slug":"basic-array-reference","depth":4,"children":[]},{"title":"Object with Array Property","slug":"object-with-array-property","depth":4,"children":[]},{"title":"Nested Object Properties","slug":"nested-object-properties","depth":4,"children":[]},{"title":"Using the Parameter Picker","slug":"using-the-parameter-picker","depth":3,"children":[]}]},{"title":"Loop Flow Configuration","slug":"loop-flow-configuration","depth":2,"children":[{"title":"Loop Start Block","slug":"loop-start-block","depth":3,"children":[]},{"title":"Loop End Block(s)","slug":"loop-end-blocks","depth":3,"children":[]},{"title":"Exit Block","slug":"exit-block","depth":3,"children":[]}]},{"title":"Loop Structure Visual","slug":"loop-structure-visual","depth":2,"children":[]},{"title":"Practical Examples","slug":"practical-examples","depth":2,"children":[{"title":"Example 1: Processing User List","slug":"example-1-processing-user-list","depth":3,"children":[]},{"title":"Example 2: Retry Mechanism","slug":"example-2-retry-mechanism","depth":3,"children":[]},{"title":"Example 3: Batch File Processing","slug":"example-3-batch-file-processing","depth":3,"children":[]}]},{"title":"Advanced Parameter Examples","slug":"advanced-parameter-examples","depth":2,"children":[{"title":"Simple Array from API Response","slug":"simple-array-from-api-response","depth":3,"children":[]},{"title":"Nested Array in Complex Object","slug":"nested-array-in-complex-object","depth":3,"children":[]},{"title":"Configuration-Based Count","slug":"configuration-based-count","depth":3,"children":[]},{"title":"Calculated Count from Previous Task","slug":"calculated-count-from-previous-task","depth":3,"children":[]}]},{"title":"Common Validation Errors","slug":"common-validation-errors","depth":2,"children":[{"title":"”Parameter must be an array”","slug":"”parameter-must-be-an-array”","depth":3,"children":[]},{"title":"”Parameter must be a number”","slug":"”parameter-must-be-a-number”","depth":3,"children":[]},{"title":"”Loop start block not found”","slug":"”loop-start-block-not-found”","depth":3,"children":[]},{"title":"”Circular dependency detected”","slug":"”circular-dependency-detected”","depth":3,"children":[]}]},{"title":"Loop Variable Access","slug":"loop-variable-access","depth":2,"children":[]},{"title":"Best Practices","slug":"best-practices","depth":2,"children":[{"title":"✅ Do’s","slug":"-do’s","depth":3,"children":[]},{"title":"❌ Don’ts","slug":"-don’ts","depth":3,"children":[]}]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[{"title":"Loop Doesn’t Start","slug":"loop-doesn’t-start","depth":3,"children":[]},{"title":"Loop Runs Forever","slug":"loop-runs-forever","depth":3,"children":[]},{"title":"Tasks Not Found","slug":"tasks-not-found","depth":3,"children":[]}]},{"title":"Related Features","slug":"related-features","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"gaife","siteName":"GAIFE Docs","title":"Loop Task - GAIFE Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T08:05:07.386Z","originalFileLocation":"agent/tasks/loop-task.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=\"This page gives you an overview of the Loop Task in Agent Builder\">\u003cmeta data-mint-head name=\"application-name\" content=\"GAIFE Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/gaife/AO1B8Va2td2Efe4c/_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/gaife/AO1B8Va2td2Efe4c/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gaife/AO1B8Va2td2Efe4c/_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/gaife/AO1B8Va2td2Efe4c/_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/gaife/AO1B8Va2td2Efe4c/_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/gaife/AO1B8Va2td2Efe4c/_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/gaife/AO1B8Va2td2Efe4c/_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/gaife/AO1B8Va2td2Efe4c/_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/gaife/AO1B8Va2td2Efe4c/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Loop Task - GAIFE Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"This page gives you an overview of the Loop Task in Agent Builder\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"GAIFE Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.gaife.com/agent/tasks/loop-task\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://gaife.mintlify.app/_mintlify/api/og/v2?division=Tasks\u0026amp;title=Loop+Task\u0026amp;description=This+page+gives+you+an+overview+of+the+Loop+Task+in+Agent+Builder\u0026amp;theme=878129593e9581b774c58ee5\u0026amp;signature=288f6c74c03e4b8457473c859cbb54d4da47ad499e9454948b48b92cb7be63bf\">\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=\"Loop Task - GAIFE Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"This page gives you an overview of the Loop Task in Agent Builder\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://gaife.mintlify.app/_mintlify/api/og/v2?division=Tasks\u0026amp;title=Loop+Task\u0026amp;description=This+page+gives+you+an+overview+of+the+Loop+Task+in+Agent+Builder\u0026amp;theme=878129593e9581b774c58ee5\u0026amp;signature=288f6c74c03e4b8457473c859cbb54d4da47ad499e9454948b48b92cb7be63bf\">\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/gaife/AO1B8Va2td2Efe4c/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"GAIFE Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.gaife.com/agent/tasks/loop-task\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/agent/tasks/loop-task.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.gaife.com/#organization\",\"name\":\"GAIFE Docs\",\"url\":\"https://docs.gaife.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintlify.s3.us-west-1.amazonaws.com/gaife/public/logo/light.png\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.gaife.com#website\",\"name\":\"GAIFE Docs\",\"url\":\"https://docs.gaife.com\",\"publisher\":{\"@id\":\"https://docs.gaife.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.gaife.com/agent/tasks/loop-task#webpage\",\"url\":\"https://docs.gaife.com/agent/tasks/loop-task\",\"name\":\"Loop Task\",\"description\":\"This page gives you an overview of the Loop Task in Agent Builder\",\"dateModified\":\"2026-01-07T08:05:07.386Z\",\"isPartOf\":{\"@id\":\"https://docs.gaife.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.gaife.com/agent/tasks/loop-task#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.gaife.com/agent/tasks/loop-task#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tasks\",\"item\":\"https://docs.gaife.com/agent/tasks/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Loop Task\",\"item\":\"https://docs.gaife.com/agent/tasks/loop-task\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.gaife.com/agent/tasks/loop-task#article\",\"headline\":\"Loop Task\",\"name\":\"Loop Task\",\"description\":\"This page gives you an overview of the Loop Task in Agent Builder\",\"url\":\"https://docs.gaife.com/agent/tasks/loop-task\",\"mainEntityOfPage\":{\"@id\":\"https://docs.gaife.com/agent/tasks/loop-task#webpage\"},\"dateModified\":\"2026-01-07T08:05:07.386Z\",\"publisher\":{\"@id\":\"https://docs.gaife.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.gaife.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"GAIFE Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"GAIFE Docs","nav":{"global":null,"tabs":[{"tab":"Guides","groups":[{"group":"Agent","pages":[{"title":"Introduction to Agent Builder","sidebarTitle":"Introduction","icon":"screwdriver-wrench","href":"/agent/getting-started/introduction"},{"title":"Quick Start Guide","sidebarTitle":"Quick Start","icon":"play","href":"/agent/getting-started/quickstart"},{"title":"Concepts","sidebarTitle":"Concepts","icon":"leanpub","href":"/agent/getting-started/concepts"}]},{"group":"Tasks","pages":[{"title":"Task Types Overview","sidebarTitle":"Task Types Overview","icon":"list-check","href":"/agent/tasks/overview"},{"title":"AI Task","sidebarTitle":"AI Task","icon":"robot","href":"/agent/tasks/ai-task"},{"title":"Human Task","sidebarTitle":"Human Task","icon":"person","href":"/agent/tasks/human-task"},{"title":"App Task","sidebarTitle":"App Task","icon":"grid","href":"/agent/tasks/app-task"},{"title":"Coder Task","sidebarTitle":"Coder Task","icon":"code","href":"/agent/tasks/coder-task"},{"title":"Conditional Task","description":"This page gives you an overview of the Conditional Task in Agent Builder","sidebarTitle":"Conditional Task","icon":"code-branch","href":"/agent/tasks/conditional-task"},{"title":"Loop Task","sidebarTitle":"Loop Task","icon":"repeat","href":"/agent/tasks/loop-task"}]},{"group":"Tools","pages":[{"group":"Firecrawl","icon":"fire","pages":[{"title":null,"description":null,"href":"/agent/tools/firecrawl/overview"},{"title":null,"href":"/agent/tools/firecrawl/scrape"},{"title":null,"href":"/agent/tools/firecrawl/crawl"}]}]},{"group":"Parameters","pages":[{"title":"Input Parameters","sidebarTitle":"Input Parameters","icon":"table-list","href":"/agent/parameters/input-parameters"},{"title":"Output Parameters","sidebarTitle":"Output Parameters","icon":"pen-to-square","href":"/agent/parameters/output-parameters"}]},{"group":"Knowledge","pages":[{"title":"Base","sidebarTitle":"Knowledge Base","icon":"brain","href":"/agent/knowledge/base"},{"title":"Coder Artifact","sidebarTitle":"Coder Artifact","icon":"cube","href":"/agent/knowledge/coder-artifact"}]},{"group":"Guides","pages":[{"title":"API Key Usage","sidebarTitle":"API Key Usage","icon":"key","href":"/agent/guides/api-key-usage"},{"title":"Assignment Rules","sidebarTitle":"Assignment Rules","icon":"user-group","href":"/agent/guides/assignment-rules"},{"title":"Best Practices","sidebarTitle":"Best Practices","icon":"lightbulb","href":"/agent/guides/best-practices"},{"title":"Validation Rules","sidebarTitle":"Validation Rules","icon":"list-check","href":"/agent/guides/validation-rules"}]},{"group":"Examples","pages":[{"title":"Task Examples","sidebarTitle":"Task Examples","icon":"book","mode":"centre","href":"/agent/examples/task-examples"}]}]},{"tab":"Chat","pages":[{"title":"Chat","href":"/chat"}]}]},"basePath":"","title":"Loop Task - GAIFE Docs","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":[],"chunks":[]}