Griptape Vector Store: Add Text
Populate your vector store without leaving the graph
- agent
- input
- AGENT
Before your agent can answer questions from a vector store, something has to put text in it. That something is this node. "Griptape Vector Store: Add Text" is the upsert node of the pack: you give it text (from a file, a prompt, another node - the input accepts anything), and it chunks that text and writes it into the vector store attached to your agent. It's the load step of the RAG pipeline, and you'll find yourself reaching for it whenever you want a self-contained workflow that loads documents and queries them in the same run instead of pre-populating a database externally.
This is also the node that demystifies how the pack wires vector stores together. The agent you connect carries its own vector store driver (you attach a driver when you create the agent). This node doesn't take a driver input at all - it pulls the store from the agent and upserts into it. So the shape is: agent with a vector store driver → Add Text chunks and stores your content → the VectorStore tool (or a RAG setup) lets the agent query what you just stored. Load and query in one graph.
How it works
The node grabs the vector store driver off your agent, runs the input text through a TextChunker with a configurable max chunk size, then calls upsert_text_artifacts with the chunks under a namespace. Chunking matters: it's how big documents get split into pieces that fit in a context window and embed sensibly. The max_chunk_tokens input (default 100) controls chunk size - lower means smaller, more numerous chunks.
The inputs that matter
- agent - required. The AGENT whose vector store gets written to. This is why the node returns the same AGENT back out: you chain it along the graph so subsequent nodes keep working with the same (now-populated) agent.
- input - optional, type
*, so it accepts just about anything text-ish. The content to store. - namespace - default
default. A label for the chunk group. Useful if you want to store separate document sets and query them independently. - max_chunk_tokens - default 100. How big each stored chunk is. Lower it for finer-grained retrieval; raise it for documents where you want bigger context blocks.
One output, AGENT - the same agent, now with content in its store, ready to feed the next node.
Install
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/griptape-ai/ComfyUI-Griptape
or ComfyUI Manager → search "Griptape" → install → restart. It lives under Griptape/Text in the menu.
Where people get burned
The recurring confusion is expecting the stored text to come out of this node - it doesn't; the output is the agent, and the text is tucked into its store. Verify the write by querying afterward with the VectorStore tool. Second, if you're using a local or dummy vector store, check the driver actually has persistence - in-memory stores vanish when the session ends, and then "the store" is empty next run. Third, remember the input is chunked at max_chunk_tokens; with the default 100 you get small pieces, which is fine for retrieval but means you're not storing whole documents in one blob. And if the agent's store driver uses an embedding model, make sure any query side uses the same one - mismatched embeddings silently destroy retrieval quality.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| agent | AGENT | — | |
| namespaceopt | STRING | default | — |
| max_chunk_tokensopt | INT | 100 | — |
| inputopt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| AGENT | AGENT | — |