mirror of
https://github.com/furyhawk/ai_agent.git
synced 2026-07-20 09:45:44 +00:00
- Implemented `conversation-store` for managing conversations and messages. - Created `file-preview-store` to handle file preview state. - Added `sidebar-store` for sidebar visibility management. - Developed `theme-store` for theme persistence and management. - Introduced `kb-selection-store` for managing active knowledge base selections with persistence. chore: define API and chat types - Added types for API responses, authentication, chat messages, conversations, and projects. - Defined interfaces for various entities including users, sessions, and message ratings. build: configure TypeScript and testing setup - Set up `tsconfig.json` for TypeScript configuration. - Created `vitest.config.ts` for testing configuration with Vitest. - Added `vitest.setup.ts` for global test setup including mocks for Next.js router and media queries. - Configured Vercel deployment settings in `vercel.json`.
2.9 KiB
2.9 KiB
Manual setup steps for ai_agent
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.
Google OAuth
- Go to https://console.cloud.google.com/ → APIs & Services → Credentials → Create OAuth client ID.
- Application type: Web application.
- Authorized redirect URIs:
http://localhost:3033/auth/callback. Add prod URL when deploying. - Copy Client ID + Client secret → set
GOOGLE_OAUTH_CLIENT_ID+GOOGLE_OAUTH_CLIENT_SECRETin.env.
RAG (milvus)
-
Local:
docker compose up -d milvus etcd minio(already indocker-compose.yml). -
Cloud: provision via Zilliz Cloud, set
MILVUS_URI+MILVUS_TOKEN. -
(Optional) Ingest seed documents:
uv run ai_agent 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