# VectIQs

> VectIQs is a local-first, headless long-term memory engine and cognitive infrastructure for AI applications, autonomous agents, and LLMs.

VectIQs provides multi-tenant associative memory persistence with 100% local data sovereignty. It solves quadratic token inflation ($O(N^2)$) by maintaining 7 specialized memory layers (Decisions, Code, Timeline, Directives, Documentation, Entity Knowledge Graph, and Version Registry) and semantically retrieving only the most relevant historical context within a strict Global Token Budget (e.g., 25k, 35k, or 45k tokens).

## System Overview
- **Zero Third-Party Telemetry**: 100% local-first data sovereignty, fully air-gapped ready.
- **7 Specialized Memory Layers**: Decisions, Code, Timeline, Directives, Documentation, Entity Knowledge Graph, and Version Registry.
- **Universal REST API**: Stateless endpoints for memory insertion (`POST /v1/memory/add`), associative context extraction (`POST /v1/memory/extract`), and OpenAI-compatible chat completions proxy (`POST /v1/chat/completions`).
- **PostgreSQL 16 + pgvector**: Native vector similarity search, HNSW indexing, and isolated relational tenant partitioning.
- **Quadratic Token Cost Reduction**: Eliminates raw conversation history stuffing, cutting cumulative agent token costs by 91% to 99%.

## Primary Documentation
- [Quickstart Guide](https://vectiqs.com/documentation#getting-started-introduction): Rapid local deployment with Docker Compose and initial REST API requests.
- [System Topology & Architecture](https://vectiqs.com/documentation#architecture): Deep dive into API Gateway, Core Orchestrator, PostgreSQL pgvector backbone, and multi-tenant partitioning.
- [Specialized Memory Layers](https://vectiqs.com/documentation#architecture-overview): In-depth breakdown of VectIQs specialized memory layers and routing.
- [REST API Reference](https://vectiqs.com/documentation#api-reference-endpoints): Detailed HTTP API schemas, cURL examples, request payloads, and status codes.
- [Self-Hosted Production Deployment](https://vectiqs.com/documentation#production-deployment-high-scale-architecture): Production deployment on Linux, macOS, and Windows via Docker Compose or native PostgreSQL 16.
- [High-Scale Connection Pooling & Tuning](https://vectiqs.com/documentation#production-deployment-connection-pooling-(pgbouncer)): PgBouncer transaction-mode connection pooling, read replicas, and pgvector HNSW memory tuning.
- [Directives & Scaled Token Budgeting](https://vectiqs.com/documentation#production-deployment-directives-&-token-budgeting-at-scale): Mathematical breakdown of O(N^2) quadratic token inflation, high-concurrency request handling, and fixed token budget strategies.
- [Security Architecture & RBAC](https://vectiqs.com/security): Tenant isolation, SHA-256 API key hashing, AES-256 storage encryption, and air-gapped compliance.
- [Pricing & Licensing](https://vectiqs.com/pricing): Commercial source-available licensing for VectIQs Omni and VectIQs Code, with Free Startup Grant for teams <= $1M gross annual revenue.

## Articles & Architectural Deep Dives
- [Solving Quadratic Token Waste](https://vectiqs.com/blog?post=solving-quadratic-token-waste): Why linear context stuffing causes quadratic bill growth and how associative retrieval solves it.
- [Real-Time File Watcher for Coding Agents](https://vectiqs.com/blog?post=real-time-file-watcher-coding-agents): Continuous AST indexing and differential code graph updates without full codebase re-indexing.
- [Entity Knowledge Graphs in Omni](https://vectiqs.com/blog?post=entity-knowledge-graphs-omni): Combining dense vector similarity with structured multi-hop entity relation graphs.
- [Zero-Telemetry Sovereign AI](https://vectiqs.com/blog?post=zero-telemetry-sovereign-ai): Operating autonomous AI infrastructure in strict air-gapped enterprise environments.
- [Hybrid Search & Reciprocal Rank Fusion](https://vectiqs.com/blog?post=hybrid-search-reciprocal-rank-fusion): Merging dense vector embeddings with sparse BM25 keyword search using RRF scoring.
- [Version Registry & Dependency Drift](https://vectiqs.com/blog?post=version-registry-dependency-drift): Managing schema migrations, embedding dimension shifts, and memory snapshotting.

## Optional & Extended Resources
- [Full LLM Context Manual](https://vectiqs.com/llms-full.txt): Complete consolidated technical documentation and API reference for large-context models.
- [GitHub Organization](https://github.com/aniwalunj): Source-available codebase repositories for VectIQs Omni and VectIQs Code.
- [Engine Changelog](https://vectiqs.com/changelog): Detailed historical release notes, API updates, and performance patches.
- [Contact & Support](https://vectiqs.com/contact): Inquiries regarding enterprise licensing, custom adapters, and architecture support.
