mirror of
https://github.com/furyhawk/agent_delta.git
synced 2026-07-20 09:45:36 +00:00
2.4 KiB
2.4 KiB
Manual setup steps for agent_delta
The generator created the code. These are the one-time external setup steps that can't be automated — accounts to create, keys to copy, services to provision.
Skip ahead to "After every deploy" at the bottom for things you'll re-do regularly. Items above are one-time per environment.
Secrets
cp backend/.env.example backend/.env
Then in backend/.env:
SECRET_KEY— replace with a fresh value:openssl rand -hex 32API_KEY— replace with a fresh value:openssl rand -hex 32
These are used to sign JWTs and authenticate service-to-service calls. Rotate at every environment promotion (dev → staging → prod each get their own).
PostgreSQL
- Provision a PostgreSQL ≥ 14 instance (local:
docker compose up -d db; managed: Neon / Supabase / RDS / Cloud SQL). - Set
DATABASE_URLin.envto the async connection string:postgresql+asyncpg://user:pass@host:5432/dbname. - Run migrations:
cd backend && uv run alembic upgrade head.
OpenAI
- Create API key at https://platform.openai.com/api-keys.
- Set
OPENAI_API_KEYin.env. - (Optional) Set spending limit on OpenAI dashboard to avoid surprise bills.
RAG (qdrant)
-
Local:
docker compose up -d qdrant. -
Cloud: provision Qdrant Cloud, set
QDRANT_URL+QDRANT_API_KEY. -
(Optional) Ingest seed documents:
uv run agent_delta rag-ingest /path/to/file.pdf --collection docs.
Redis
- Local:
docker compose up -d redis(already in compose file). - Managed: Upstash / Redis Cloud / ElastiCache. Set
REDIS_URLin.env.
Logfire (Pydantic observability)
- Create account at https://logfire.pydantic.dev.
- Run
uv run logfire authonce locally to bootstrap. - Get write token → set
LOGFIRE_TOKENin.envfor non-local environments.
After every deploy
- Run database migrations:
alembic upgrade head(CI step or post-deploy job). - Smoke test
/api/v1/healthreturns{"status": "ok"}. - Frontend loads, login → dashboard flow works.
- Logs flowing to your aggregator.
Where to find more
ENV_VARS.md— exhaustive env var referencedocs/deploy.md— platform-specific deployment recipesSECURITY.md— security model + production hardening checklistCONTRIBUTING.md— dev environment setupdocs/architecture.md— codebase layered architecture rules