Self-Hosted Mode
Run TypeGraph on your own infrastructure with pgvector, embeddings, LLM extraction, telemetry, and tenant-scoped clients.
What Changes in Self-Hosted Mode
Self-hosted mode uses the same SDK surface as Cloud mode. The operational difference is that you provide the database, embedding model, search embedding model, LLM, ontology, and deployment lifecycle.
The public setup path is intentionally small: vectorStore + embedding + searchEmbedding + llm. If the adapter supports graph and memory capabilities, TypeGraph auto-wires the internal stores.
Install and Initialize
Use the Self-Hosted Initialization guide for complete setup. Do not call public bridge constructors; they are internal implementation details.
Ingest Documents
Self-hosted document ingestion runs in your process unless you put it behind your own job queue. Use arrays for batching and idempotencyKey for retry safety.
Batch Large Corpora
Keep batches bounded by payload size, provider rate limits, and database write throughput. Each batch can still use graph extraction and idempotency.
Search With the Same API
Search does not change between Cloud and self-hosted. Pick resources, tune weights, and build a prompt when needed.
Monitor Telemetry
SDK telemetry writes to typegraph_telemetry. Business events live in typegraph_events. Keeping these separate makes app events queryable without mixing them with operational logs.