Meta tags:
description= Give your agent a database it can read from and write to;
Headings (most frequently used words):
the, store, steps, agent, using, knowledge, stores, adding, second, next, create, declare, read, connection, in, your, code, run, it, locally, push, blueprint, deploy, from, dashboard, claude, sdk, data, with, sqlite,
Text of the page (most frequently used words):
the (46), agent (25), your (21), store (20), knowledge (15), database (13), with (12), postgres (12), writer (12), and (11), #stores (10), first (9), from (8), for (7), agents (7), you (7), provider (7), variables (7), blueprint (7), astropods (6), spec (6), name (6), deploy (6), data (5), this (5), page (5), managing (5), connect (5), one (5), postgres_user (5), postgres_host (5), host (5), port (5), cli (5), env (5), process (5), environ (5), 2026 (4), not (4), next (4), sdk (4), reference (4), steps (4), can (4), primary (4), shared (4), entry (4), same (4), second (4), ast (4), project (4), postgres_db (4), password (4), postgres_password (4), postgres_port (4), using (4), card (4), share (3), sqlite (3), credentials (3), secrets (3), set (3), local (3), analytics (3), get (3), adding (3), only (3), add (3), platform (3), any (3), push (3), redis (3), qdrant (3), neo4j (3), pool (3), import (3), connection (3), yml (3), declare (3), changelog (3), overview (3), claude (2), block (2), account (2), across (2), each (2), backed (2), its (2), after (2), added (2), named (2), postgres_ (2), when (2), type (2), they (2), under (2), see (2), form (2), default (2), creates (2), dashboard (2), that (2), run (2), locally (2), single (2), url (2), variable (2), user (2), replace (2), driver (2), psycopg2 (2), details (2), environment (2), read (2), pinecone (2), mysql (2), dockerfile (2), create (2), markdown (2), ask (2), guides (2), website (2), join (2), discord (2), june (2), allowlist (2), egress (2), ips (2), known (2), integrations (2), custom (2), adapter (2), python (2), node (2), mastra (2), manually (2), authorize (2), requests (2), oauth (2), protected (2), mcp (2), servers (2), serve (2), frontend (2), gateway (2), working (2), accounts (2), authentication (2), install (2), welcome (2), api (2), docs (2), documentation (2), index (2), level (2), llms (2), txt (2), postman, all, rights, reserved, cookie, preferences, sell, personal, information, privacy, policy, terms, service, built, previous, yes, was, helpful, full, deployment, own, leave, another, make, postgres_writer_user, postgres_writer_host, postgres_analytics_user, postgres_analytics_host, keeps, plain, names, others, none, alphabetically, here, comes, have, two, don, clash, then, appears, live, status, use, stored, encrypted, matching, selected, connecting, private, network, ready, submit, has, toggle, point, connected, back, several, pick, dropdown, managed, just, choose, how, fill, either, value, vault, anthropic_api_key, find, click, blueprints, records, needs, does, contain, login, starts, container, wired, persists, restarts, logs, stream, foreground, ctrl, stop, start, gives, separate, fields, also, prefix, _url, username, 5432, meaning, number, new, const, dbname, conn, arrive, code, supported, values, context, build, generates, starter, source, anthropic, model, are, simply, part, them, changes, guide, builds, uses, passes, more, actions, view, copy, question, give, write, scroll, top, light, may, langchain, adapters, messaging, frameworks, monitor, started, search, available, root, append, version, astro,
Text of the page (random words):
using knowledge stores astro ai documentation for ai agents a documentation index is available at the root level at llms txt append llms txt to any url for a page level index or md for the markdown version of any page search ask ai join discord website docs cli api reference docs cli api reference get started welcome install the cli your first project your first blueprint deploy your first agent managing your agents authentication platform working with accounts managing secrets ai gateway agent card knowledge stores monitor your agents overview frameworks guides using knowledge stores store data with sqlite serve a frontend from your agent connect to oauth protected mcp servers manually authorize requests messaging sdk adapters reference astropods spec agent card spec known integrations allowlist egress ips changelog changelog welcome install the cli your first project your first blueprint deploy your first agent managing your agents authentication working with accounts managing secrets ai gateway agent card knowledge stores overview ai sdk mastra claude agent sdk using knowledge stores store data with sqlite serve a frontend from your agent connect to oauth protected mcp servers manually authorize requests node python overview mastra langchain custom adapter node custom adapter python astropods spec agent card spec known integrations allowlist egress ips changelog june 23 2026 june 10 2026 may 28 2026 join discord website light on this page steps adding a second store next steps scroll to top guides using knowledge stores give your agent a database it can read from and write to ask a question copy page view as markdown more actions a knowledge store is a database your agent uses postgres mysql redis qdrant neo4j or pinecone you declare it in astropods yml the platform creates it and passes the connection details to your agent as environment variables this guide builds an agent with a single postgres store named writer declare it run it locally push a blueprint and deploy it from the dashboard 1 knowledge 2 writer 3 provider postgres with one store the variables are simply postgres_host postgres_port postgres_user postgres_password postgres_db the entry name writer is not part of them that only changes when you add a second store of the same type see adding a second store steps 1 create the agent ast project create writer agent model anthropic cd writer agent this generates the starter source and astropods yml 2 declare the store add a knowledge block to astropods yml 1 spec blueprint v1 2 name writer agent 3 4 agent 5 build 6 context 7 dockerfile dockerfile 8 9 knowledge 10 writer 11 provider postgres you only set the provider no host port or password supported values postgres mysql redis qdrant neo4j and pinecone 3 read the connection in your code the connection details arrive as environment variables 1 import os 2 import psycopg2 replace with your database driver 3 4 conn psycopg2 connect 5 host os environ postgres_host 6 port os environ postgres_port 7 user os environ postgres_user 8 password os environ postgres_password 9 dbname os environ postgres_db 10 1 import pool from pg replace with your database driver 2 3 const pool new pool 4 host process env postgres_host 5 port number process env postgres_port 6 user process env postgres_user 7 password process env postgres_password 8 database process env postgres_db 9 variable meaning postgres_host host postgres_port port default 5432 postgres_user username postgres_password password postgres_db database name postgres gives you separate fields not a single url redis qdrant and neo4j also get a prefix _url variable 4 run it locally ast project start the cli starts a postgres container next to your agent with the same postgres_ variables wired in your data persists across restarts logs stream in the foreground ctrl c to stop 5 push a blueprint ast login ast blueprint push writer agent the blueprint records that the agent needs a writer postgres store it does not contain any credentials 6 deploy from the dashboard go to blueprints find writer agent and click deploy in the form set variables fill in anthropic_api_key either as a value or from your vault choose how the store is backed each store has a local shared toggle local default the platform creates a managed postgres database just for this agent shared point the store at a database you ve connected to the account one database can back several agents so they share the same data pick it from the dropdown deploy submit the form to use shared connect the database first under knowledge add store host port database credentials stored encrypted only matching ready stores can be selected see knowledge stores for connecting a database in a private network the agent then appears under agents with its live status adding a second store when you have two stores of the same type the entry name is added to the variables so they don t clash 1 knowledge 2 writer 3 provider postgres 4 analytics 5 provider postgres one store is the primary and keeps the plain postgres_ names the others get the name added the primary is the entry named after the provider or if none is the first one alphabetically here analytics comes first entry variables analytics primary postgres_host postgres_user and postgres_analytics_host postgres_analytics_user writer postgres_writer_host postgres_writer_user each store is backed on its own so you can leave one local and set another to shared to make a store the primary name it after the provider e g postgres next steps knowledge stores connect a database to your account and share it across agents managing secrets store credentials for deployment astropods spec full reference for the knowledge block was this page helpful yes no previous claude agent sdk next store data with sqlite built with terms of service privacy policy do not sell or share my personal information cookie preferences 2026 postman all rights reserved
|