Skip to main content

Prerequisites

SQLite is used only for the automated test suite (the vector(N) columns swap to JSON text via the test migrations). Production and development run on PostgreSQL + pgvector.

1. Install dependencies

2. Provision PostgreSQL + pgvector

pgvector must exist in the target database before migrating:
Then point .env at it:

3. Choose AI providers

Chat and embeddings are configured separately — Anthropic, for example, has no embeddings endpoint, so you pair it with an embeddings-capable provider.
When AI_PROVIDER=anthropic and AI_EMBEDDINGS_PROVIDER is empty, AskMyDocs auto-selects the first embeddings-capable provider with a configured key in a dimension-safety-first order (openai → openrouter → regolo → gemini), so a deployment never silently corrupts ingest writes with a mismatched dimension. See AI providers for the full matrix.

4. Migrate

  1. Embedding dimensions

The embedding dimension is part of the schema contract. The stock vector(N) columns are sized for 1536 dimensions (openai/text-embedding-3-small, the default, which also matches OpenRouter’s default embeddings model). Choosing a different-dimension model — e.g. qwen/qwen3-embedding-4b at 2560 dims — requires all three of:
  1. migrating the vector(N) columns to the new dimension,
  2. flushing embedding_cache,
  3. re-indexing the corpus (re-ingest).
Mixing dimensions silently corrupts retrieval. Pick the embeddings model before your first ingest.

6. Run it

Open /app for the SPA (chat + admin), or hit the JSON API directly. Create your first admin user with the role seeder / auth:grant command (see Admin panel).

Scheduler

Several rotations run on the Laravel scheduler (bootstrap/app.php). Enable the system cron entry so they fire:
All commands accept --days=N and --project= overrides; 0 disables the corresponding rotation.

Next steps

Quickstart

Ingest and ask your first question.

Configuration reference

Every env knob, grouped by subsystem.