Upload files, create an asynchronous run, and retrieve its documents.
An agent run is a durable, asynchronous record. Keep the returned run_id with your source record so you can correlate status, documents, webhooks, and support traces later.
Run lifecycle
Call GET /api/v1/agents and select an accessible agent.
If the run has files, call POST /api/v1/agents/{agent_id}/upload-urls.
Upload each file directly to its presigned URL with PUT and the requested content type.
Call POST /api/v1/agents/{agent_id}/run with the uploaded file keys and/or a user_message.
Poll GET /api/v1/runs/{id} until the status is terminal, or receive a run webhook.
Run statuses are queued, running, completed, failed, and cancelled.
completed means the agent finished. A returned document can still be a draft, awaiting approval, or waiting to be processed into a connected system.
Poll the returned status_url until the run is terminal. A failed run can still contain conversations and documents; inspect both the run’s error and each document’s error.
Multiple and background files
A run accepts up to 50 foreground files.
process_together: true sends up to 10 foreground files through one agent conversation.
Background files are available to tools but are not read by the agent directly. When a run contains only background files, include a user_message that tells the agent what to do.
Set notification_email only when email notification is desired. Omitting it sends no completion email.
Process a document
GET /api/v1/documents/{id} returns the full document_data. POST to the same resource processes its current data into the configured system of record. Check the returned document status: an external-system rejection is represented by status: "error" and an error message in an HTTP 200 response.DELETE /api/v1/documents/{id} is a soft delete. It cancels in-flight work and moves the document to trash.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Fluent","description":"Build and run agents with Fluent.","colors":{"primary":"#98459A","light":"#00AEEF","dark":"#98459A"},"logo":{"light":"https://mintcdn.com/technologycoastpartners/eAsMup5vXzElMEx_/logo/light.svg?fit=max\u0026auto=format\u0026n=eAsMup5vXzElMEx_\u0026q=85\u0026s=d851ba19aaa1d16560ac6c155500e7f9","dark":"https://mintcdn.com/technologycoastpartners/eAsMup5vXzElMEx_/logo/dark.svg?fit=max\u0026auto=format\u0026n=eAsMup5vXzElMEx_\u0026q=85\u0026s=d05c261888e8f73f9ad16938e429595e"},"favicon":"https://mintcdn.com/technologycoastpartners/eAsMup5vXzElMEx_/favicon.svg?fit=max\u0026auto=format\u0026n=eAsMup5vXzElMEx_\u0026q=85\u0026s=fc6e6e1a10f66976231458823ada1d22","navbar":{"links":[{"href":"mailto:support@fluenterp.com","label":"Support"}],"primary":{"type":"button","label":"Open Fluent","href":"https://www.fluenterp.com"}},"contextual":{"options":[{"title":"Download API spec","description":"Download the Fluent OpenAPI 3.1 specification.","icon":"download","href":"/api-reference/openapi.yaml"},"copy","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"technologycoastpartners","hasAudioNarration":false,"actualSubdomain":"technologycoastpartners","customDomains":["www.fluenterp.com"],"gitSource":{"type":"github","owner":"tcpmia","repo":"fluent","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6afc800ac76dfb5a5461d934","clientVersion":"0.0.4342","searchFilterCounts":[{"language":"default","tag":"API Reference","count":29},{"language":"default","tag":"Guides","count":10},{"language":"default","tag":"Agents","count":8},{"language":"default","tag":"Connections","count":5},{"language":"default","tag":"Data","count":5},{"language":"default","tag":"Webhooks","count":4},{"language":"default","tag":"Utilities","count":4},{"language":"default","tag":"Overview","count":3},{"language":"default","tag":"Build with Fluent","count":3},{"language":"default","tag":"Get started","count":3}]},"assistantConfig":{},"basePath":"/docs","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":[]}
{"page":{"pagePath":"guides/agent-runs","slug":"/guides/agent-runs","pageMetadata":{"title":"Agents","description":"Upload files, create an asynchronous run, and retrieve its documents.","href":"/guides/agent-runs"},"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: \"Upload files, create an asynchronous run, and retrieve its documents.\"\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={code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`An agent run is a durable, asynchronous record. Keep the returned `,_jsx(_components.code,{children:`run_id`}),` with your source record so you can correlate status, documents, webhooks, and support traces later.`]}),`\n`,_jsx(Heading,{level:`2`,id:`run-lifecycle`,children:`Run lifecycle`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Call `,_jsx(_components.code,{children:`GET /api/v1/agents`}),` and select an accessible agent.`]}),`\n`,_jsxs(_components.li,{children:[`If the run has files, call `,_jsx(_components.code,{children:`POST /api/v1/agents/{agent_id}/upload-urls`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Upload each file directly to its presigned URL with `,_jsx(_components.code,{children:`PUT`}),` and the requested content type.`]}),`\n`,_jsxs(_components.li,{children:[`Call `,_jsx(_components.code,{children:`POST /api/v1/agents/{agent_id}/run`}),` with the uploaded file keys and/or a `,_jsx(_components.code,{children:`user_message`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Poll `,_jsx(_components.code,{children:`GET /api/v1/runs/{id}`}),` until the status is terminal, or receive a run webhook.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Run statuses are `,_jsx(_components.code,{children:`queued`}),`, `,_jsx(_components.code,{children:`running`}),`, `,_jsx(_components.code,{children:`completed`}),`, `,_jsx(_components.code,{children:`failed`}),`, and `,_jsx(_components.code,{children:`cancelled`}),`.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`completed`}),` means the agent finished. A returned document can still be a draft, awaiting approval, or waiting to be processed into a connected system.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`upload-a-file`,children:`Upload a file`}),`\n`,_jsx(_components.p,{children:`First request an upload URL:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://www.fluenterp.com/api/v1/agents/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$AGENT_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/upload-urls\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$FLUENT_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"files\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {\"file_name\": \"invoice.pdf\", \"content_type\": \"application/pdf\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Upload the file with the returned `,_jsx(_components.code,{children:`upload_url`}),`. The URL expires after one hour:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` PUT`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$UPLOAD_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/pdf\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data-binary`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @invoice.pdf`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`create-and-follow-the-run`,children:`Create and follow the run`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://www.fluenterp.com/api/v1/agents/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$AGENT_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/run\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$FLUENT_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`files`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: [{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`file_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$FILE_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`file_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`invoice.pdf`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`content_type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`application/pdf`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`process_together`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: false`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }\"`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Poll the returned `,_jsx(_components.code,{children:`status_url`}),` until the run is terminal. A failed run can still contain conversations and documents; inspect both the run’s `,_jsx(_components.code,{children:`error`}),` and each document’s `,_jsx(_components.code,{children:`error`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`multiple-and-background-files`,children:`Multiple and background files`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`A run accepts up to 50 foreground files.`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`process_together: true`}),` sends up to 10 foreground files through one agent conversation.`]}),`\n`,_jsxs(_components.li,{children:[`Background files are available to tools but are not read by the agent directly. When a run contains only background files, include a `,_jsx(_components.code,{children:`user_message`}),` that tells the agent what to do.`]}),`\n`,_jsxs(_components.li,{children:[`Set `,_jsx(_components.code,{children:`notification_email`}),` only when email notification is desired. Omitting it sends no completion email.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`process-a-document`,children:`Process a document`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`GET /api/v1/documents/{id}`}),` returns the full `,_jsx(_components.code,{children:`document_data`}),`. `,_jsx(_components.code,{children:`POST`}),` to the same resource processes its current data into the configured system of record. Check the returned document status: an external-system rejection is represented by `,_jsx(_components.code,{children:`status: \"error\"`}),` and an `,_jsx(_components.code,{children:`error`}),` message in an HTTP 200 response.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`DELETE /api/v1/documents/{id}`}),` is a soft delete. It cancels in-flight work and moves the document to trash.`]})]})}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":"Agents","description":"Upload files, create an asynchronous run, and retrieve its documents.","href":"/guides/agent-runs"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Run lifecycle","slug":"run-lifecycle","depth":2,"children":[]},{"title":"Upload a file","slug":"upload-a-file","depth":2,"children":[]},{"title":"Create and follow the run","slug":"create-and-follow-the-run","depth":2,"children":[]},{"title":"Multiple and background files","slug":"multiple-and-background-files","depth":2,"children":[]},{"title":"Process a document","slug":"process-a-document","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"technologycoastpartners","siteName":"Fluent","title":"Agents - Fluent","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-12T21:46:05.288Z","originalFileLocation":"guides/agent-runs.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=\"Upload files, create an asynchronous run, and retrieve its documents.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Fluent\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/technologycoastpartners/pHtW7MJNXfCk5RkX/_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=\"/docs/mintlify-assets/_mintlify/favicons/technologycoastpartners/pHtW7MJNXfCk5RkX/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/technologycoastpartners/pHtW7MJNXfCk5RkX/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/technologycoastpartners/pHtW7MJNXfCk5RkX/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/technologycoastpartners/pHtW7MJNXfCk5RkX/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/technologycoastpartners/pHtW7MJNXfCk5RkX/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/technologycoastpartners/pHtW7MJNXfCk5RkX/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/technologycoastpartners/pHtW7MJNXfCk5RkX/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/technologycoastpartners/pHtW7MJNXfCk5RkX/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Agents - Fluent\">\u003cmeta data-mint-head property=\"og:description\" content=\"Upload files, create an asynchronous run, and retrieve its documents.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Fluent\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.fluenterp.com/docs/guides/agent-runs\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://technologycoastpartners.mintlify.site/docs/_mintlify/api/og/v2?division=Build+with+Fluent\u0026amp;title=Agents\u0026amp;description=Upload+files%2C+create+an+asynchronous+run%2C+and+retrieve+its+documents.\u0026amp;theme=2c3c814d395953fed36686ae\u0026amp;signature=1d7ff7cbf31ca8d4ab234fa8bc2c2fd7685cf38b89df10b9206ca382ea11d0d0\">\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=\"Agents - Fluent\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Upload files, create an asynchronous run, and retrieve its documents.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://technologycoastpartners.mintlify.site/docs/_mintlify/api/og/v2?division=Build+with+Fluent\u0026amp;title=Agents\u0026amp;description=Upload+files%2C+create+an+asynchronous+run%2C+and+retrieve+its+documents.\u0026amp;theme=2c3c814d395953fed36686ae\u0026amp;signature=1d7ff7cbf31ca8d4ab234fa8bc2c2fd7685cf38b89df10b9206ca382ea11d0d0\">\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=\"/docs/mintlify-assets/_mintlify/favicons/technologycoastpartners/pHtW7MJNXfCk5RkX/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Fluent\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#98459A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.fluenterp.com/docs/guides/agent-runs\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/guides/agent-runs.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.fluenterp.com/#organization\",\"name\":\"Fluent\",\"url\":\"https://www.fluenterp.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/technologycoastpartners/eAsMup5vXzElMEx_/logo/light.svg?fit=max\u0026auto=format\u0026n=eAsMup5vXzElMEx_\u0026q=85\u0026s=d851ba19aaa1d16560ac6c155500e7f9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.fluenterp.com/docs#website\",\"name\":\"Fluent\",\"url\":\"https://www.fluenterp.com/docs\",\"publisher\":{\"@id\":\"https://www.fluenterp.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.fluenterp.com/docs/guides/agent-runs#webpage\",\"url\":\"https://www.fluenterp.com/docs/guides/agent-runs\",\"name\":\"Agents\",\"description\":\"Upload files, create an asynchronous run, and retrieve its documents.\",\"dateModified\":\"2026-08-12T21:46:05.288Z\",\"isPartOf\":{\"@id\":\"https://www.fluenterp.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.fluenterp.com/docs/guides/agent-runs#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.fluenterp.com/docs/guides/agent-runs#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Fluent\",\"item\":\"https://www.fluenterp.com/docs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Agents\",\"item\":\"https://www.fluenterp.com/docs/guides/agent-runs\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.fluenterp.com/docs/guides/agent-runs#article\",\"headline\":\"Agents\",\"name\":\"Agents\",\"description\":\"Upload files, create an asynchronous run, and retrieve its documents.\",\"url\":\"https://www.fluenterp.com/docs/guides/agent-runs\",\"mainEntityOfPage\":{\"@id\":\"https://www.fluenterp.com/docs/guides/agent-runs#webpage\"},\"dateModified\":\"2026-08-12T21:46:05.288Z\",\"publisher\":{\"@id\":\"https://www.fluenterp.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.fluenterp.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Fluent\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Fluent\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/guides/agent-runs.md","siteName":"Fluent","nav":{"global":null,"tabs":[{"tab":"Guides","groups":[{"group":"Get started","pages":[{"title":"Fluent developer documentation","href":"/introduction"},{"title":"Fluent API quickstart","href":"/quickstart"},{"title":"Fluent API authentication","description":"Choose OAuth for people and API keys for unattended workloads.","href":"/guides/authentication"}]},{"group":"Build with Fluent","pages":[{"title":"Agents","href":"/guides/agent-runs"},{"title":"MCP server","description":"Connect an MCP client to a Fluent agent's tools.","href":"/guides/mcp"},{"title":"Fluent CLI","href":"/cli/overview"}]},{"group":"Webhooks","pages":[{"title":"Webhooks overview","href":"/guides/webhooks"},{"title":"Webhook event catalog","href":"/guides/webhook-events"},{"title":"Webhook payloads","href":"/guides/webhook-payloads"},{"title":"Webhook delivery and security","href":"/guides/webhook-delivery"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/overview"}]}]},"basePath":"","title":"Agents - Fluent","deploymentId":"dpl_HkhFaM7Z4J8aYo89NEttjgSHLi43","buildId":"dpl_HkhFaM7Z4J8aYo89NEttjgSHLi43","dynamics":[],"chunks":[]}