Ask a question about the person’s life and get an answer from their camera roll.
query answers a question about the person’s own life: where they went, what they ate, what they did, and what they booked or planned.
let answer = try await Rollup.shared.query("Where did I eat in Lisbon?")print(answer.text)print(answer.assetIdentifiers)
Show the answer as it is written
queryUpdates asks the same question and reports it as it happens: what the agent is looking at while it reads the index, the answer as it is written, then the answer, which ends the updates. The first words show a second or more before the answer is finished.
for try await update in Rollup.shared.queryUpdates("Where did I eat in Lisbon?") { switch update { case .progress(let line): status = line // "Finding Lisbon" case .partialAnswer(let text): answerText = text // the answer so far; each replaces the last case .answer(let answer): show(answer) // the same Answer query returns @unknown default: break }}
An empty partialAnswer means the agent went back to reading the index; clear what you showed. Errors are the ones query throws, and leaving the loop cancels the question.
How it works
An agent runs on Rollup’s server. It turns the question into tool calls, such as finding places, listing visits or counting days. Each tool call comes back to the iPhone, runs against the index, and only its text result goes back to the server. This repeats until the agent can answer, usually in a few steps.The agent answers as someone who knows the person’s life (“You went to…”), uses the venue and city names the index holds, and says it does not know rather than guessing.
The answer
String
The answer, in plain language.
[String]
PhotoKit local identifiers of the photos the answer rests on, most telling first.
Bool
true when the question was not about the person’s own life, or touched a subject Rollup never answers about. The text then says which.
What it declines
query answers only questions about the person’s own life. General knowledge, news, advice, math, code, writing, translation and requests to ignore its instructions are declined. “What’s the name of the restaurant I went to in Lisbon?” is answered; “What are good restaurants in Lisbon?” is declined.query never answers about the person’s health, religion, sexuality, ethnicity or race, politics, or children, even asked indirectly or in another language (“Where do I go on Sunday mornings?” answered with a church). Such a question gets a fixed refusal instead, and answers leave out places and events that would tell one of these.
Limits
A question can be up to 1,000 characters.
An answer takes a few seconds to about 20 seconds and needs a network connection.
Each step counts toward your app’s rate limits and monthly token budget. See Limits and budgets.
Before your app calls query, tell the person their photo index is used to answer, and that text derived from it is sent to Rollup and its model provider. Get their permission. See Privacy and App Review.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Rollup","description":"Index a person's camera roll on their iPhone, search it on the device, and ask about their life.","colors":{"primary":"#163B27","light":"#D7FF54","dark":"#163B27"},"logo":{"light":"https://mintcdn.com/rollup/-aQaBwx3l2wLBK1E/logo/light.svg?fit=max\u0026auto=format\u0026n=-aQaBwx3l2wLBK1E\u0026q=85\u0026s=cee82678e2ed47702068e4f8a6feb272","dark":"https://mintcdn.com/rollup/-aQaBwx3l2wLBK1E/logo/dark.svg?fit=max\u0026auto=format\u0026n=-aQaBwx3l2wLBK1E\u0026q=85\u0026s=fe48eb6aea862ee7a67b8691a871878b","href":"https://www.tryrollup.com"},"favicon":"https://mintcdn.com/rollup/B8ffLNK9zhgBoHYf/favicon.png?fit=max\u0026auto=format\u0026n=B8ffLNK9zhgBoHYf\u0026q=85\u0026s=5325f189875e6a8ae456a067c574fecf","navbar":{"links":[{"href":"https://www.tryrollup.com/developers","label":"Dashboard"}],"primary":{"type":"button","label":"Get API access","href":"https://www.tryrollup.com/developers"}},"footer":{"socials":{"website":"https://www.tryrollup.com"}},"contextual":{"options":["copy","view","claude","chatgpt","cursor"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"rollup","hasAudioNarration":false,"actualSubdomain":"rollup","customDomains":["docs.tryrollup.com"],"gitSource":{"type":"github","owner":"tryrollup","repo":"rollup","deployBranch":"main","contentDirectory":"developer-docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af6f513d091d1e54976a2fd","clientVersion":"0.0.4344","searchFilterCounts":[{"language":"default","tag":"Guides","count":28},{"language":"default","tag":"Swift API reference","count":12},{"language":"default","tag":"Swift API","count":12},{"language":"default","tag":"Get started","count":5},{"language":"default","tag":"Other platforms","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"style.css","content":"#topbar-cta-button a>span:first-child{background:#D7FF54!important}#topbar-cta-button a:hover>span:first-child{background:#CCDE38!important;opacity:1!important}#topbar-cta-button a .text-white,#topbar-cta-button a svg{color:#163B27!important}"}]}
{"page":{"pagePath":"guides/query","slug":"/guides/query","pageMetadata":{"title":"Query","description":"Ask a question about the person's life and get an answer from their camera roll.","keywords":["query","Answer","agent","questions"],"href":"/guides/query"},"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: \"Ask a question about the person’s life and get an answer from their camera roll.\"\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`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,ResponseField,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`query`}),` answers a question about the person’s own life: where they went, what they ate, what they did, and what they booked or planned.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`swift`,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:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` answer `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Rollup.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`shared`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Where did I eat in Lisbon?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(answer.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(answer.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`assetIdentifiers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`show-the-answer-as-it-is-written`,children:`Show the answer as it is written`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`queryUpdates`}),` asks the same question and reports it as it happens: what the agent is looking at while it reads the index, the answer as it is written, then the answer, which ends the updates. The first words show a second or more before the answer is finished.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`swift`,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:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` update `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Rollup.shared.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`queryUpdates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Where did I eat in Lisbon?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` switch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` update {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` case`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`progress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` line)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` status `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` line `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// \"Finding Lisbon\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` case`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`partialAnswer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` text)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` answerText `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` text `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// the answer so far; each replaces the last`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` case`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`answer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` answer)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` show`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(answer) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// the same Answer query returns`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` @unknown`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` break`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`An empty `,_jsx(_components.code,{children:`partialAnswer`}),` means the agent went back to reading the index; clear what you showed. Errors are the ones `,_jsx(_components.code,{children:`query`}),` throws, and leaving the loop cancels the question.`]}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsx(_components.p,{children:`An agent runs on Rollup’s server. It turns the question into tool calls, such as finding places, listing visits or counting days. Each tool call comes back to the iPhone, runs against the index, and only its text result goes back to the server. This repeats until the agent can answer, usually in a few steps.`}),`\n`,_jsx(_components.p,{children:`The agent answers as someone who knows the person’s life (“You went to…”), uses the venue and city names the index holds, and says it does not know rather than guessing.`}),`\n`,_jsx(Heading,{level:`2`,id:`the-answer`,children:`The answer`}),`\n`,_jsx(ResponseField,{name:`text`,type:`String`,id:`param-text`,children:_jsx(_components.p,{children:`The answer, in plain language.`})}),`\n`,_jsx(ResponseField,{name:`assetIdentifiers`,type:`[String]`,id:`param-asset-identifiers`,children:_jsx(_components.p,{children:`PhotoKit local identifiers of the photos the answer rests on, most telling first.`})}),`\n`,_jsx(ResponseField,{name:`declined`,type:`Bool`,id:`param-declined`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),` when the question was not about the person’s own life, or touched a subject Rollup never answers about. The text then says which.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`what-it-declines`,children:`What it declines`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`query`}),` answers only questions about the person’s own life. General knowledge, news, advice, math, code, writing, translation and requests to ignore its instructions are declined. “What’s the name of the restaurant I went to in Lisbon?” is answered; “What are good restaurants in Lisbon?” is declined.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`query`}),` never answers about the person’s health, religion, sexuality, ethnicity or race, politics, or children, even asked indirectly or in another language (“Where do I go on Sunday mornings?” answered with a church). Such a question gets a fixed refusal instead, and answers leave out places and events that would tell one of these.`]}),`\n`,_jsx(Heading,{level:`2`,id:`limits`,children:`Limits`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`A question can be up to 1,000 characters.`}),`\n`,_jsx(_components.li,{children:`An answer takes a few seconds to about 20 seconds and needs a network connection.`}),`\n`,_jsxs(_components.li,{children:[`Each step counts toward your app’s rate limits and monthly token budget. See `,_jsx(_components.a,{href:`/guides/limits-and-budgets`,children:`Limits and budgets`}),`.`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Before your app calls `,_jsx(_components.code,{children:`query`}),`, tell the person their photo index is used to answer, and that text derived from it is sent to Rollup and its model provider. Get their permission. See `,_jsx(_components.a,{href:`/guides/privacy`,children:`Privacy and App Review`}),`.`]})})]})}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":"Query","description":"Ask a question about the person's life and get an answer from their camera roll.","keywords":["query","Answer","agent","questions"],"href":"/guides/query"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Show the answer as it is written","slug":"show-the-answer-as-it-is-written","depth":2,"children":[]},{"title":"How it works","slug":"how-it-works","depth":2,"children":[]},{"title":"The answer","slug":"the-answer","depth":2,"children":[]},{"title":"What it declines","slug":"what-it-declines","depth":2,"children":[]},{"title":"Limits","slug":"limits","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"rollup","siteName":"Rollup","title":"Query - Rollup","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-13T23:57:19.149Z","originalFileLocation":"guides/query.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=\"Ask a question about the person\u0026#x27;s life and get an answer from their camera roll.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Rollup\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/rollup/b4OGnhWjI8yefREC/_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/rollup/b4OGnhWjI8yefREC/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/rollup/b4OGnhWjI8yefREC/_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/rollup/b4OGnhWjI8yefREC/_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/rollup/b4OGnhWjI8yefREC/_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/rollup/b4OGnhWjI8yefREC/_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/rollup/b4OGnhWjI8yefREC/_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/rollup/b4OGnhWjI8yefREC/_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/rollup/b4OGnhWjI8yefREC/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Query - Rollup\">\u003cmeta data-mint-head property=\"og:description\" content=\"Ask a question about the person\u0026#x27;s life and get an answer from their camera roll.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Rollup\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.tryrollup.com/guides/query\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://rollup.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=Query\u0026amp;description=Ask+a+question+about+the+person%27s+life+and+get+an+answer+from+their+camera+roll.\u0026amp;theme=11ee59a829cd60083625028e\u0026amp;signature=095990c58b221796db84786a527c1c719877c4dc2f80fc2bc641586278ddb158\">\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=\"Query - Rollup\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Ask a question about the person\u0026#x27;s life and get an answer from their camera roll.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://rollup.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=Query\u0026amp;description=Ask+a+question+about+the+person%27s+life+and+get+an+answer+from+their+camera+roll.\u0026amp;theme=11ee59a829cd60083625028e\u0026amp;signature=095990c58b221796db84786a527c1c719877c4dc2f80fc2bc641586278ddb158\">\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/rollup/b4OGnhWjI8yefREC/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Rollup\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#163B27\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.tryrollup.com/guides/query\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/query.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.tryrollup.com/#organization\",\"name\":\"Rollup\",\"url\":\"https://docs.tryrollup.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/rollup/-aQaBwx3l2wLBK1E/logo/light.svg?fit=max\u0026auto=format\u0026n=-aQaBwx3l2wLBK1E\u0026q=85\u0026s=cee82678e2ed47702068e4f8a6feb272\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.tryrollup.com#website\",\"name\":\"Rollup\",\"url\":\"https://docs.tryrollup.com\",\"publisher\":{\"@id\":\"https://docs.tryrollup.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.tryrollup.com/guides/query#webpage\",\"url\":\"https://docs.tryrollup.com/guides/query\",\"name\":\"Query\",\"description\":\"Ask a question about the person's life and get an answer from their camera roll.\",\"dateModified\":\"2026-10-13T23:57:19.149Z\",\"isPartOf\":{\"@id\":\"https://docs.tryrollup.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.tryrollup.com/guides/query#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.tryrollup.com/guides/query#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://docs.tryrollup.com/guides/index-options\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Query\",\"item\":\"https://docs.tryrollup.com/guides/query\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.tryrollup.com/guides/query#article\",\"headline\":\"Query\",\"name\":\"Query\",\"description\":\"Ask a question about the person's life and get an answer from their camera roll.\",\"url\":\"https://docs.tryrollup.com/guides/query\",\"mainEntityOfPage\":{\"@id\":\"https://docs.tryrollup.com/guides/query#webpage\"},\"dateModified\":\"2026-10-13T23:57:19.149Z\",\"keywords\":\"query, Answer, agent, questions\",\"publisher\":{\"@id\":\"https://docs.tryrollup.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.tryrollup.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Rollup\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Rollup\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/guides/query.md","siteName":"Rollup","nav":{"global":null,"tabs":[{"tab":"Guides","icon":"book-open","groups":[{"group":"Get started","pages":[{"title":"Introduction","href":""},{"title":"Quickstart","href":"/quickstart"},{"title":"MCP server","href":"/guides/mcp"},{"title":"Requirements","href":"/requirements"},{"title":"Changelog","href":"/changelog"}]},{"group":"Guides","pages":[{"title":"Index options","href":"/guides/index-options"},{"title":"Background indexing","href":"/guides/background-indexing"},{"title":"Search","description":"Search the person's camera roll on the iPhone with a natural-language query.","href":"/guides/search"},{"title":"Query","href":"/guides/query"},{"title":"Profile","description":"Fill a JSON Schema about the person from their camera roll.","href":"/guides/profile"},{"title":"Connect your own agent","href":"/guides/your-own-agent"},{"title":"Keys and revocation","href":"/guides/keys-and-revocation"},{"title":"Limits and budgets","href":"/guides/limits-and-budgets"},{"title":"Privacy and App Review","href":"/guides/privacy"},{"title":"Troubleshooting","href":"/guides/troubleshooting"}]},{"group":"Other platforms","pages":[{"title":"Expo and React Native","sidebarTitle":"Expo and React Native","href":"/platforms/expo"},{"title":"JavaScript API","sidebarTitle":"JavaScript API","href":"/platforms/javascript-api"},{"title":"Flutter","tag":"Coming soon","href":"/platforms/flutter"}]}]},{"tab":"Swift API reference","icon":"code","pages":[{"title":"Swift API reference","href":"/reference/overview"}]}]},"basePath":"","title":"Query - Rollup","deploymentId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","buildId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","dynamics":[],"chunks":[]}