Minns Memory Layer provides five distinct search methods. Learn which one to use for every situation.
Minns Memory Layer provides five distinct ways to find data. Choosing the right one is critical for your agent’s performance.
Quick reference
If you want to find…
Use this search
Accuracy
Member number, email, or ID
Direct node search
Exact
”Does the user like popcorn?”
Semantic search
Fuzzy
”Where did we leave off?”
Context search
High
”What’s the booking history?”
Graph traversal
Exact
”How do I solve this error?”
Embedding search
Fuzzy
1. Direct node search (hard facts)
Endpoint:GET /api/graph or GET /api/graph/contextA deterministic lookup for specific nodes and properties via graph traversal. Use this for exact values like member numbers, email addresses, and IDs.
GET /api/graph?session_id=5001&limit=10
Use graph queries for hard facts — data with an exact, verifiable value.
2. Semantic search (soft facts)
Endpoint:POST /api/claims/searchA vector-based search over claims (facts extracted from text). Use this for fuzzy concepts like preferences, mood, complaints, or intent.
{ "query_text": "What kind of seating does the user prefer?", "top_k": 3, "min_similarity": 0.7}
Keep the query_text natural. Don’t include IDs — filter results in your application code instead.
3. Context search (task history)
Endpoint:POST /api/memories/contextFinds previous episodes that match a specific environmental state. Use this to answer “What did we do last time we were in this exact situation?”
The system uses a context fingerprint (hash) for instant matching. Always query by context and goal to avoid mixing history from different tasks.
4. Graph traversal (relationships)
Endpoint:GET /api/graph with filtersRetrieves the graph structure showing nodes and their connections. Use this to explore event causality, episode formation, and entity relationships.
GET /api/graph?session_id=5001&limit=100
The response includes both nodes and edges, showing how events are connected through typed relationships like CausedBy, PartOf, and LeadsTo.
5. Embedding search (strategy similarity)
Endpoint:POST /api/strategies/similarFinds learned strategies that “look like” the current goal. Use this when the agent is stuck and needs a successful recipe from a similar task.
This is how you share wisdom between agents. If one agent learned how to handle a payment error, another can find that strategy here.
Decision flowchart
Best practices
Use graph queries for hard facts — member numbers, IDs, exact values
Use semantic search for soft facts — preferences, mood, intent
Always query by context and goal — prevents mixing history from different tasks
Store filterable fields in metadata — user_id, session_type, etc.
Use strategy similarity to share knowledge — across agents and tasks
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Minns Memory Layer","colors":{"primary":"#6D28D9","light":"#8B5CF6","dark":"#5B21B6"},"logo":{"light":"https://mintcdn.com/minnsai/ew45EP4StkFaZM1u/logo/logo.png?fit=max\u0026auto=format\u0026n=ew45EP4StkFaZM1u\u0026q=85\u0026s=8a461f5b566caebbc558e330830fc274","dark":"https://mintcdn.com/minnsai/ew45EP4StkFaZM1u/logo/logo.png?fit=max\u0026auto=format\u0026n=ew45EP4StkFaZM1u\u0026q=85\u0026s=8a461f5b566caebbc558e330830fc274"},"favicon":"/favicon.svg","navbar":{"links":[{"href":"mailto:hi@mintlify.com","label":"Support"}]},"footer":{"socials":{"github":"https://github.com/mintlify"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"]},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"API Reference","icon":"square-terminal","href":"/api-reference/introduction"},{"anchor":"SDK","icon":"cube","href":"/sdk/installation"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"minnsai","hasAudioNarration":false,"actualSubdomain":"minnsai","customDomains":["docs.minns.ai"],"gitSource":{"type":"github","owner":"jonathanfarrow","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae947453a5425ee311c3aa0:success","clientVersion":"0.0.4377","searchFilterCounts":[{"language":"default","tag":"API Reference","count":23},{"language":"default","tag":"Documentation","count":13},{"language":"default","tag":"Graph \u0026 analytics","count":7},{"language":"default","tag":"TypeScript SDK","count":5},{"language":"default","tag":"Claims \u0026 semantic memory","count":4},{"language":"default","tag":"Events","count":4},{"language":"default","tag":"Getting started","count":4},{"language":"default","tag":"Guides","count":4},{"language":"default","tag":"Strategies \u0026 policy","count":3},{"language":"default","tag":"Overview","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"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":"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":"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":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"guides/query-selection","slug":"/guides/query-selection","pageMetadata":{"title":"Query selection guide","sidebarTitle":"Which search to use","description":"Minns Memory Layer provides five distinct search methods. Learn which one to use for every situation.","href":"/guides/query-selection","hidden":false},"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: \"Minns Memory Layer provides five distinct search methods. Learn which one to use for every situation.\"\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`,em:`em`,hr:`hr`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Mermaid,Table,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Mermaid)_missingMdxReference(`Mermaid`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Minns Memory Layer provides five distinct ways to find data. Choosing the right one is critical for your agent’s performance.`}),`\n`,_jsx(Heading,{level:`2`,id:`quick-reference`,children:`Quick reference`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`If you want to find…`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Use this search`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Accuracy`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Member number, email, or ID`}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.strong,{children:`Direct node search`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Exact`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`”Does the user like popcorn?”`}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.strong,{children:`Semantic search`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Fuzzy`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`”Where did we leave off?”`}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.strong,{children:`Context search`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`High`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`”What’s the booking history?”`}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.strong,{children:`Graph traversal`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Exact`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`”How do I solve this error?”`}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.strong,{children:`Embedding search`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Fuzzy`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`1-direct-node-search-hard-facts`,children:`1. Direct node search (hard facts)`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Endpoint:`}),` `,_jsx(_components.code,{children:`GET /api/graph`}),` or `,_jsx(_components.code,{children:`GET /api/graph/context`})]}),`\n`,_jsx(_components.p,{children:`A deterministic lookup for specific nodes and properties via graph traversal. Use this for exact values like member numbers, email addresses, and IDs.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`GET`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /api/graph?session_id=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5001`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`limit`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`10`})]}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Use graph queries for `,_jsx(_components.strong,{children:`hard facts`}),` — data with an exact, verifiable value.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`2-semantic-search-soft-facts`,children:`2. Semantic search (soft facts)`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Endpoint:`}),` `,_jsx(_components.code,{children:`POST /api/claims/search`})]}),`\n`,_jsx(_components.p,{children:`A vector-based search over claims (facts extracted from text). Use this for fuzzy concepts like preferences, mood, complaints, or intent.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"query_text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"What kind of seating does the user prefer?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"top_k\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"min_similarity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Keep the `,_jsx(_components.code,{children:`query_text`}),` natural. Don’t include IDs — filter results in your application code instead.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`3-context-search-task-history`,children:`3. Context search (task history)`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Endpoint:`}),` `,_jsx(_components.code,{children:`POST /api/memories/context`})]}),`\n`,_jsxs(_components.p,{children:[`Finds previous episodes that match a specific environmental state. Use this to answer `,_jsx(_components.em,{children:`“What did we do last time we were in this exact situation?”`})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"context\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"active_goals\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [{ `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`101`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"book_movie\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"environment\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"variables\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"user_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user_99\"`}),_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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`The system uses a context fingerprint (hash) for instant matching. Always query by context and goal to avoid mixing history from different tasks.`})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`4-graph-traversal-relationships`,children:`4. Graph traversal (relationships)`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Endpoint:`}),` `,_jsx(_components.code,{children:`GET /api/graph`}),` with filters`]}),`\n`,_jsx(_components.p,{children:`Retrieves the graph structure showing nodes and their connections. Use this to explore event causality, episode formation, and entity relationships.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`GET`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /api/graph?session_id=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5001`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`limit`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`100`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The response includes both nodes and edges, showing how events are connected through typed relationships like `,_jsx(_components.code,{children:`CausedBy`}),`, `,_jsx(_components.code,{children:`PartOf`}),`, and `,_jsx(_components.code,{children:`LeadsTo`}),`.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`5-embedding-search-strategy-similarity`,children:`5. Embedding search (strategy similarity)`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Endpoint:`}),` `,_jsx(_components.code,{children:`POST /api/strategies/similar`})]}),`\n`,_jsx(_components.p,{children:`Finds learned strategies that “look like” the current goal. Use this when the agent is stuck and needs a successful recipe from a similar task.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"goal_ids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`202`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tool_names\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"payment_gateway\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"min_score\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.8`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`This is how you share wisdom between agents. If one agent learned how to handle a payment error, another can find that strategy here.`})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`decision-flowchart`,children:`Decision flowchart`}),`\n`,_jsx(Mermaid,{chart:`graph TD\n A[What do you need?] --> B{Exact value?}\n B -->|Yes| C[Direct Node Search]\n B -->|No| D{About preferences or intent?}\n D -->|Yes| E[Semantic Search]\n D -->|No| F{Previous experience?}\n F -->|Yes| G[Context Search]\n F -->|No| H{Relationships?}\n H -->|Yes| I[Graph Traversal]\n H -->|No| J[Embedding Search]`}),`\n`,_jsx(Heading,{level:`2`,id:`best-practices`,children:`Best practices`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use graph queries for hard facts`}),` — member numbers, IDs, exact values`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use semantic search for soft facts`}),` — preferences, mood, intent`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Always query by context and goal`}),` — prevents mixing history from different tasks`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Store filterable fields in metadata`}),` — `,_jsx(_components.code,{children:`user_id`}),`, `,_jsx(_components.code,{children:`session_type`}),`, etc.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use strategy similarity to share knowledge`}),` — across agents and tasks`]}),`\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":"Query selection guide","sidebarTitle":"Which search to use","description":"Minns Memory Layer provides five distinct search methods. Learn which one to use for every situation.","href":"/guides/query-selection","hidden":false}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Quick reference","slug":"quick-reference","depth":2,"children":[]},{"title":"1. Direct node search (hard facts)","slug":"1-direct-node-search-hard-facts","depth":2,"children":[]},{"title":"2. Semantic search (soft facts)","slug":"2-semantic-search-soft-facts","depth":2,"children":[]},{"title":"3. Context search (task history)","slug":"3-context-search-task-history","depth":2,"children":[]},{"title":"4. Graph traversal (relationships)","slug":"4-graph-traversal-relationships","depth":2,"children":[]},{"title":"5. Embedding search (strategy similarity)","slug":"5-embedding-search-strategy-similarity","depth":2,"children":[]},{"title":"Decision flowchart","slug":"decision-flowchart","depth":2,"children":[]},{"title":"Best practices","slug":"best-practices","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"minnsai","siteName":"Minns Memory Layer","title":"Query selection guide - Minns Memory Layer","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-02-06T21:32:01.231Z","originalFileLocation":"guides/query-selection.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=\"Minns Memory Layer provides five distinct search methods. Learn which one to use for every situation.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Minns Memory Layer\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/minnsai/_lm92CLZ7_x7nlWb/_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/minnsai/_lm92CLZ7_x7nlWb/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/minnsai/_lm92CLZ7_x7nlWb/_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/minnsai/_lm92CLZ7_x7nlWb/_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/minnsai/_lm92CLZ7_x7nlWb/_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/minnsai/_lm92CLZ7_x7nlWb/_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/minnsai/_lm92CLZ7_x7nlWb/_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/minnsai/_lm92CLZ7_x7nlWb/_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/minnsai/_lm92CLZ7_x7nlWb/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Query selection guide - Minns Memory Layer\">\u003cmeta data-mint-head property=\"og:description\" content=\"Minns Memory Layer provides five distinct search methods. Learn which one to use for every situation.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Minns Memory Layer\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.minns.ai/guides/query-selection\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://minnsai.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=Query+selection+guide\u0026amp;description=Minns+Memory+Layer+provides+five+distinct+search+methods.+Learn+which+one+to+use+for+every+situation.\u0026amp;theme=8095f9cfd2d2cbaee3e9e029\u0026amp;signature=f86fecc1bb1c9825298428e3e775b6d2a5a8e3f145394fd9157d582319a09e0e\">\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 selection guide - Minns Memory Layer\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Minns Memory Layer provides five distinct search methods. Learn which one to use for every situation.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://minnsai.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=Query+selection+guide\u0026amp;description=Minns+Memory+Layer+provides+five+distinct+search+methods.+Learn+which+one+to+use+for+every+situation.\u0026amp;theme=8095f9cfd2d2cbaee3e9e029\u0026amp;signature=f86fecc1bb1c9825298428e3e775b6d2a5a8e3f145394fd9157d582319a09e0e\">\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/minnsai/_lm92CLZ7_x7nlWb/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Minns Memory Layer\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6D28D9\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.minns.ai/guides/query-selection\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/query-selection.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.minns.ai/#organization\",\"name\":\"Minns Memory Layer\",\"url\":\"https://docs.minns.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/minnsai/ew45EP4StkFaZM1u/logo/logo.png?fit=max\u0026auto=format\u0026n=ew45EP4StkFaZM1u\u0026q=85\u0026s=8a461f5b566caebbc558e330830fc274\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.minns.ai#website\",\"name\":\"Minns Memory Layer\",\"url\":\"https://docs.minns.ai\",\"publisher\":{\"@id\":\"https://docs.minns.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.minns.ai/guides/query-selection#webpage\",\"url\":\"https://docs.minns.ai/guides/query-selection\",\"name\":\"Query selection guide\",\"description\":\"Minns Memory Layer provides five distinct search methods. Learn which one to use for every situation.\",\"dateModified\":\"2026-02-06T21:32:01.231Z\",\"isPartOf\":{\"@id\":\"https://docs.minns.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.minns.ai/guides/query-selection#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.minns.ai/guides/query-selection#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://docs.minns.ai/guides/building-a-chat-agent\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Query selection guide\",\"item\":\"https://docs.minns.ai/guides/query-selection\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.minns.ai/guides/query-selection#article\",\"headline\":\"Query selection guide\",\"name\":\"Query selection guide\",\"description\":\"Minns Memory Layer provides five distinct search methods. Learn which one to use for every situation.\",\"url\":\"https://docs.minns.ai/guides/query-selection\",\"mainEntityOfPage\":{\"@id\":\"https://docs.minns.ai/guides/query-selection#webpage\"},\"dateModified\":\"2026-02-06T21:32:01.231Z\",\"publisher\":{\"@id\":\"https://docs.minns.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.minns.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Minns Memory Layer\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Minns Memory Layer\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/guides/query-selection.md","siteName":"Minns Memory Layer","nav":{"global":{"anchors":[{"anchor":"API Reference","icon":"square-terminal","href":"/api-reference/introduction"},{"anchor":"SDK","icon":"cube","href":"/sdk/installation"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Getting started","pages":[{"title":"Minns Memory Layer","sidebarTitle":"Introduction","href":""},{"title":"Core concepts","href":"/concepts"},{"title":"Quickstart","href":"/quickstart"},{"title":"Authentication","sidebarTitle":"Authentication","href":"/authentication"}]},{"group":"TypeScript SDK","pages":[{"title":"Installation \u0026 setup","sidebarTitle":"Installation","href":"/sdk/installation"},{"title":"Event builder","href":"/sdk/event-builder"},{"title":"Memory \u0026 strategies","href":"/sdk/memory-strategies"},{"title":"Sidecar intent parsing","href":"/sdk/sidecar"},{"title":"Security \u0026 resilience","href":"/sdk/security"}]},{"group":"Guides","pages":[{"title":"Building a chat agent","sidebarTitle":"Build a chat agent","href":"/guides/building-a-chat-agent"},{"title":"Use case recipes","sidebarTitle":"Use case recipes","description":"Ready-to-adapt patterns for customer support bots, research agents, e-commerce assistants, IoT monitoring, and more — all powered by minns-sdk.","href":"/guides/use-case-recipes"},{"title":"Query selection guide","sidebarTitle":"Which search to use","href":"/guides/query-selection"},{"title":"Integration examples","sidebarTitle":"Examples","description":"End-to-end examples showing how to integrate Minns Memory Layer into real agent workflows using the minns-sdk.","href":"/guides/integration-examples"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Query selection guide - Minns Memory Layer","deploymentId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","buildId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","dynamics":[],"chunks":[]}