Skip to content

Quickstart

This guide gets Valter running on your machine with the minimum viable setup. You’ll start the database infrastructure, run migrations, and make your first API call. For a complete setup with all optional features, see the Installation guide.

You need three things installed:

  • Python 3.12+ — Valter uses modern typing features (X | None, type statements)
  • Docker and Docker Compose — for PostgreSQL, Qdrant, and Redis
  • make — all commands go through the Makefile
Terminal window
git clone <repo-url> && cd Valter
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate
# Install with dev dependencies (prefer uv for speed)
uv pip install -e ".[dev]"
# or: pip install -e ".[dev]"
Terminal window
make docker-up

This starts three containers via Docker Compose:

ServiceImagePortData
PostgreSQL 16postgres:16-alpine5432Documents, features, metadata, jobs
Qdrantqdrant/qdrant:latest6333Semantic vector search
Redis 7redis:7-alpine6379Cache, rate limiting, job queue
Terminal window
cp .env.example .env

The defaults work out of the box for local development. The .env.example file is pre-configured with local connection strings:

Terminal window
# These are the defaults — no changes needed for local dev
VALTER_DATABASE_URL=postgresql+asyncpg://valter:valter_dev@localhost:5432/valter
VALTER_QDRANT_URL=http://localhost:6333
VALTER_REDIS_URL=redis://localhost:6379/0
Terminal window
make migrate

This runs alembic upgrade head, applying all 8 PostgreSQL migrations that create tables for documents, features, metadata, jobs, workflows, API keys, audit logs, and session memory.

Terminal window
make dev

The API starts on http://localhost:8000 with hot reload enabled. You’ll see structured JSON logs from structlog:

{"event": "valter.startup", "version": "0.1.0", ...}
Terminal window
curl -s http://localhost:8000/health | python -m json.tool
{
"status": "healthy",
"version": "0.1.0",
"stores": [
{"name": "qdrant", "status": "up", "latency_ms": 2.1},
{"name": "neo4j", "status": "down", "latency_ms": null},
{"name": "postgres", "status": "up", "latency_ms": 1.3},
{"name": "redis", "status": "up", "latency_ms": 0.4},
{"name": "artifact_storage", "status": "up", "latency_ms": 0.1},
{"name": "worker_ingest", "status": "down", "latency_ms": null}
],
"uptime_seconds": 3.42
}

A "degraded" status is normal at this point — Neo4j and the ingest worker aren’t running yet.

Open http://localhost:8000/docs in your browser. FastAPI generates interactive Swagger documentation for all endpoints.

Terminal window
curl -s -X POST http://localhost:8000/v1/retrieve \
-H "Content-Type: application/json" \
-d '{"query": "responsabilidade civil dano moral"}' \
| python -m json.tool
Terminal window
curl -s -X POST http://localhost:8000/v1/verify \
-H "Content-Type: application/json" \
-d '{"text": "Conforme Súmula 297 do STJ"}' \
| python -m json.tool

To use Valter as a tool in Claude Desktop, add this to your claude_desktop_config.json:

{
"mcpServers": {
"valter": {
"command": "python",
"args": ["-m", "valter.mcp"],
"cwd": "/absolute/path/to/Valter",
"env": {
"VALTER_DATABASE_URL": "postgresql+asyncpg://valter:valter_dev@localhost:5432/valter",
"VALTER_QDRANT_URL": "http://localhost:6333",
"VALTER_REDIS_URL": "redis://localhost:6379/0"
}
}
}
}

Restart Claude Desktop. You should see 28 tools available under “valter” in the MCP tools panel.

After completing this quickstart, you have:

┌─────────────────────────────────────────┐
│ Your machine │
│ │
│ ┌─────────────┐ ┌─────────────────┐ │
│ │ Valter API │ │ Claude Desktop │ │
│ │ :8000 │ │ (MCP stdio) │ │
│ └──────┬──────┘ └────────┬────────┘ │
│ │ │ │
│ ┌──────┴──────────────────┴──────────┐ │
│ │ Shared Data Stores │ │
│ │ PostgreSQL :5432 │ │
│ │ Qdrant :6333 │ │
│ │ Redis :6379 │ │
│ └────────────────────────────────────┘ │
└─────────────────────────────────────────┘
ComponentWhat it addsHow to enable
Neo4j12 graph analytics endpoints (divergences, optimal argument, temporal evolution)Installation guide
ARQ WorkerBackground PDF ingestion and case analysismake worker-ingest
MCP RemoteHTTP/SSE server for ChatGPT integrationmake mcp-remote
Groq LLMFactual extraction, query expansion, document classificationSet VALTER_GROQ_API_KEY and VALTER_GROQ_ENABLED=true
  • Installation — Full setup with Neo4j, Groq, R2, and production configuration
  • API Reference — All endpoints with request/response schemas
  • MCP Tools — Complete reference for the 28 MCP tools
  • Architecture — How the layers and data stores fit together