zerodb_generate_embeddings
Generate embeddings using specified model (384/768/1024 dimensions). Supports BAAI/bge-small-en-v1.5 (384-dim, default), BAAI/bge-base-en-v1.5 (768-dim), BAAI/bge-large-en-v1.5 (1024-dim). Use when you need raw embedding vectors without storing them. Does not persist data — for embed + store in one step, use zerodb_embed_and_store instead.
输入参数modeltexts必填
Generate embeddings and store in ZeroDB in one step. Auto-detects dimension based on model and routes to correct storage. Use when you want to embed text and persist the vectors in a single call. Combines zerodb_generate_embeddings + zerodb_upsert_vector.
输入参数modeltexts必填metadatanamespace
Semantic search using text query (auto-embeds query text). Searches vectors in the same dimension as the model used. Use when searching vectors using a text query (auto-embeds the text). Unlike zerodb_search_vectors which requires a raw vector, this accepts plain text. Unlike zerodb_search_memory which searches agent conversation memory, this searches the general vector store.
输入参数limitmodelnamespacethresholdquery_text必填filter_metadata
Store agent memory in ZeroDB for persistent context. Use when the agent needs to persist conversation turns, decisions, or observations for later recall. Stores with role, session, and agent metadata for filtered retrieval.
输入参数role必填content必填agent_idmetadatasession_id
Search agent memory using semantic similarity. Use when searching agent conversation memory by natural language. Unlike zerodb_search_vectors which requires a raw vector, and zerodb_semantic_search which searches the general vector store, this searches agent-specific memory entries filtered by session/agent/role.
输入参数rolelimitquery必填agent_idsession_id
Get agent context window for current session. Use when the agent needs to retrieve its recent conversation context within token limits. Returns the most recent memories for a session, bounded by max_tokens.
输入参数agent_idmax_tokenssession_id必填
Store or update a vector embedding with metadata. Supports 384, 768, 1024, or 1536 dimensions. Dimension is auto-detected and validated. Use when you have a pre-computed embedding vector to store or update. For embedding text and storing in one step, use zerodb_embed_and_store instead.
输入参数document必填metadatanamespacevector_idvector_embedding必填
zerodb_batch_upsert_vectors
Batch upsert multiple vectors for efficiency. Use when storing many vectors at once to reduce API round-trips. Accepts an array of vector objects and processes them in a single request.
输入参数vectors必填namespace
Search vectors using semantic similarity. Supports 384, 768, 1024, or 1536 dimension query vectors. Auto-detects dimension. Use when searching raw vector embeddings by similarity with a query vector. Unlike zerodb_semantic_search which accepts text (auto-embeds), this requires a pre-computed vector. Unlike zerodb_search_memory which searches agent memory, this searches the general vector store.
输入参数limitnamespacethresholdquery_vector必填filter_metadata
Delete a specific vector by ID. Use when removing a single vector embedding from the store. WARNING: This operation is irreversible.
输入参数namespacevector_id必填
Retrieve a specific vector by ID. Use when you need to inspect a particular vector's metadata or embedding values. Optionally includes the full embedding array.
输入参数namespacevector_id必填include_embedding
List vectors in a project/namespace with pagination. Use when the agent needs to browse or enumerate stored vectors, or answer "what vectors exist?". Supports filtering by namespace and metadata.
输入参数limitoffsetnamespacefilter_metadata
Get vector statistics for a project. Use when checking how many vectors are stored, their dimensions, and namespace distribution. Returns counts, dimension breakdowns, and optionally detailed statistics.
输入参数detailednamespace
zerodb_create_vector_index
Create optimized index for vector search. Use when search performance needs improvement on large vector collections. Supports IVF, HNSW, and flat index types with configurable distance metrics.
输入参数namespaceindex_typeindex_paramsdistance_metric
Optimize vector storage for better performance. Use when vector search is slow or storage needs compaction. Supports compress, reindex, and deduplicate operations. Use dry_run to preview changes first.
输入参数dry_runnamespaceoptimize_type
Export vectors to various formats (JSON, CSV, Parquet). Use when you need to download or migrate vector data out of ZeroDB. Supports filtering by namespace and metadata.
输入参数formatnamespacefilter_metadatainclude_embeddings
Compress vector using TurboQuant (PolarQuant + QJL) algorithm from Google Research (ICLR 2026). Achieves ~3.5x compression with 0.9999+ cosine similarity preservation. Data-oblivious — no calibration needed. Returns base64-encoded compressed data.
输入参数methodprecisionvector_embedding必填compression_ratiopreserve_similarity
zerodb_quantum_decompress
Decompress a TurboQuant-compressed vector back to original dimensions. Reconstructs the full vector from the base64-encoded compressed data returned by zerodb_quantum_compress.
输入参数compressed_vector必填original_dimensionscompression_metadata
zerodb_quantum_hybrid_search
Hybrid similarity search combining cosine similarity with metadata boosting. Returns ranked results with configurable weighting between similarity score and metadata relevance.
输入参数limitnamespacequery_vector必填quantum_weightclassical_weight
Analyze vector space characteristics for optimal TurboQuant compression settings. Reports sparsity, magnitude distribution, and recommended precision level.
输入参数namespacetarget_backendoptimization_level
zerodb_quantum_feature_map
Transform vector into feature space for enhanced similarity computation. Applies configurable feature mapping for dimensionality transformation.
输入参数repsnum_qubitsfeature_map_typevector_embedding必填
Calculate kernel similarity between two vectors. Supports fidelity (normalized dot product squared) and swap_test kernel types for measuring vector similarity.
输入参数shotsvector_a必填vector_b必填kernel_type
Create a new NoSQL table with schema. Use when you need to set up a new data structure for storing structured records. Define fields and indexes for the table schema.
输入参数schema必填table_name必填description
List all NoSQL tables in the project with their schemas. Use when the agent needs to discover available data structures or answer "what tables exist?". Returns table names, row counts, and field definitions.
输入参数limitoffset
Get table details and schema. Use when you need to inspect a specific table's structure, field types, indexes, and optionally row count statistics.
输入参数table_id必填include_stats
Delete a table and all its data. Use when a table is no longer needed and should be permanently removed. Requires confirm flag. WARNING: This operation is irreversible.
输入参数confirm必填table_id必填
Insert rows into a table. Use when adding new records to a NoSQL table. Accepts an array of row objects and optionally returns inserted IDs.
输入参数rows必填table_id必填return_ids
Query rows from a table with filters. Use when reading data from a NoSQL table. Supports MongoDB-style filters, sorting, pagination, and field projection.
输入参数sortlimitfilteroffsettable_id必填projection
Update rows in a table. Use when modifying existing records in a NoSQL table. Supports MongoDB-style update operators ($set, $inc, etc.) and optional upsert behavior.
输入参数filter必填update必填upserttable_id必填
Delete rows from a table matching a filter. Use when removing specific records from a NoSQL table. Supports MongoDB-style filters. WARNING: This operation is irreversible.
输入参数limitfilter必填table_id必填
Upload file to ZeroDB storage. Use when you need to store a file (base64-encoded) in the project's S3-compatible object storage. Supports metadata and virtual folder organization.
输入参数foldermetadatafile_name必填content_typefile_content必填
Download file from ZeroDB storage. Use when you need to retrieve a previously uploaded file by its ID. Returns base64-encoded content by default.
输入参数file_id必填return_base64
List files in project storage. Use when the agent needs to discover available files or answer "what files are stored?". Supports filtering by folder and MIME type with pagination.
输入参数limitfolderoffsetcontent_type
Delete file from storage. Use when a file is no longer needed and should be permanently removed. WARNING: This operation is irreversible.
输入参数file_id必填
Get file metadata without downloading content. Use when you need to check a file's size, type, upload date, or custom metadata without fetching the actual file data.
输入参数file_id必填
zerodb_generate_presigned_url
Generate presigned URL for file access. Use when you need a temporary URL to share file access with external systems. Supports download and upload operations with configurable expiration.
输入参数file_id必填operationexpiration_seconds
Create an event in the event stream. Use when you need to publish an event for tracking, auditing, or triggering downstream workflows. Supports event types, payloads, and correlation IDs.
输入参数sourceevent_data必填event_type必填correlation_id
List events with filtering. Use when you need to browse or query the event stream by type, source, or time range. Supports pagination for large result sets.
输入参数limitoffsetsourceend_timeevent_typestart_time
Get event details by ID. Use when you need to inspect a specific event's full payload, timestamps, and metadata.
输入参数event_id必填
Subscribe to event stream (returns subscription ID). Use when you need to set up real-time event notifications. Supports filtering by event type and optional webhook delivery.
输入参数filterevent_types必填webhook_url
Get event stream statistics. Use when you need to understand event volume, frequency, and distribution over time. Supports filtering by event type and time range.
输入参数event_typetime_range
Create a new ZeroDB project. Use when you need to set up a new isolated workspace for storing vectors, tables, files, and events. Projects are the top-level organizational unit.
输入参数settingsdescriptionproject_name必填
Get project details. Use when you need to inspect a project's configuration, settings, and enabled features. Uses the configured project ID by default.
输入参数project_id
List all accessible projects. Use when the agent needs to discover available projects or answer "what projects do I have access to?". Returns project names, IDs, and basic info.
输入参数limitoffset
Update project settings. Use when you need to modify a project's name, description, or configuration settings.
输入参数settingsproject_id必填descriptionproject_name
Delete a project and all its data. Use when a project is no longer needed. Removes all vectors, tables, files, and events within the project. Requires confirm flag. WARNING: This operation is irreversible.
输入参数confirm必填project_id必填
Get project usage statistics. Use when you need to check storage consumption, vector counts, API call volumes, and other usage metrics for a project.
输入参数project_idinclude_details
Enable database features for a project. Use when you need to activate specific capabilities (vectors, compression, nosql, files, events) on a project that does not yet have them enabled.
输入参数features必填project_id必填
Collect user interaction for RLHF training. Use when recording a prompt-response pair with optional feedback score for reinforcement learning. Each call creates a new training data point.
输入参数prompt必填contextagent_idfeedbackresponse必填
zerodb_rlhf_agent_feedback
Collect agent-level feedback. Use when recording user satisfaction signals (thumbs up/down, ratings) for a specific agent. Useful for tracking agent quality over time.
输入参数ratingcommentcontextagent_id必填feedback_type必填
Collect workflow-level feedback. Use when recording the outcome of a multi-step workflow including success status, duration, and steps completed.
输入参数success必填feedbackduration_msworkflow_id必填steps_completed
Collect error report for RLHF improvement. Use when recording errors encountered during agent operation to improve future behavior. Include sanitized stack traces and severity levels.
输入参数contextseverityerror_type必填stack_traceerror_message必填
Get RLHF collection status. Use when you need to check whether RLHF data collection is active and how many interactions have been recorded for a session.
输入参数session_id
Get RLHF data summary and statistics. Use when you need an overview of collected RLHF data including interaction counts, average feedback scores, and trends over time.
输入参数agent_idtime_range
Start RLHF data collection for session. Use when initiating RLHF tracking at the beginning of an agent session. Safe to call multiple times — idempotent for the same session.
输入参数configsession_id必填
Stop RLHF data collection for session. Use when ending RLHF tracking at the end of an agent session. Optionally exports collected data before stopping.
输入参数session_id必填export_data
Get RLHF interactions for a session. Use when reviewing all recorded interactions within a specific RLHF session for analysis or export.
输入参数limitsession_id必填
Broadcast RLHF event to subscribers. Use when sending RLHF-related notifications to specific agents or all subscribers. Supports targeted delivery to specific agent IDs.
输入参数event_data必填event_type必填target_agents
zerodb_admin_system_stats
Get system-wide statistics (admin only). Use when you need a global view of platform performance and usage metrics. Requires admin privileges.
输入参数include_usageinclude_performance
zerodb_admin_list_projects
List all projects system-wide (admin only). Use when you need to see all projects across all users for administrative purposes. Supports filtering by user ID. Requires admin privileges.
输入参数limitoffsetfilter_user
Get user usage statistics (admin only). Use when you need to inspect a specific user's resource consumption and API usage. Requires admin privileges.
输入参数user_id必填time_range
Get system health status (admin only). Use when you need to check the health of all system components (database, storage, search). Requires admin privileges.
输入参数include_components
Run database optimization (admin only). Use when the database needs maintenance such as vacuum, reindex, or analyze operations. Supports dry_run to preview changes. Requires admin privileges.
输入参数dry_runproject_idoptimization_type必填
Execute SQL query on provisioned PostgreSQL instance with security validations. Use when you need to run arbitrary SQL (SELECT, INSERT, UPDATE, DELETE) against the dedicated PostgreSQL database. Supports parameterized queries and read-only mode enforcement.
输入参数sql必填paramsmax_rowsread_onlytimeout_seconds
zerodb_postgres_schema_info
Get database schema information (tables, columns, indexes). Use when you need to discover or inspect the PostgreSQL schema structure. Returns table definitions, column types, indexes, and constraints.
输入参数table_nameinclude_statsinclude_indexesinclude_constraints
zerodb_postgres_create_table
Create new PostgreSQL table with schema definition. Use when you need to define a new relational table with typed columns, constraints, and indexes. Supports if_not_exists for idempotent creation.
输入参数columns必填indexestable_name必填if_not_exists
Trigger PostgreSQL backup job. Use when you need to create a point-in-time backup of the database. Supports full and incremental backups with configurable retention and compression.
输入参数backup_typecompressioninclude_datainclude_schemaretention_days
Restore PostgreSQL database from backup. Use when you need to recover data from a previous backup. Supports full, schema-only, and data-only restore types. WARNING: This operation is irreversible — it overwrites existing data when confirm_overwrite is true.
输入参数backup_id必填restore_typetarget_databaseconfirm_overwrite必填
Get PostgreSQL database statistics (size, connections, query performance). Use when you need to monitor database health, connection pool usage, storage consumption, and query performance metrics.
输入参数time_rangeinclude_queriesinclude_storageinclude_connectionsinclude_replication
Execute a read-only (SELECT/WITH only) SQL query against the project lakehouse via DuckDB over Parquet files in object storage. Use when you need to analyze or inspect data that has been ingested into the lakehouse. Destructive SQL (INSERT/UPDATE/DELETE/DROP/etc.) is rejected.
输入参数sql必填max_rowsproject_id必填
zerodb_lakehouse_list_tables
List the lakehouse tables (sensor-type partitions) available for a project, with file counts, total bytes, and last-modified time. Use when you need to discover what data exists in the lakehouse before querying it.
输入参数project_id必填
zerodb_lakehouse_catalog_list
List all partitions in the public lakehouse data catalog, with file counts and sizes. Use when you need a platform-wide overview of available lakehouse data, independent of any single project. No project_id required.
无需输入参数。
zerodb_lakehouse_catalog_search
Search the public lakehouse data catalog by partition name. Use when you need to find which lakehouse partitions match a keyword (e.g. "weather", "ais") before querying them.
输入参数q必填
zerodb_provision_postgres
Provision a dedicated PostgreSQL instance via Railway with dedicated resources. Use when you need to spin up a new managed PostgreSQL database. Choose instance size based on workload requirements and budget.
输入参数tagsproject_id必填instance_size必填postgres_version
zerodb_get_postgres_status
Get status and health metrics for dedicated PostgreSQL instance. Use when you need to check if your PostgreSQL instance is running, its uptime, and health indicators.
输入参数project_id必填
zerodb_get_postgres_connection
Get connection credentials for PostgreSQL instance (database_url, host, port, etc.). Use when you need connection details to configure applications or tools. Supports primary, readonly, and admin credential types.
输入参数project_id必填credential_type
zerodb_get_postgres_usage
Get usage statistics and billing information for PostgreSQL instance. Use when you need to review compute usage, storage consumption, and cost breakdown for your dedicated instance.
输入参数hoursproject_id必填
Get SQL query logs with performance metrics and credit consumption. Use when you need to audit queries, debug slow operations, or review credit usage. Supports filtering by query type.
输入参数limitproject_id必填query_type
Restart the dedicated PostgreSQL instance (completes in 30-60 seconds). Use when the instance needs a restart due to configuration changes or performance issues. Does not lose data.
输入参数project_id必填
Delete the PostgreSQL instance and all data (requires confirmation). Use when the instance is no longer needed. Requires confirm=true. WARNING: This operation is irreversible.
输入参数confirm必填project_id必填
zerodb_graph_upsert_entity
Create or update a knowledge graph entity. Use when you need to add a person, organization, technology, or concept to the context graph, or refresh an existing one. If the entity already exists (matched by canonical_name + entity_type), aliases are merged and memory_count is incremented rather than duplicating the entity.
输入参数aliasesproject_idpropertiesentity_type必填canonical_name必填
Create or strengthen a directed edge (relationship) between two existing entities in the knowledge graph. Use when you have identified a relationship between two entities you have already created with zerodb_graph_upsert_entity. Both entities must already exist — this does not create them. Unlike zerodb_graph_traverse which reads the graph, this writes to it.
输入参数predicate必填confidencepropertiessource_name必填target_name必填
Multi-hop traversal of the knowledge graph starting from an entity. Use when you need to discover what is connected to an entity, directly or transitively, up to a bounded depth. Returns nodes, edges, and paths discovered within max_hops. Unlike zerodb_graph_rag_search which ranks results by relevance to a text query, this is a pure structural walk from a known starting entity.
输入参数as_ofentity必填max_hopspredicatesmin_confidence
GraphRAG hybrid search — blends vector similarity with knowledge graph proximity. Use when you want search results that are both semantically relevant to a query AND structurally connected in the entity graph, rather than relying on vector similarity alone. graph_weight=0.0 behaves like pure vector search (same as zerodb_semantic_search); graph_weight=1.0 is pure graph proximity ranking; the default 0.3 blends both.
输入参数limitquery必填max_hopsgraph_weight
zerodb_graph_list_entities
List knowledge graph entities for the current user, optionally filtered by entity type, paginated by memory_count descending. Use when you need to browse or audit what entities already exist in the graph rather than looking up one specific entity by name (use zerodb_graph_resolve-style lookup via traverse/neighbors for that).
输入参数limitoffsetentity_type
Get the direct (1-hop) neighbors of a knowledge graph entity, with relationship and entity metadata. Use when you need everything directly connected to one entity without a deeper multi-hop walk. Unlike zerodb_graph_traverse, this is bounded to a single hop and does not support predicate/confidence filtering.
输入参数limitentity_name必填
Get knowledge graph analytics for the current user: node count, edge count, graph density, entity-type and predicate distributions, and top entities by connectivity. Use for a high-level health/size check of the graph before deciding whether to traverse, export, or run centrality analysis.
无需输入参数。
zerodb_graph_merge_entities
Merge duplicate entities into a single canonical entity, moving all edges and aliases from the merge targets onto the canonical entity and deleting the duplicates. Use when you have discovered that two or more entities in the graph actually refer to the same real-world thing (e.g. "Acme" and "Acme Inc"). This is destructive to the merged (non-canonical) entities — it cannot be undone.
输入参数merge必填canonical必填
zerodb_graph_ontology_get
Get the ontology definition (allowed entity types, predicates per type, and constraints) for a project. Use before creating entities/edges in a project that has an ontology, so you know which entity_type and predicate values are expected. Returns a not-found error if the project has no ontology defined yet — use zerodb_graph_ontology_infer to propose one from existing data.
输入参数project_id必填
zerodb_graph_ontology_upsert
Create or update the ontology for a project: the allowed entity types, allowed predicates per entity type, and optional constraints. Use when you are defining or revising the schema that governs what entities/relationships are expected in a project's graph. Version is auto-incremented on update — this does not retroactively reclassify existing entities (use zerodb_graph_ontology_infer + applying its output for that).
输入参数predicatesproject_id必填constraintsentity_types必填
zerodb_graph_ontology_infer
Infer a candidate ontology from the user's existing graph data by analyzing entity-type and predicate frequency patterns. Use when a project has no ontology yet, or you want to propose updates based on what has actually been recorded in the graph so far. When project_id is given, also returns a diff against that project's current ontology (new types/predicates not yet captured). Filters out generic placeholder types (object, thing, unknown).
输入参数project_idmin_entity_countmin_predicate_count
zerodb_graph_ontology_suggestions
Get human-readable, actionable suggestions for improving a project's ontology: entities with generic types that should be reclassified, frequently-used predicates missing from the ontology, and entity types present in the data but not yet declared. Use this when you want a quick, readable punch list rather than the raw inference output from zerodb_graph_ontology_infer.
输入参数project_id
zerodb_graph_contradictions_list
List contradictions in the knowledge graph: edges that were superseded because a newer edge contradicted an existing relationship on the same (source, predicate) pair. Use this to audit where the graph has recorded conflicting facts over time, before deciding how to resolve each one with zerodb_graph_contradictions_resolve.
输入参数limit
zerodb_graph_contradictions_resolve
Resolve a contradiction on a superseded edge, found via zerodb_graph_contradictions_list. action="accept_new" keeps the current state (default/no-op — the old edge stays superseded); action="keep_both" restores the old edge so both are active simultaneously; action="reject_new" deletes the new edge and restores the old one. Use this once you have determined which version of a contradicted fact is correct.
输入参数action必填edge_id必填
Get entities ranked by degree centrality (total/in/out degree, hub score, critical-node flag). Use to find the most structurally important or connected entities in the graph. Requires the graph.compute_centrality background task to have run at least once for this user — returns an empty list otherwise, not an error.
输入参数limitentity_typecritical_only
Export the knowledge graph as JSON (nodes + edges, D3/Cytoscape-compatible shape). Use when you need the whole graph (or a filtered slice of it) to hand to a visualization, external analysis tool, or another agent, rather than exploring it interactively via traverse/neighbors. For the GEXF (Gephi) format, use the underlying HTTP export route directly — this tool only returns the JSON shape.
输入参数limitentity_typemin_confidence
Manually renew authentication token. Use when the current auth token has expired or is about to expire and you need to force a refresh before the next API call.
无需输入参数。