Skip to content

API Reference parrot.bots.factory.tools.vector_store

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.bots.factory.tools.vector_store

View source

Provision a PgVector table for a RAG agent.

Builders call provision_vector_store after the LLM has chosen a table name, schema and embedding dimension. The function creates the table via PgVectorStore.create_embedding_table and returns a StoreConfig block ready to embed in the resulting AgentDefinition.

Function provision_vector_store

Create a PgVector table and return a StoreConfig-shaped dict.

provision_vector_store(table: str, *, schema: str = 'public', dimension: int = 768, embedding_model: str = 'sentence-transformers/all-mpnet-base-v2', extra_columns: Optional[List[str]] = None, dsn: Optional[str] = None) -> Dict[str, Any]

Parameter Type Default Description
table str Target table name.
schema str 'public' Postgres schema (defaults to public).
dimension int 768 Embedding vector dimension. Match it to embedding_model.
embedding_model str 'sentence-transformers/all-mpnet-base-v2' HuggingFace / sentence-transformers identifier.
extra_columns Optional[List[str]] None Additional non-vector columns to add to the table.
dsn Optional[str] None Optional Postgres DSN override; falls back to PgVector defaults (driven by env vars: PG_HOST, PG_USER, …).

Returns: Dict[str, Any] — Dict with provider, table, schema, dimension, embedding_model ready to use as the vector_store block of an AgentDefinition.

Alias tool

Re-exported from parrot.tools.decorators.tool.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally