@mastra/mcp-docs-server 0.0.0-a2a-20250421213654
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +253 -0
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +16 -0
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +202 -0
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Ffirecrawl.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fgithub.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +113 -0
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fmem0.md +281 -0
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Frag.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fragie.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-azure.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-deepgram.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-elevenlabs.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-google.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-ibm.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-murf.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-openai.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-playai.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-replicate.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-speechify.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +302 -0
- package/.docs/organized/changelogs/create-mastra.md +302 -0
- package/.docs/organized/changelogs/mastra.md +302 -0
- package/.docs/organized/code-examples/agent-network.md +282 -0
- package/.docs/organized/code-examples/agent.md +426 -0
- package/.docs/organized/code-examples/ai-sdk-useChat.md +378 -0
- package/.docs/organized/code-examples/assistant-ui.md +37 -0
- package/.docs/organized/code-examples/bird-checker-with-express.md +235 -0
- package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +360 -0
- package/.docs/organized/code-examples/bird-checker-with-nextjs.md +250 -0
- package/.docs/organized/code-examples/client-side-tools.md +69 -0
- package/.docs/organized/code-examples/crypto-chatbot.md +96 -0
- package/.docs/organized/code-examples/fireworks-r1.md +159 -0
- package/.docs/organized/code-examples/mcp-registry-registry.md +63 -0
- package/.docs/organized/code-examples/memory-todo-agent.md +164 -0
- package/.docs/organized/code-examples/memory-with-context.md +167 -0
- package/.docs/organized/code-examples/memory-with-libsql.md +204 -0
- package/.docs/organized/code-examples/memory-with-mem0.md +121 -0
- package/.docs/organized/code-examples/memory-with-pg.md +224 -0
- package/.docs/organized/code-examples/memory-with-upstash.md +268 -0
- package/.docs/organized/code-examples/quick-start.md +129 -0
- package/.docs/organized/code-examples/stock-price-tool.md +124 -0
- package/.docs/organized/code-examples/weather-agent.md +331 -0
- package/.docs/organized/code-examples/workflow-ai-recruiter.md +159 -0
- package/.docs/organized/code-examples/workflow-with-inline-steps.md +111 -0
- package/.docs/organized/code-examples/workflow-with-memory.md +393 -0
- package/.docs/organized/code-examples/workflow-with-separate-steps.md +131 -0
- package/.docs/raw/agents/adding-tools.mdx +288 -0
- package/.docs/raw/agents/adding-voice.mdx +200 -0
- package/.docs/raw/agents/agent-memory.mdx +62 -0
- package/.docs/raw/agents/mcp-guide.mdx +215 -0
- package/.docs/raw/agents/overview.mdx +303 -0
- package/.docs/raw/agents/runtime-variables.mdx +137 -0
- package/.docs/raw/community/discord.mdx +12 -0
- package/.docs/raw/community/licensing.mdx +63 -0
- package/.docs/raw/deployment/client.mdx +120 -0
- package/.docs/raw/deployment/deployment.mdx +127 -0
- package/.docs/raw/deployment/overview.mdx +63 -0
- package/.docs/raw/deployment/server.mdx +282 -0
- package/.docs/raw/evals/custom-eval.mdx +22 -0
- package/.docs/raw/evals/overview.mdx +95 -0
- package/.docs/raw/evals/running-in-ci.mdx +81 -0
- package/.docs/raw/evals/textual-evals.mdx +54 -0
- package/.docs/raw/faq/index.mdx +63 -0
- package/.docs/raw/frameworks/ai-sdk.mdx +296 -0
- package/.docs/raw/frameworks/next-js.mdx +238 -0
- package/.docs/raw/getting-started/installation.mdx +442 -0
- package/.docs/raw/getting-started/mcp-docs-server.mdx +141 -0
- package/.docs/raw/getting-started/model-capability.mdx +11 -0
- package/.docs/raw/getting-started/project-structure.mdx +80 -0
- package/.docs/raw/index.mdx +22 -0
- package/.docs/raw/integrations/index.mdx +213 -0
- package/.docs/raw/local-dev/add-to-existing-project.mdx +48 -0
- package/.docs/raw/local-dev/creating-a-new-project.mdx +54 -0
- package/.docs/raw/local-dev/mastra-dev.mdx +124 -0
- package/.docs/raw/mastra-cloud/deploying.mdx +136 -0
- package/.docs/raw/mastra-cloud/observability.mdx +163 -0
- package/.docs/raw/mastra-cloud/overview.mdx +57 -0
- package/.docs/raw/mastra-cloud/setting-up.mdx +122 -0
- package/.docs/raw/memory/memory-processors.mdx +131 -0
- package/.docs/raw/memory/overview.mdx +119 -0
- package/.docs/raw/memory/semantic-recall.mdx +126 -0
- package/.docs/raw/memory/working-memory.mdx +87 -0
- package/.docs/raw/observability/logging.mdx +38 -0
- package/.docs/raw/observability/nextjs-tracing.mdx +108 -0
- package/.docs/raw/observability/tracing.mdx +115 -0
- package/.docs/raw/rag/chunking-and-embedding.mdx +156 -0
- package/.docs/raw/rag/overview.mdx +85 -0
- package/.docs/raw/rag/retrieval.mdx +365 -0
- package/.docs/raw/rag/vector-databases.mdx +340 -0
- package/.docs/raw/reference/agents/createTool.mdx +229 -0
- package/.docs/raw/reference/agents/generate.mdx +334 -0
- package/.docs/raw/reference/agents/getAgent.mdx +54 -0
- package/.docs/raw/reference/agents/stream.mdx +369 -0
- package/.docs/raw/reference/cli/build.mdx +55 -0
- package/.docs/raw/reference/cli/dev.mdx +134 -0
- package/.docs/raw/reference/cli/init.mdx +43 -0
- package/.docs/raw/reference/client-js/agents.mdx +107 -0
- package/.docs/raw/reference/client-js/error-handling.mdx +38 -0
- package/.docs/raw/reference/client-js/logs.mdx +24 -0
- package/.docs/raw/reference/client-js/memory.mdx +97 -0
- package/.docs/raw/reference/client-js/telemetry.mdx +20 -0
- package/.docs/raw/reference/client-js/tools.mdx +44 -0
- package/.docs/raw/reference/client-js/vectors.mdx +79 -0
- package/.docs/raw/reference/client-js/workflows.mdx +136 -0
- package/.docs/raw/reference/core/mastra-class.mdx +232 -0
- package/.docs/raw/reference/deployer/cloudflare.mdx +212 -0
- package/.docs/raw/reference/deployer/deployer.mdx +159 -0
- package/.docs/raw/reference/deployer/netlify.mdx +116 -0
- package/.docs/raw/reference/deployer/vercel.mdx +122 -0
- package/.docs/raw/reference/evals/answer-relevancy.mdx +186 -0
- package/.docs/raw/reference/evals/bias.mdx +186 -0
- package/.docs/raw/reference/evals/completeness.mdx +174 -0
- package/.docs/raw/reference/evals/content-similarity.mdx +183 -0
- package/.docs/raw/reference/evals/context-position.mdx +190 -0
- package/.docs/raw/reference/evals/context-precision.mdx +189 -0
- package/.docs/raw/reference/evals/context-relevancy.mdx +188 -0
- package/.docs/raw/reference/evals/contextual-recall.mdx +191 -0
- package/.docs/raw/reference/evals/faithfulness.mdx +193 -0
- package/.docs/raw/reference/evals/hallucination.mdx +219 -0
- package/.docs/raw/reference/evals/keyword-coverage.mdx +176 -0
- package/.docs/raw/reference/evals/prompt-alignment.mdx +238 -0
- package/.docs/raw/reference/evals/summarization.mdx +205 -0
- package/.docs/raw/reference/evals/textual-difference.mdx +161 -0
- package/.docs/raw/reference/evals/tone-consistency.mdx +181 -0
- package/.docs/raw/reference/evals/toxicity.mdx +165 -0
- package/.docs/raw/reference/index.mdx +12 -0
- package/.docs/raw/reference/memory/Memory.mdx +212 -0
- package/.docs/raw/reference/memory/createThread.mdx +95 -0
- package/.docs/raw/reference/memory/getThreadById.mdx +46 -0
- package/.docs/raw/reference/memory/getThreadsByResourceId.mdx +48 -0
- package/.docs/raw/reference/memory/query.mdx +167 -0
- package/.docs/raw/reference/networks/agent-network.mdx +159 -0
- package/.docs/raw/reference/observability/create-logger.mdx +106 -0
- package/.docs/raw/reference/observability/logger.mdx +55 -0
- package/.docs/raw/reference/observability/otel-config.mdx +120 -0
- package/.docs/raw/reference/observability/providers/braintrust.mdx +40 -0
- package/.docs/raw/reference/observability/providers/dash0.mdx +40 -0
- package/.docs/raw/reference/observability/providers/index.mdx +16 -0
- package/.docs/raw/reference/observability/providers/laminar.mdx +41 -0
- package/.docs/raw/reference/observability/providers/langfuse.mdx +51 -0
- package/.docs/raw/reference/observability/providers/langsmith.mdx +48 -0
- package/.docs/raw/reference/observability/providers/langwatch.mdx +45 -0
- package/.docs/raw/reference/observability/providers/new-relic.mdx +40 -0
- package/.docs/raw/reference/observability/providers/signoz.mdx +40 -0
- package/.docs/raw/reference/observability/providers/traceloop.mdx +40 -0
- package/.docs/raw/reference/rag/astra.mdx +258 -0
- package/.docs/raw/reference/rag/chroma.mdx +281 -0
- package/.docs/raw/reference/rag/chunk.mdx +235 -0
- package/.docs/raw/reference/rag/document.mdx +127 -0
- package/.docs/raw/reference/rag/embeddings.mdx +160 -0
- package/.docs/raw/reference/rag/extract-params.mdx +249 -0
- package/.docs/raw/reference/rag/graph-rag.mdx +182 -0
- package/.docs/raw/reference/rag/libsql.mdx +357 -0
- package/.docs/raw/reference/rag/metadata-filters.mdx +298 -0
- package/.docs/raw/reference/rag/pg.mdx +501 -0
- package/.docs/raw/reference/rag/pinecone.mdx +281 -0
- package/.docs/raw/reference/rag/qdrant.mdx +236 -0
- package/.docs/raw/reference/rag/rerank.mdx +212 -0
- package/.docs/raw/reference/rag/turbopuffer.mdx +249 -0
- package/.docs/raw/reference/rag/upstash.mdx +247 -0
- package/.docs/raw/reference/rag/vectorize.mdx +298 -0
- package/.docs/raw/reference/storage/cloudflare-d1.mdx +89 -0
- package/.docs/raw/reference/storage/cloudflare.mdx +93 -0
- package/.docs/raw/reference/storage/libsql.mdx +74 -0
- package/.docs/raw/reference/storage/postgresql.mdx +93 -0
- package/.docs/raw/reference/storage/upstash.mdx +86 -0
- package/.docs/raw/reference/tools/client.mdx +321 -0
- package/.docs/raw/reference/tools/document-chunker-tool.mdx +141 -0
- package/.docs/raw/reference/tools/graph-rag-tool.mdx +154 -0
- package/.docs/raw/reference/tools/mcp-configuration.mdx +222 -0
- package/.docs/raw/reference/tools/vector-query-tool.mdx +212 -0
- package/.docs/raw/reference/voice/azure.mdx +215 -0
- package/.docs/raw/reference/voice/cloudflare.mdx +152 -0
- package/.docs/raw/reference/voice/composite-voice.mdx +140 -0
- package/.docs/raw/reference/voice/deepgram.mdx +164 -0
- package/.docs/raw/reference/voice/elevenlabs.mdx +216 -0
- package/.docs/raw/reference/voice/google.mdx +198 -0
- package/.docs/raw/reference/voice/mastra-voice.mdx +394 -0
- package/.docs/raw/reference/voice/murf.mdx +251 -0
- package/.docs/raw/reference/voice/openai-realtime.mdx +432 -0
- package/.docs/raw/reference/voice/openai.mdx +168 -0
- package/.docs/raw/reference/voice/playai.mdx +159 -0
- package/.docs/raw/reference/voice/sarvam.mdx +260 -0
- package/.docs/raw/reference/voice/speechify.mdx +145 -0
- package/.docs/raw/reference/voice/voice.addInstructions.mdx +70 -0
- package/.docs/raw/reference/voice/voice.addTools.mdx +77 -0
- package/.docs/raw/reference/voice/voice.answer.mdx +69 -0
- package/.docs/raw/reference/voice/voice.close.mdx +56 -0
- package/.docs/raw/reference/voice/voice.connect.mdx +124 -0
- package/.docs/raw/reference/voice/voice.events.mdx +80 -0
- package/.docs/raw/reference/voice/voice.getSpeakers.mdx +283 -0
- package/.docs/raw/reference/voice/voice.listen.mdx +198 -0
- package/.docs/raw/reference/voice/voice.off.mdx +72 -0
- package/.docs/raw/reference/voice/voice.on.mdx +129 -0
- package/.docs/raw/reference/voice/voice.send.mdx +81 -0
- package/.docs/raw/reference/voice/voice.speak.mdx +203 -0
- package/.docs/raw/reference/voice/voice.updateConfig.mdx +87 -0
- package/.docs/raw/reference/workflows/after.mdx +88 -0
- package/.docs/raw/reference/workflows/afterEvent.mdx +76 -0
- package/.docs/raw/reference/workflows/commit.mdx +37 -0
- package/.docs/raw/reference/workflows/createRun.mdx +77 -0
- package/.docs/raw/reference/workflows/else.mdx +72 -0
- package/.docs/raw/reference/workflows/events.mdx +305 -0
- package/.docs/raw/reference/workflows/execute.mdx +110 -0
- package/.docs/raw/reference/workflows/if.mdx +107 -0
- package/.docs/raw/reference/workflows/resume.mdx +155 -0
- package/.docs/raw/reference/workflows/resumeWithEvent.mdx +133 -0
- package/.docs/raw/reference/workflows/snapshots.mdx +207 -0
- package/.docs/raw/reference/workflows/start.mdx +84 -0
- package/.docs/raw/reference/workflows/step-class.mdx +100 -0
- package/.docs/raw/reference/workflows/step-condition.mdx +134 -0
- package/.docs/raw/reference/workflows/step-function.mdx +92 -0
- package/.docs/raw/reference/workflows/step-options.mdx +69 -0
- package/.docs/raw/reference/workflows/step-retries.mdx +203 -0
- package/.docs/raw/reference/workflows/suspend.mdx +70 -0
- package/.docs/raw/reference/workflows/then.mdx +74 -0
- package/.docs/raw/reference/workflows/until.mdx +165 -0
- package/.docs/raw/reference/workflows/watch.mdx +118 -0
- package/.docs/raw/reference/workflows/while.mdx +168 -0
- package/.docs/raw/reference/workflows/workflow.mdx +233 -0
- package/.docs/raw/storage/overview.mdx +378 -0
- package/.docs/raw/voice/overview.mdx +816 -0
- package/.docs/raw/voice/speech-to-speech.mdx +73 -0
- package/.docs/raw/voice/speech-to-text.mdx +84 -0
- package/.docs/raw/voice/text-to-speech.mdx +89 -0
- package/.docs/raw/workflows/control-flow.mdx +778 -0
- package/.docs/raw/workflows/dynamic-workflows.mdx +236 -0
- package/.docs/raw/workflows/error-handling.mdx +183 -0
- package/.docs/raw/workflows/nested-workflows.mdx +352 -0
- package/.docs/raw/workflows/overview.mdx +170 -0
- package/.docs/raw/workflows/runtime-variables.mdx +153 -0
- package/.docs/raw/workflows/steps.mdx +108 -0
- package/.docs/raw/workflows/suspend-and-resume.mdx +404 -0
- package/.docs/raw/workflows/variables.mdx +313 -0
- package/LICENSE.md +46 -0
- package/README.md +129 -0
- package/dist/_tsup-dts-rollup.d.ts +140 -0
- package/dist/chunk-HYPVNJL7.js +194 -0
- package/dist/prepare-docs/prepare.d.ts +1 -0
- package/dist/prepare-docs/prepare.js +1 -0
- package/dist/stdio.d.ts +1 -0
- package/dist/stdio.js +650 -0
- package/package.json +60 -0
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Reference: Cloudflare Vector Store | Vector Databases | RAG | Mastra Docs"
|
|
3
|
+
description: Documentation for the CloudflareVector class in Mastra, which provides vector search using Cloudflare Vectorize.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Cloudflare Vector Store
|
|
7
|
+
|
|
8
|
+
The CloudflareVector class provides vector search using [Cloudflare Vectorize](https://developers.cloudflare.com/vectorize/), a vector database service integrated with Cloudflare's edge network.
|
|
9
|
+
|
|
10
|
+
## Constructor Options
|
|
11
|
+
|
|
12
|
+
<PropertiesTable
|
|
13
|
+
content={[
|
|
14
|
+
{
|
|
15
|
+
name: "accountId",
|
|
16
|
+
type: "string",
|
|
17
|
+
description: "Cloudflare account ID",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "apiToken",
|
|
21
|
+
type: "string",
|
|
22
|
+
description: "Cloudflare API token with Vectorize permissions",
|
|
23
|
+
},
|
|
24
|
+
]}
|
|
25
|
+
/>
|
|
26
|
+
|
|
27
|
+
## Methods
|
|
28
|
+
|
|
29
|
+
### createIndex()
|
|
30
|
+
|
|
31
|
+
<PropertiesTable
|
|
32
|
+
content={[
|
|
33
|
+
{
|
|
34
|
+
name: "indexName",
|
|
35
|
+
type: "string",
|
|
36
|
+
description: "Name of the index to create",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "dimension",
|
|
40
|
+
type: "number",
|
|
41
|
+
description: "Vector dimension (must match your embedding model)",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "metric",
|
|
45
|
+
type: "'cosine' | 'euclidean' | 'dotproduct'",
|
|
46
|
+
isOptional: true,
|
|
47
|
+
defaultValue: "cosine",
|
|
48
|
+
description:
|
|
49
|
+
"Distance metric for similarity search (dotproduct maps to dot-product)",
|
|
50
|
+
},
|
|
51
|
+
]}
|
|
52
|
+
/>
|
|
53
|
+
|
|
54
|
+
### upsert()
|
|
55
|
+
|
|
56
|
+
<PropertiesTable
|
|
57
|
+
content={[
|
|
58
|
+
{
|
|
59
|
+
name: "indexName",
|
|
60
|
+
type: "string",
|
|
61
|
+
description: "Name of the index to upsert into",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "vectors",
|
|
65
|
+
type: "number[][]",
|
|
66
|
+
description: "Array of embedding vectors",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "metadata",
|
|
70
|
+
type: "Record<string, any>[]",
|
|
71
|
+
isOptional: true,
|
|
72
|
+
description: "Metadata for each vector",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "ids",
|
|
76
|
+
type: "string[]",
|
|
77
|
+
isOptional: true,
|
|
78
|
+
description: "Optional vector IDs (auto-generated if not provided)",
|
|
79
|
+
},
|
|
80
|
+
]}
|
|
81
|
+
/>
|
|
82
|
+
|
|
83
|
+
### query()
|
|
84
|
+
|
|
85
|
+
<PropertiesTable
|
|
86
|
+
content={[
|
|
87
|
+
{
|
|
88
|
+
name: "indexName",
|
|
89
|
+
type: "string",
|
|
90
|
+
description: "Name of the index to query",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "queryVector",
|
|
94
|
+
type: "number[]",
|
|
95
|
+
description: "Query vector to find similar vectors",
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: "topK",
|
|
99
|
+
type: "number",
|
|
100
|
+
isOptional: true,
|
|
101
|
+
defaultValue: "10",
|
|
102
|
+
description: "Number of results to return",
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: "filter",
|
|
106
|
+
type: "Record<string, any>",
|
|
107
|
+
isOptional: true,
|
|
108
|
+
description: "Metadata filters for the query",
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: "includeVector",
|
|
112
|
+
type: "boolean",
|
|
113
|
+
isOptional: true,
|
|
114
|
+
defaultValue: "false",
|
|
115
|
+
description: "Whether to include vectors in the results",
|
|
116
|
+
},
|
|
117
|
+
]}
|
|
118
|
+
/>
|
|
119
|
+
|
|
120
|
+
### listIndexes()
|
|
121
|
+
|
|
122
|
+
Returns an array of index names as strings.
|
|
123
|
+
|
|
124
|
+
### describeIndex()
|
|
125
|
+
|
|
126
|
+
<PropertiesTable
|
|
127
|
+
content={[
|
|
128
|
+
{
|
|
129
|
+
name: "indexName",
|
|
130
|
+
type: "string",
|
|
131
|
+
description: "Name of the index to describe",
|
|
132
|
+
},
|
|
133
|
+
]}
|
|
134
|
+
/>
|
|
135
|
+
|
|
136
|
+
Returns:
|
|
137
|
+
|
|
138
|
+
```typescript copy
|
|
139
|
+
interface IndexStats {
|
|
140
|
+
dimension: number;
|
|
141
|
+
count: number;
|
|
142
|
+
metric: "cosine" | "euclidean" | "dotproduct";
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### deleteIndex()
|
|
147
|
+
|
|
148
|
+
<PropertiesTable
|
|
149
|
+
content={[
|
|
150
|
+
{
|
|
151
|
+
name: "indexName",
|
|
152
|
+
type: "string",
|
|
153
|
+
description: "Name of the index to delete",
|
|
154
|
+
},
|
|
155
|
+
]}
|
|
156
|
+
/>
|
|
157
|
+
|
|
158
|
+
### createMetadataIndex()
|
|
159
|
+
|
|
160
|
+
Creates an index on a metadata field to enable filtering.
|
|
161
|
+
|
|
162
|
+
<PropertiesTable
|
|
163
|
+
content={[
|
|
164
|
+
{
|
|
165
|
+
name: "indexName",
|
|
166
|
+
type: "string",
|
|
167
|
+
description: "Name of the index containing the metadata field",
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: "propertyName",
|
|
171
|
+
type: "string",
|
|
172
|
+
description: "Name of the metadata field to index",
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: "indexType",
|
|
176
|
+
type: "'string' | 'number' | 'boolean'",
|
|
177
|
+
description: "Type of the metadata field",
|
|
178
|
+
},
|
|
179
|
+
]}
|
|
180
|
+
/>
|
|
181
|
+
|
|
182
|
+
### deleteMetadataIndex()
|
|
183
|
+
|
|
184
|
+
Removes an index from a metadata field.
|
|
185
|
+
|
|
186
|
+
<PropertiesTable
|
|
187
|
+
content={[
|
|
188
|
+
{
|
|
189
|
+
name: "indexName",
|
|
190
|
+
type: "string",
|
|
191
|
+
description: "Name of the index containing the metadata field",
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: "propertyName",
|
|
195
|
+
type: "string",
|
|
196
|
+
description: "Name of the metadata field to remove indexing from",
|
|
197
|
+
},
|
|
198
|
+
]}
|
|
199
|
+
/>
|
|
200
|
+
|
|
201
|
+
### listMetadataIndexes()
|
|
202
|
+
|
|
203
|
+
Lists all metadata field indexes for an index.
|
|
204
|
+
|
|
205
|
+
<PropertiesTable
|
|
206
|
+
content={[
|
|
207
|
+
{
|
|
208
|
+
name: "indexName",
|
|
209
|
+
type: "string",
|
|
210
|
+
description: "Name of the index to list metadata indexes for",
|
|
211
|
+
},
|
|
212
|
+
]}
|
|
213
|
+
/>
|
|
214
|
+
|
|
215
|
+
### updateIndexById()
|
|
216
|
+
|
|
217
|
+
Updates a vector or metadata for a specific ID within an index.
|
|
218
|
+
|
|
219
|
+
<PropertiesTable
|
|
220
|
+
content={[
|
|
221
|
+
{
|
|
222
|
+
name: "indexName",
|
|
223
|
+
type: "string",
|
|
224
|
+
description: "Name of the index containing the ID to update",
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: "id",
|
|
228
|
+
type: "string",
|
|
229
|
+
description: "Unique identifier of the vector or metadata to update",
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: "update",
|
|
233
|
+
type: "{ vector?: number[]; metadata?: Record<string, any>; }",
|
|
234
|
+
description: "Object containing the vector and/or metadata to update",
|
|
235
|
+
},
|
|
236
|
+
]}
|
|
237
|
+
/>
|
|
238
|
+
|
|
239
|
+
### deleteIndexById()
|
|
240
|
+
|
|
241
|
+
Deletes a vector and its associated metadata for a specific ID within an index.
|
|
242
|
+
|
|
243
|
+
<PropertiesTable
|
|
244
|
+
content={[
|
|
245
|
+
{
|
|
246
|
+
name: "indexName",
|
|
247
|
+
type: "string",
|
|
248
|
+
description: "Name of the index containing the ID to delete",
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
name: "id",
|
|
252
|
+
type: "string",
|
|
253
|
+
description: "Unique identifier of the vector and metadata to delete",
|
|
254
|
+
},
|
|
255
|
+
]}
|
|
256
|
+
/>
|
|
257
|
+
|
|
258
|
+
## Response Types
|
|
259
|
+
|
|
260
|
+
Query results are returned in this format:
|
|
261
|
+
|
|
262
|
+
```typescript copy
|
|
263
|
+
interface QueryResult {
|
|
264
|
+
id: string;
|
|
265
|
+
score: number;
|
|
266
|
+
metadata: Record<string, any>;
|
|
267
|
+
vector?: number[];
|
|
268
|
+
}
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
## Error Handling
|
|
272
|
+
|
|
273
|
+
The store throws typed errors that can be caught:
|
|
274
|
+
|
|
275
|
+
```typescript copy
|
|
276
|
+
try {
|
|
277
|
+
await store.query({
|
|
278
|
+
indexName: "index_name",
|
|
279
|
+
queryVector: queryVector,
|
|
280
|
+
});
|
|
281
|
+
} catch (error) {
|
|
282
|
+
if (error instanceof VectorStoreError) {
|
|
283
|
+
console.log(error.code); // 'connection_failed' | 'invalid_dimension' | etc
|
|
284
|
+
console.log(error.details); // Additional error context
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
## Environment Variables
|
|
290
|
+
|
|
291
|
+
Required environment variables:
|
|
292
|
+
|
|
293
|
+
- `CLOUDFLARE_ACCOUNT_ID`: Your Cloudflare account ID
|
|
294
|
+
- `CLOUDFLARE_API_TOKEN`: Your Cloudflare API token with Vectorize permissions
|
|
295
|
+
|
|
296
|
+
## Related
|
|
297
|
+
|
|
298
|
+
- [Metadata Filters](./metadata-filters)
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Cloudflare D1 Storage | Storage System | Mastra Core"
|
|
3
|
+
description: Documentation for the Cloudflare D1 SQL storage implementation in Mastra.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Cloudflare D1 Storage
|
|
7
|
+
|
|
8
|
+
The Cloudflare D1 storage implementation provides a serverless SQL database solution using Cloudflare D1, supporting relational operations and transactional consistency.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install @mastra/cloudflare-d1
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```typescript copy showLineNumbers
|
|
19
|
+
import { D1Store } from "@mastra/cloudflare-d1";
|
|
20
|
+
|
|
21
|
+
// --- Example 1: Using Workers Binding ---
|
|
22
|
+
const storageWorkers = new D1Store({
|
|
23
|
+
binding: D1Database, // D1Database binding provided by the Workers runtime
|
|
24
|
+
tablePrefix: 'dev_', // Optional: isolate tables per environment
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
// --- Example 2: Using REST API ---
|
|
28
|
+
const storageRest = new D1Store({
|
|
29
|
+
accountId: process.env.CLOUDFLARE_ACCOUNT_ID!, // Cloudflare Account ID
|
|
30
|
+
databaseId: process.env.CLOUDFLARE_D1_DATABASE_ID!, // D1 Database ID
|
|
31
|
+
apiToken: process.env.CLOUDFLARE_API_TOKEN!, // Cloudflare API Token
|
|
32
|
+
tablePrefix: 'dev_', // Optional: isolate tables per environment
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Parameters
|
|
37
|
+
|
|
38
|
+
<PropertiesTable
|
|
39
|
+
content={[
|
|
40
|
+
{
|
|
41
|
+
name: "binding",
|
|
42
|
+
type: "D1Database",
|
|
43
|
+
description: "Cloudflare D1 Workers binding (for Workers runtime)",
|
|
44
|
+
isOptional: true,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "accountId",
|
|
48
|
+
type: "string",
|
|
49
|
+
description: "Cloudflare Account ID (for REST API)",
|
|
50
|
+
isOptional: true,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "databaseId",
|
|
54
|
+
type: "string",
|
|
55
|
+
description: "Cloudflare D1 Database ID (for REST API)",
|
|
56
|
+
isOptional: true,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "apiToken",
|
|
60
|
+
type: "string",
|
|
61
|
+
description: "Cloudflare API Token (for REST API)",
|
|
62
|
+
isOptional: true,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "tablePrefix",
|
|
66
|
+
type: "string",
|
|
67
|
+
description: "Optional prefix for all table names (useful for environment isolation)",
|
|
68
|
+
isOptional: true,
|
|
69
|
+
},
|
|
70
|
+
]}
|
|
71
|
+
/>
|
|
72
|
+
|
|
73
|
+
## Additional Notes
|
|
74
|
+
|
|
75
|
+
### Schema Management
|
|
76
|
+
|
|
77
|
+
The storage implementation handles schema creation and updates automatically. It creates the following tables:
|
|
78
|
+
|
|
79
|
+
- `threads`: Stores conversation threads
|
|
80
|
+
- `messages`: Stores individual messages
|
|
81
|
+
- `metadata`: Stores additional metadata for threads and messages
|
|
82
|
+
|
|
83
|
+
### Transactions & Consistency
|
|
84
|
+
|
|
85
|
+
Cloudflare D1 provides transactional guarantees for single-row operations. This means that multiple operations can be executed as a single, all-or-nothing unit of work.
|
|
86
|
+
|
|
87
|
+
### Table Creation & Migrations
|
|
88
|
+
|
|
89
|
+
Tables are created automatically when storage is initialized (and can be isolated per environment using the `tablePrefix` option), but advanced schema changes—such as adding columns, changing data types, or modifying indexes—require manual migration and careful planning to avoid data loss.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Cloudflare Storage | Storage System | Mastra Core"
|
|
3
|
+
description: Documentation for the Cloudflare KV storage implementation in Mastra.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Cloudflare Storage
|
|
7
|
+
|
|
8
|
+
The Cloudflare KV storage implementation provides a globally distributed, serverless key-value store solution using Cloudflare Workers KV.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install @mastra/cloudflare
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```typescript copy showLineNumbers
|
|
19
|
+
import { CloudflareStore } from "@mastra/cloudflare";
|
|
20
|
+
|
|
21
|
+
// --- Example 1: Using Workers Binding ---
|
|
22
|
+
const storageWorkers = new CloudflareStore({
|
|
23
|
+
bindings: {
|
|
24
|
+
threads: THREADS_KV, // KVNamespace binding for threads table
|
|
25
|
+
messages: MESSAGES_KV, // KVNamespace binding for messages table
|
|
26
|
+
// Add other tables as needed
|
|
27
|
+
},
|
|
28
|
+
keyPrefix: 'dev_', // Optional: isolate keys per environment
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
// --- Example 2: Using REST API ---
|
|
32
|
+
const storageRest = new CloudflareStore({
|
|
33
|
+
accountId: process.env.CLOUDFLARE_ACCOUNT_ID!, // Cloudflare Account ID
|
|
34
|
+
apiToken: process.env.CLOUDFLARE_API_TOKEN!, // Cloudflare API Token
|
|
35
|
+
namespacePrefix: 'dev_', // Optional: isolate namespaces per environment
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Parameters
|
|
40
|
+
|
|
41
|
+
<PropertiesTable
|
|
42
|
+
content={[
|
|
43
|
+
{
|
|
44
|
+
name: "bindings",
|
|
45
|
+
type: "Record<string, KVNamespace>",
|
|
46
|
+
description: "Cloudflare Workers KV bindings (for Workers runtime)",
|
|
47
|
+
isOptional: true,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "accountId",
|
|
51
|
+
type: "string",
|
|
52
|
+
description: "Cloudflare Account ID (for REST API)",
|
|
53
|
+
isOptional: true,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "apiToken",
|
|
57
|
+
type: "string",
|
|
58
|
+
description: "Cloudflare API Token (for REST API)",
|
|
59
|
+
isOptional: true,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "namespacePrefix",
|
|
63
|
+
type: "string",
|
|
64
|
+
description: "Optional prefix for all namespace names (useful for environment isolation)",
|
|
65
|
+
isOptional: true,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "keyPrefix",
|
|
69
|
+
type: "string",
|
|
70
|
+
description: "Optional prefix for all keys (useful for environment isolation)",
|
|
71
|
+
isOptional: true,
|
|
72
|
+
},
|
|
73
|
+
]}
|
|
74
|
+
/>
|
|
75
|
+
|
|
76
|
+
#### Additional Notes
|
|
77
|
+
|
|
78
|
+
### Schema Management
|
|
79
|
+
|
|
80
|
+
The storage implementation handles schema creation and updates automatically. It creates the following tables:
|
|
81
|
+
|
|
82
|
+
- `threads`: Stores conversation threads
|
|
83
|
+
- `messages`: Stores individual messages
|
|
84
|
+
- `metadata`: Stores additional metadata for threads and messages
|
|
85
|
+
|
|
86
|
+
### Consistency & Propagation
|
|
87
|
+
|
|
88
|
+
Cloudflare KV is an eventually consistent store, meaning that data may not be immediately available across all regions after a write.
|
|
89
|
+
|
|
90
|
+
### Key Structure & Namespacing
|
|
91
|
+
|
|
92
|
+
Keys in Cloudflare KV are structured as a combination of a configurable prefix and a table-specific format (e.g., `threads:threadId`).
|
|
93
|
+
For Workers deployments, `keyPrefix` is used to isolate data within a namespace; for REST API deployments, `namespacePrefix` is used to isolate entire namespaces between environments or applications.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "LibSQL Storage | Storage System | Mastra Core"
|
|
3
|
+
description: Documentation for the LibSQL storage implementation in Mastra.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# LibSQL Storage
|
|
7
|
+
|
|
8
|
+
The LibSQL storage implementation provides a SQLite-compatible storage solution that can run both in-memory and as a persistent database.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install @mastra/storage-libsql
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```typescript copy showLineNumbers
|
|
19
|
+
import { LibSQLStore } from "@mastra/core/storage/libsql";
|
|
20
|
+
|
|
21
|
+
// File database (development)
|
|
22
|
+
const storage = new LibSQLStore({
|
|
23
|
+
config: {
|
|
24
|
+
url: 'file:storage.db',
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// Persistent database (production)
|
|
29
|
+
const storage = new LibSQLStore({
|
|
30
|
+
config: {
|
|
31
|
+
url: process.env.DATABASE_URL,
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Parameters
|
|
37
|
+
|
|
38
|
+
<PropertiesTable
|
|
39
|
+
content={[
|
|
40
|
+
{
|
|
41
|
+
name: "url",
|
|
42
|
+
type: "string",
|
|
43
|
+
description:
|
|
44
|
+
"Database URL. Use ':memory:' for in-memory database, 'file:filename.db' for a file database, or any LibSQL-compatible connection string for persistent storage.",
|
|
45
|
+
isOptional: false,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "authToken",
|
|
49
|
+
type: "string",
|
|
50
|
+
description: "Authentication token for remote LibSQL databases.",
|
|
51
|
+
isOptional: true,
|
|
52
|
+
},
|
|
53
|
+
]}
|
|
54
|
+
/>
|
|
55
|
+
|
|
56
|
+
## Additional Notes
|
|
57
|
+
|
|
58
|
+
### In-Memory vs Persistent Storage
|
|
59
|
+
|
|
60
|
+
The file configuration (`file:storage.db`) is useful for:
|
|
61
|
+
|
|
62
|
+
- Development and testing
|
|
63
|
+
- Temporary storage
|
|
64
|
+
- Quick prototyping
|
|
65
|
+
|
|
66
|
+
For production use cases, use a persistent database URL: `libsql://your-database.turso.io`
|
|
67
|
+
|
|
68
|
+
### Schema Management
|
|
69
|
+
|
|
70
|
+
The storage implementation handles schema creation and updates automatically. It creates the following tables:
|
|
71
|
+
|
|
72
|
+
- `threads`: Stores conversation threads
|
|
73
|
+
- `messages`: Stores individual messages
|
|
74
|
+
- `metadata`: Stores additional metadata for threads and messages
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "PostgreSQL Storage | Storage System | Mastra Core"
|
|
3
|
+
description: Documentation for the PostgreSQL storage implementation in Mastra.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PostgreSQL Storage
|
|
7
|
+
|
|
8
|
+
The PostgreSQL storage implementation provides a production-ready storage solution using PostgreSQL databases.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install @mastra/pg
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```typescript copy showLineNumbers
|
|
19
|
+
import { PostgresStore } from "@mastra/pg";
|
|
20
|
+
|
|
21
|
+
const storage = new PostgresStore({
|
|
22
|
+
connectionString: process.env.DATABASE_URL,
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Parameters
|
|
27
|
+
|
|
28
|
+
<PropertiesTable
|
|
29
|
+
content={[
|
|
30
|
+
{
|
|
31
|
+
name: "connectionString",
|
|
32
|
+
type: "string",
|
|
33
|
+
description:
|
|
34
|
+
"PostgreSQL connection string (e.g., postgresql://user:pass@host:5432/dbname)",
|
|
35
|
+
isOptional: false,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "schemaName",
|
|
39
|
+
type: "string",
|
|
40
|
+
description:
|
|
41
|
+
"The name of the schema you want the storage to use. Will use the default schema if not provided.",
|
|
42
|
+
isOptional: true,
|
|
43
|
+
}
|
|
44
|
+
]}
|
|
45
|
+
/>
|
|
46
|
+
|
|
47
|
+
## Constructor Examples
|
|
48
|
+
|
|
49
|
+
You can instantiate `PostgresStore` in the following ways:
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
import { PostgresStore } from '@mastra/pg';
|
|
53
|
+
|
|
54
|
+
// Using a connection string only
|
|
55
|
+
const store1 = new PostgresStore({
|
|
56
|
+
connectionString: 'postgresql://user:password@localhost:5432/mydb',
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// Using a connection string with a custom schema name
|
|
60
|
+
const store2 = new PostgresStore({
|
|
61
|
+
connectionString: 'postgresql://user:password@localhost:5432/mydb',
|
|
62
|
+
schemaName: 'custom_schema', // optional
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
// Using individual connection parameters
|
|
66
|
+
const store4 = new PostgresStore({
|
|
67
|
+
host: 'localhost',
|
|
68
|
+
port: 5432,
|
|
69
|
+
database: 'mydb',
|
|
70
|
+
user: 'user',
|
|
71
|
+
password: 'password',
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
// Individual parameters with schemaName
|
|
75
|
+
const store5 = new PostgresStore({
|
|
76
|
+
host: 'localhost',
|
|
77
|
+
port: 5432,
|
|
78
|
+
database: 'mydb',
|
|
79
|
+
user: 'user',
|
|
80
|
+
password: 'password',
|
|
81
|
+
schemaName: 'custom_schema', // optional
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Additional Notes
|
|
86
|
+
|
|
87
|
+
### Schema Management
|
|
88
|
+
|
|
89
|
+
The storage implementation handles schema creation and updates automatically. It creates the following tables:
|
|
90
|
+
|
|
91
|
+
- `threads`: Stores conversation threads
|
|
92
|
+
- `messages`: Stores individual messages
|
|
93
|
+
- `metadata`: Stores additional metadata for threads and messages
|