Assert a fact connecting two entities in the knowledge graph.
vault_fact
Creates a directed edge between two entities with searchable fact text. Use this for immediate, precise fact storage. Unlike record_memory (which distills asynchronously), facts from vault_fact appear in the graph right away.Auto-creates target or source entities when their type is provided. Includes semantic near-duplicate detection to keep the graph clean.
Parameters
Parameter
Type
Required
Default
Description
source_name
string
Yes
—
Name of the source entity
target_name
string
Yes
—
Name of the target entity
relation_type
string
Yes
—
Short snake_case verb phrase, max 3 words (e.g., "works_at", "prefers", "uses_technology")
rationale
string
Yes
—
Why this fact is being asserted
fact_text
string
No
null
Human-readable fact statement. Embedded and searchable
source_type
string
No
null
Entity type to auto-create the source if it doesn’t exist
target_type
string
No
null
Entity type to auto-create the target if it doesn’t exist
valid_at
string
No
null
ISO date (YYYY-MM-DD) when this fact became true
expires_at
string
No
null
ISO date (YYYY-MM-DD) when this fact should soft-expire. Faded facts are hidden from summaries but still searchable
skip_taxonomy_check
boolean
No
null
Bypass taxonomy similarity check when you’ve confirmed this relation_type is intentionally distinct
Read-only
No. This tool writes to your memory.
Example usage
{ "source_name": "Alice", "target_name": "Acme Corp", "target_type": "organization", "relation_type": "works_at", "rationale": "User mentioned Alice works at Acme", "fact_text": "Alice is a senior engineer at Acme Corp"}
{ "source_name": "User", "target_name": "Four Seasons", "target_type": "organization", "relation_type": "prefers", "rationale": "User stated hotel preference directly", "fact_text": "Prefers Four Seasons hotels when traveling, boutique luxury as fallback"}
{ "source_name": "my-api", "source_type": "project", "target_name": "PostgreSQL", "target_type": "technology", "relation_type": "uses_technology", "rationale": "Confirmed during architecture discussion", "fact_text": "my-api uses PostgreSQL 15 as its primary datastore", "valid_at": "2025-01-15"}
Edge taxonomy snapping
BaseLayer automatically normalizes similar relation_type values to maintain a clean, consistent graph. For example, "employed_at" and "works_at" may be snapped to the same canonical type.If you intentionally want a distinct relation type and the taxonomy check is flagging it as a near-duplicate, set skip_taxonomy_check to true.
Temporal facts
Use expires_at for facts that are temporary or transient:
Transient facts (currently researching X, reading book Y, troubleshooting issue Z): Set expires_at to a reasonable date
Expired facts become “faded” — hidden from entity summaries but still findable via search.
Use valid_at to record when a fact became true, not when it was recorded. This helps build an accurate timeline for entities.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"BaseLayer","colors":{"primary":"#3EB8AD","light":"#C8983D","dark":"#26496D"},"logo":{"light":"https://mintcdn.com/baselayer-cb64d258/pMVhqQ9wkFWOaVc4/logo/light.svg?fit=max\u0026auto=format\u0026n=pMVhqQ9wkFWOaVc4\u0026q=85\u0026s=eb1b18a0b5f1f0b019df3bd24384779d","dark":"https://mintcdn.com/baselayer-cb64d258/pMVhqQ9wkFWOaVc4/logo/dark.svg?fit=max\u0026auto=format\u0026n=pMVhqQ9wkFWOaVc4\u0026q=85\u0026s=c387841a5eb9ae2d4ae1238568666ce1"},"favicon":"/favicon.svg","background":{"color":{"light":"#FFFFFF","dark":"#0A1628"}},"navbar":{"links":[{"href":"https://baselayer.id","label":"Website"}],"primary":{"type":"button","label":"Get Started","href":"https://baselayer.id/download"}},"footer":{"socials":{"github":"https://github.com/baselayer-id","x":"https://x.com/baselayer_id"}},"fonts":{"heading":{"family":"Geist"},"body":{"family":"Geist"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"baselayer-cb64d258","hasAudioNarration":false,"actualSubdomain":"baselayer-cb64d258","customDomains":["docs.baselayer.id"],"gitSource":{"type":"github","owner":"baselayer-id","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ae948236cb575c06c4de284:success","clientVersion":"0.0.4271","searchFilterCounts":[{"language":"default","tag":"MCP Tools","count":24},{"language":"default","tag":"Integrations","count":24},{"language":"default","tag":"Documentation","count":11},{"language":"default","tag":"Desktop App","count":4},{"language":"default","tag":"Getting Started","count":4},{"language":"default","tag":"Help","count":3}]},"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":"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":"workos-onboarding","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":"assistant-v5","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":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"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},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[]}
{"page":{"pagePath":"api/vault-fact","slug":"/api/vault-fact","pageMetadata":{"title":"vault_fact","description":"Assert a fact connecting two entities in the knowledge graph.","href":"/api/vault-fact"},"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: \"Assert a fact connecting two entities in the knowledge graph.\"\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`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`vault_fact`,children:`vault_fact`}),`\n`,_jsxs(_components.p,{children:[`Creates a directed edge between two entities with searchable fact text. Use this for immediate, precise fact storage. Unlike `,_jsx(_components.code,{children:`record_memory`}),` (which distills asynchronously), facts from `,_jsx(_components.code,{children:`vault_fact`}),` appear in the graph right away.`]}),`\n`,_jsx(_components.p,{children:`Auto-creates target or source entities when their type is provided. Includes semantic near-duplicate detection to keep the graph clean.`}),`\n`,_jsx(Heading,{level:`2`,id:`parameters`,children:`Parameters`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`source_name`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Name of the source entity`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`target_name`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Name of the target entity`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`relation_type`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`—`}),_jsxs(_components.td,{children:[`Short snake_case verb phrase, max 3 words (e.g., `,_jsx(_components.code,{children:`\"works_at\"`}),`, `,_jsx(_components.code,{children:`\"prefers\"`}),`, `,_jsx(_components.code,{children:`\"uses_technology\"`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`rationale`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Why this fact is being asserted`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`fact_text`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})}),_jsx(_components.td,{children:`Human-readable fact statement. Embedded and searchable`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`source_type`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})}),_jsx(_components.td,{children:`Entity type to auto-create the source if it doesn’t exist`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`target_type`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})}),_jsx(_components.td,{children:`Entity type to auto-create the target if it doesn’t exist`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`valid_at`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})}),_jsxs(_components.td,{children:[`ISO date (`,_jsx(_components.code,{children:`YYYY-MM-DD`}),`) when this fact became true`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`expires_at`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})}),_jsxs(_components.td,{children:[`ISO date (`,_jsx(_components.code,{children:`YYYY-MM-DD`}),`) when this fact should soft-expire. Faded facts are hidden from summaries but still searchable`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`skip_taxonomy_check`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})}),_jsxs(_components.td,{children:[`Bypass taxonomy similarity check when you’ve confirmed this `,_jsx(_components.code,{children:`relation_type`}),` is intentionally distinct`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`read-only`,children:`Read-only`}),`\n`,_jsx(_components.p,{children:`No. This tool writes to your memory.`}),`\n`,_jsx(Heading,{level:`2`,id:`example-usage`,children:`Example usage`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,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:`8`,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:` \"source_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Alice\"`}),_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:` \"target_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Acme Corp\"`}),_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:` \"target_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"organization\"`}),_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:` \"relation_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"works_at\"`}),_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:` \"rationale\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"User mentioned Alice works at Acme\"`}),_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:` \"fact_text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Alice is a senior engineer at Acme Corp\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,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:`8`,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:` \"source_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"User\"`}),_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:` \"target_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Four Seasons\"`}),_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:` \"target_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"organization\"`}),_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:` \"relation_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"prefers\"`}),_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:` \"rationale\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"User stated hotel preference directly\"`}),_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:` \"fact_text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Prefers Four Seasons hotels when traveling, boutique luxury as fallback\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,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:`10`,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:` \"source_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"my-api\"`}),_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:` \"source_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"project\"`}),_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:` \"target_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PostgreSQL\"`}),_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:` \"target_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"technology\"`}),_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:` \"relation_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"uses_technology\"`}),_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:` \"rationale\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Confirmed during architecture discussion\"`}),_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:` \"fact_text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"my-api uses PostgreSQL 15 as its primary datastore\"`}),_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:` \"valid_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2025-01-15\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`edge-taxonomy-snapping`,children:`Edge taxonomy snapping`}),`\n`,_jsxs(_components.p,{children:[`BaseLayer automatically normalizes similar `,_jsx(_components.code,{children:`relation_type`}),` values to maintain a clean, consistent graph. For example, `,_jsx(_components.code,{children:`\"employed_at\"`}),` and `,_jsx(_components.code,{children:`\"works_at\"`}),` may be snapped to the same canonical type.`]}),`\n`,_jsxs(_components.p,{children:[`If you intentionally want a distinct relation type and the taxonomy check is flagging it as a near-duplicate, set `,_jsx(_components.code,{children:`skip_taxonomy_check`}),` to `,_jsx(_components.code,{children:`true`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`temporal-facts`,children:`Temporal facts`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`expires_at`}),` for facts that are temporary or transient:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Durable facts`}),` (preferences, relationships, traits): Omit `,_jsx(_components.code,{children:`expires_at`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Transient facts`}),` (currently researching X, reading book Y, troubleshooting issue Z): Set `,_jsx(_components.code,{children:`expires_at`}),` to a reasonable date`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Expired facts become “faded” — hidden from entity summaries but still findable via search.`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`valid_at`}),` to record when a fact became true, not when it was recorded. This helps build an accurate timeline for entities.`]})})]})}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":"vault_fact","description":"Assert a fact connecting two entities in the knowledge graph.","href":"/api/vault-fact"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"vault_fact","slug":"vault_fact","depth":1,"children":[]},{"title":"Parameters","slug":"parameters","depth":2,"children":[]},{"title":"Read-only","slug":"read-only","depth":2,"children":[]},{"title":"Example usage","slug":"example-usage","depth":2,"children":[]},{"title":"Edge taxonomy snapping","slug":"edge-taxonomy-snapping","depth":2,"children":[]},{"title":"Temporal facts","slug":"temporal-facts","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"baselayer-cb64d258","siteName":"BaseLayer","title":"vault_fact - BaseLayer","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-04-06T04:34:02.462Z","originalFileLocation":"api/vault-fact.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=\"Assert a fact connecting two entities in the knowledge graph.\">\u003cmeta data-mint-head name=\"application-name\" content=\"BaseLayer\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/baselayer-cb64d258/DA-VwktRc70nxaOV/_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/baselayer-cb64d258/DA-VwktRc70nxaOV/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/baselayer-cb64d258/DA-VwktRc70nxaOV/_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/baselayer-cb64d258/DA-VwktRc70nxaOV/_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/baselayer-cb64d258/DA-VwktRc70nxaOV/_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/baselayer-cb64d258/DA-VwktRc70nxaOV/_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/baselayer-cb64d258/DA-VwktRc70nxaOV/_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/baselayer-cb64d258/DA-VwktRc70nxaOV/_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/baselayer-cb64d258/DA-VwktRc70nxaOV/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"vault_fact - BaseLayer\">\u003cmeta data-mint-head property=\"og:description\" content=\"Assert a fact connecting two entities in the knowledge graph.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"BaseLayer\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.baselayer.id/api/vault-fact\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://baselayer-cb64d258.mintlify.site/_mintlify/api/og/v2?division=MCP+Tools\u0026amp;title=vault_fact\u0026amp;description=Assert+a+fact+connecting+two+entities+in+the+knowledge+graph.\u0026amp;theme=dc0106ad03ffc9804fa2f6d6\u0026amp;signature=6e7508d7fb70a939d021484c46eb51b0f9dcf0e7bcd053e0f1342f3dc70d3a22\">\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=\"vault_fact - BaseLayer\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Assert a fact connecting two entities in the knowledge graph.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://baselayer-cb64d258.mintlify.site/_mintlify/api/og/v2?division=MCP+Tools\u0026amp;title=vault_fact\u0026amp;description=Assert+a+fact+connecting+two+entities+in+the+knowledge+graph.\u0026amp;theme=dc0106ad03ffc9804fa2f6d6\u0026amp;signature=6e7508d7fb70a939d021484c46eb51b0f9dcf0e7bcd053e0f1342f3dc70d3a22\">\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/baselayer-cb64d258/DA-VwktRc70nxaOV/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"BaseLayer\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3EB8AD\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.baselayer.id/api/vault-fact\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api/vault-fact.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.baselayer.id/#organization\",\"name\":\"BaseLayer\",\"url\":\"https://docs.baselayer.id\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/baselayer-cb64d258/pMVhqQ9wkFWOaVc4/logo/light.svg?fit=max\u0026auto=format\u0026n=pMVhqQ9wkFWOaVc4\u0026q=85\u0026s=eb1b18a0b5f1f0b019df3bd24384779d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.baselayer.id#website\",\"name\":\"BaseLayer\",\"url\":\"https://docs.baselayer.id\",\"publisher\":{\"@id\":\"https://docs.baselayer.id/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.baselayer.id/api/vault-fact#webpage\",\"url\":\"https://docs.baselayer.id/api/vault-fact\",\"name\":\"vault_fact\",\"description\":\"Assert a fact connecting two entities in the knowledge graph.\",\"dateModified\":\"2026-04-06T04:34:02.462Z\",\"isPartOf\":{\"@id\":\"https://docs.baselayer.id#website\"},\"breadcrumb\":{\"@id\":\"https://docs.baselayer.id/api/vault-fact#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.baselayer.id/api/vault-fact#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"MCP Tools\",\"item\":\"https://docs.baselayer.id/api/tools-overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"vault_fact\",\"item\":\"https://docs.baselayer.id/api/vault-fact\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.baselayer.id/api/vault-fact#article\",\"headline\":\"vault_fact\",\"name\":\"vault_fact\",\"description\":\"Assert a fact connecting two entities in the knowledge graph.\",\"url\":\"https://docs.baselayer.id/api/vault-fact\",\"mainEntityOfPage\":{\"@id\":\"https://docs.baselayer.id/api/vault-fact#webpage\"},\"dateModified\":\"2026-04-06T04:34:02.462Z\",\"publisher\":{\"@id\":\"https://docs.baselayer.id/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.baselayer.id#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"BaseLayer\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"BaseLayer\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api/vault-fact.md","siteName":"BaseLayer","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/overview"}]},{"tab":"MCP Tools","groups":[{"group":"MCP Tools","pages":[{"title":"MCP Tools Overview","href":"/api/tools-overview"},{"title":"ask_question","href":"/api/ask-question"},{"title":"memory_search","href":"/api/memory-search"},{"title":"get_entity","href":"/api/get-entity"},{"title":"get_entity_relations","href":"/api/get-entity-relations"},{"title":"get_entity_provenance","href":"/api/get-entity-provenance"},{"title":"list_entities","href":"/api/list-entities"},{"title":"recent_conversations","href":"/api/recent-conversations"},{"title":"retrieve_evidence","href":"/api/retrieve-evidence"},{"title":"record_memory","description":"Persist observations and context to your memory.","href":"/api/record-memory"},{"title":"vault_fact","href":"/api/vault-fact"},{"title":"update_plan","description":"Create or update persistent plan scratchpads.","href":"/api/update-plan"}]}]}]},"basePath":"","title":"vault_fact - BaseLayer","deploymentId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","buildId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","dynamics":[],"chunks":[]}