# Arkivector > Vector search for the Arkiv chain: pgvector's distance functions over entities stored on Arkiv. A C11 daemon (arkivectord) with a REST API and an MCP server, plus Python and Node.js SDKs. Current release: v1.2.0. Source: https://github.com/DikshitRJ/arkivector ## Start here - [The whole website as Markdown](https://arkivector.dikshitrj.in/agents.md): what Arkivector is, how it works, artifacts, roadmap - [All documentation on one page](https://arkivector.dikshitrj.in/docs.md): install, REST API, SDKs, MCP, operations - [Install and get started](https://arkivector.dikshitrj.in/docs/install.md): daemon, wallet, access key, SDKs ## Docs - [Arkivector documentation](https://arkivector.dikshitrj.in/docs/index.md): Arkivector is pgvector for Arkiv. A small daemon, arkivectord, syncs entities from the Arkiv chain, indexes their vectors with pgvector's own code (exact… - [Install and get started](https://arkivector.dikshitrj.in/docs/install.md): Everything you need to go from nothing to a working vector search on Arkiv: the daemon, an Arkiv wallet and access key, and an SDK. It takes about ten… - [Quick start](https://arkivector.dikshitrj.in/docs/getting-started/quickstart.md): Your first collection, writes and searches. This page assumes the daemon is running with a wallet key and you know the wallet's address: if not, do… - [Concepts](https://arkivector.dikshitrj.in/docs/getting-started/concepts.md): A collection is the Arkivector equivalent of a pgvector table plus its index: It has a column (vector type and dimension), an index (hnsw or none, plus an… - [Configuration](https://arkivector.dikshitrj.in/docs/getting-started/configuration.md): The daemon reads an optional TOML file (arkivectord --config ). Every key can be overridden with an environment variable named ARKIVECTOR__, and the… - [Signing writes](https://arkivector.dikshitrj.in/docs/getting-started/signing.md): Every write is an Arkiv transaction, and someone has to sign it. Arkivector gives you two places to do that, and you can mix them per request: - [REST API](https://arkivector.dikshitrj.in/docs/api.md): Everything Arkivector does is a JSON-over-HTTP call to the daemon, so any language (or a shell) can use it without an SDK. These pages document every… - [Health and version](https://arkivector.dikshitrj.in/docs/api/health.md): Operational endpoints. /healthz, /readyz, /v1/version and /metrics never need an API key. - [Collections](https://arkivector.dikshitrj.in/docs/api/collections.md): A collection binds a pgvector-style column and index to an Arkiv schema tag and a set of writers. The daemon syncs every matching entity from the chain… - [Upsert entities](https://arkivector.dikshitrj.in/docs/api/entities-upsert.md): POST /v1/collections/{name}/entities writes entities to the Arkiv chain through the daemon's wallet. Needs a signer (writes_enabled: true, otherwise 403… - [Get an entity](https://arkivector.dikshitrj.in/docs/api/entities-get.md): GET /v1/collections/{name}/entities/{ref} reads one live entity by its id or Arkiv key. Only entities that are live at as_of_block are returned. Expired… - [Delete and extend](https://arkivector.dikshitrj.in/docs/api/entities-delete-extend.md): Remove entities from the chain, or extend their lifetime. Both send Arkiv transactions, so they need a signer and the write scope. Only entities owned by… - [Prepare (sign with your own wallet)](https://arkivector.dikshitrj.in/docs/api/entities-prepare.md): POST /v1/collections/{name}/entities:prepare builds the Arkiv transactions for an upsert without sending them, so a browser wallet, a hardware wallet, a… - [Submit (signed by your wallet)](https://arkivector.dikshitrj.in/docs/api/entities-submit.md): POST /v1/collections/{name}/entities:submit is the second half of signing with your own wallet: it takes back the transactions prepare built, after you… - [Search](https://arkivector.dikshitrj.in/docs/api/search.md): POST /v1/collections/{name}/search returns the k live entities nearest to a query vector, optionally restricted by a filter. - [Batch search](https://arkivector.dikshitrj.in/docs/api/search-batch.md): POST /v1/collections/{name}/search:batch runs up to 64 searches against the same snapshot (one as_of_block). - [Scroll](https://arkivector.dikshitrj.in/docs/api/scroll.md): POST /v1/collections/{name}/scroll pages through live entities that match an optional filter, in ascending key order. Use it to export a collection or… - [Count](https://arkivector.dikshitrj.in/docs/api/count.md): POST /v1/collections/{name}/count returns the exact number of live entities, optionally only those matching a filter. - [Filters](https://arkivector.dikshitrj.in/docs/api/filters.md): Search, scroll, count and the filter-based delete and extend endpoints accept at most one of: - [Vectors](https://arkivector.dikshitrj.in/docs/api/vectors.md): halfvec is recommended for embeddings: half the bytes and gas of vector, with almost no loss in recall. Values are rounded from float32 with… - [Consistency](https://arkivector.dikshitrj.in/docs/api/consistency.md): The daemon applies the chain block by block and publishes each block atomically. Every data response reflects exactly one block, as_of_block (also in the… - [Errors](https://arkivector.dikshitrj.in/docs/api/errors.md): Every error is an RFC 9457 problem document (application/problem+json). Branch on code, never on detail. - [Qdrant compatibility](https://arkivector.dikshitrj.in/docs/api/qdrant.md): The daemon serves a subset of the Qdrant REST API under /qdrant, so tools that already speak Qdrant (LangChain and LlamaIndex Qdrant stores, Dify… - [Python SDK](https://arkivector.dikshitrj.in/docs/python.md): arkivector is a typed client for the Arkivector daemon: stdlib only (no runtime dependencies), Python 3.9+, thread-safe, with adapters for LangChain and… - [Client](https://arkivector.dikshitrj.in/docs/python/client.md): The client is thread-safe and reuses HTTP connections. Close it when done, or use it as a context manager: - [Collections](https://arkivector.dikshitrj.in/docs/python/collections.md): Opclasses by column type are listed in the Collections API. - [Writing](https://arkivector.dikshitrj.in/docs/python/writing.md): upsert, extend and delete go on chain through the daemon's wallet, so the daemon needs a signer (client.version().writes_enabled). To have each user sign… - [Searching](https://arkivector.dikshitrj.in/docs/python/searching.md): The query vector can be a list of floats, a pgvector literal ("[1,0,0,0]"), or a typed vector (Vector, HalfVector, SparseVector, Bit). - [Reading](https://arkivector.dikshitrj.in/docs/python/reading.md): Point reads, counts and scans that don't need a query vector. ref is an id or a key. A missing, expired or deleted entity raises NotFoundError… - [Filters](https://arkivector.dikshitrj.in/docs/python/filters.md): F builds the JSON filter tree (Filters API). Combine with & (and), | (or) and ~ (not): - [Types](https://arkivector.dikshitrj.in/docs/python/types.md): The pgvector types, usable as query vectors, in EntityInput.vector, and returned as hit.vector / entity.vector when you include vectors. - [Errors](https://arkivector.dikshitrj.in/docs/python/errors.md): Every API error is an ApiError subclass carrying the daemon's problem document: - [LangChain and LlamaIndex](https://arkivector.dikshitrj.in/docs/python/integrations.md): The SDK ships vector store adapters. Install the framework yourself; arkivector does not depend on it. - [Node.js / TypeScript SDK](https://arkivector.dikshitrj.in/docs/node.md): @dikshitrj/arkivector is a typed client for the Arkivector daemon: ESM, zero runtime dependencies, Node 18+ (and any runtime with fetch), with a… - [Client](https://arkivector.dikshitrj.in/docs/node/client.md): Arkivector is the Node.js client: one instance per daemon, with retries, timeouts, idempotent writes and optional read-your-writes consistency. - [Collections](https://arkivector.dikshitrj.in/docs/node/collections.md): Create, list, follow and delete collections from Node.js. A collection is a vector column, an index and the wallets whose entities it indexes. - [Writing](https://arkivector.dikshitrj.in/docs/node/writing.md): upsert, extend and delete go on chain through the daemon's wallet; the daemon needs a signer ((await client.version()).writesEnabled). To have each user… - [Searching](https://arkivector.dikshitrj.in/docs/node/searching.md): distance is pgvector's distance for the operator; score is 1 − distance for cosine and −distance otherwise (Search API). - [Reading](https://arkivector.dikshitrj.in/docs/node/reading.md): Options: include, verify, minBlock, timeoutMs. ref is an id or a key; a missing entity throws NotFoundError. - [Filters](https://arkivector.dikshitrj.in/docs/node/filters.md): F builds the JSON filter tree (Filters API): F.and and F.or also take an array. Plain values are typed from the collection's declared attributes; use T… - [Types](https://arkivector.dikshitrj.in/docs/node/types.md): Plain arrays and Float32Array work everywhere; the SDK casts them to the column type. Attributes come back as TypedValue { type, value }… - [Errors](https://arkivector.dikshitrj.in/docs/node/errors.md): All API errors extend ApiError, which carries the daemon's problem document: - [LangChain.js](https://arkivector.dikshitrj.in/docs/node/integrations.md): The package exports a LangChain.js-compatible vector store from @dikshitrj/arkivector/langchain. It works with any embeddings object that has… - [MCP server](https://arkivector.dikshitrj.in/docs/mcp.md): arkivectord is a Model Context Protocol server. AI agents (Claude Code, Claude Desktop, Cursor, and any MCP client) can list your collections, run vector… - [Connect a client](https://arkivector.dikshitrj.in/docs/mcp/setup.md): The daemon must be running (Installation). The MCP URL is the daemon URL plus /mcp, e.g. http://127.0.0.1:8080/mcp. If the daemon uses API keys, give the… - [Tools](https://arkivector.dikshitrj.in/docs/mcp/tools.md): Every tool result has content (one text block), isError, and on success structuredContent holding the response of the matching REST endpoint. Errors carry… - [Architecture](https://arkivector.dikshitrj.in/docs/architecture.md): Arkivector is a co-processor next to the Arkiv chain. The chain stays the source of truth; the daemon keeps a local index it can always rebuild from… - [Chain sync](https://arkivector.dikshitrj.in/docs/architecture/sync.md): The sync engine keeps, for every collection, an exact copy of the entities that belong to it at the last applied block. One sync thread serves all… - [Storage](https://arkivector.dikshitrj.in/docs/architecture/storage.md): Everything the daemon stores locally can be rebuilt from the chain (--resync). It lives in storage.data_dir. - [Search and HNSW](https://arkivector.dikshitrj.in/docs/architecture/search.md): Exact selectivity is free here because filters are bitmaps; pgvector itself has to estimate it. Small candidate sets are always faster to scan exactly… - [Write path](https://arkivector.dikshitrj.in/docs/architecture/write-path.md): The daemon never indexes a write optimistically. An entity appears in search only after it has been read back from the chain, so the index cannot drift… - [pgvector inside the daemon](https://arkivector.dikshitrj.in/docs/architecture/pgvector.md): The goal was to run pgvector's actual math, not a reimplementation, so results match pgvector by construction. pgvector is a PostgreSQL extension written… - [VectorBytes](https://arkivector.dikshitrj.in/docs/architecture/vectorbytes.md): The format of the vector stored on chain in the av.vec attribute, also accepted and returned by the API as base64 vector_bytes. The idea: make the… - [Deployment](https://arkivector.dikshitrj.in/docs/operations/deployment.md): The image runs as a non-root user and keeps state in /data. :latest follows the latest release; to pin, use :1 (latest 1.x) or an exact : from the… - [Security](https://arkivector.dikshitrj.in/docs/operations/security.md): By default the daemon listens on 127.0.0.1:8080 with no authentication: anyone who can reach the port can read every collection and, with a managed… - [Monitoring](https://arkivector.dikshitrj.in/docs/operations/monitoring.md): Useful alerts: readiness false for more than a few minutes, lag_blocks growing in /v1/sync, a rising rate of 5xx responses, p99 search latency. - [Troubleshooting](https://arkivector.dikshitrj.in/docs/operations/troubleshooting.md): The collection only indexes entities created by its writers. Check that the daemon wallet's address is in the list: - [Contributing](https://arkivector.dikshitrj.in/docs/development.md): Process documents: AGENTS.md (workflow, ownership, coding standards), CODEBASE.md (file map), ARCHITECTURE.md (design). - [Testing](https://arkivector.dikshitrj.in/docs/development/testing.md): golden_check verifies the VectorBytes codec against the 29 golden vectors offline, and with ARKIVECTOR_URL set, the demo-dataset queries against a live… - [Releasing](https://arkivector.dikshitrj.in/docs/development/releasing.md): Releases are cut from main by pushing a version tag: The release workflow then builds and publishes: ## Optional - [Everything in one file](https://arkivector.dikshitrj.in/llms-full.txt) - [Source code](https://github.com/DikshitRJ/arkivector)