Installation guide
This guide covers complete installation of Finance Agent, including database setup, data ingestion, and production deployment.System requirements
Minimum requirements
- Python: 3.9 or higher
- PostgreSQL: 12+ with pgvector extension
- RAM: 4GB minimum, 8GB recommended
- Disk: 10GB for application + data
- OS: Linux, macOS, or Windows with WSL2
Optional components
- Redis: For session caching and WebSocket management
- DuckDB: For financial screener (included in requirements)
- AWS S3: For storing full transcript and filing documents
Installation methods
- Local development
- Production deployment
- Docker
Python dependencies
Therequirements.txt includes:
Core web framework
Database and ORM
Authentication and security
AI and LLM
Data processing
Caching and HTTP
Utilities
Data ingestion
To set up your own data:Earnings transcripts
SEC 10-K filings
Database schema
The ingestion process creates these tables:Configuration reference
Environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
OPENAI_API_KEY | Yes | - | OpenAI API key for embeddings and LLM |
CEREBRAS_API_KEY | Recommended | - | Cerebras API key for fast inference |
API_NINJAS_KEY | Yes | - | API Ninjas key for earnings transcripts |
TAVILY_API_KEY | Optional | - | Tavily key for real-time news search |
DATABASE_URL | Yes | - | PostgreSQL connection string |
REDIS_URL | Optional | redis://localhost:6379 | Redis connection string |
ENVIRONMENT | No | development | Environment (development/production) |
PORT | No | 8000 | Server port |
BASE_URL | No | http://localhost:8000 | Base URL for the application |
RAG_LLM_PROVIDER | No | cerebras | LLM provider (cerebras/openai/auto) |
RAG_DEBUG_MODE | No | false | Enable detailed agent logging |
AUTH_DISABLED | No | true | Bypass authentication (dev only) |
CLERK_SECRET_KEY | Production | - | Clerk auth secret key |
CLERK_PUBLISHABLE_KEY | Production | - | Clerk auth publishable key |
LOG_LEVEL | No | INFO | Logging level |
LLM provider configuration
Choose between OpenAI and Cerebras:- Cerebras: qwen-3-235b-a22b-instruct-2507 (fast inference)
- OpenAI: gpt-5-nano-2025-08-07 (fallback)
- Embeddings: all-MiniLM-L6-v2 (384 dimensions)
Database connection pool
Production vs. development settings (fromconfig.py):
Troubleshooting
pgvector extension not found
pgvector extension not found
Memory errors during data ingestion
Memory errors during data ingestion
Process data in smaller batches:
API rate limits
API rate limits
If you hit rate limits during ingestion:
- OpenAI: Upgrade to higher tier or add delays
- API Ninjas: Free tier has limits, consider paid plan
- Cerebras: Contact for higher limits
Slow vector search queries
Slow vector search queries
Create indexes on frequently queried columns:
Frontend build errors
Frontend build errors
Production checklist
Before deploying to production:- Set
ENVIRONMENT=production - Set
AUTH_DISABLED=false - Configure Clerk authentication keys
- Use strong database passwords
- Enable SSL for database connections
- Set up monitoring (Logfire or equivalent)
- Configure CORS origins for your domain
- Set up backup for PostgreSQL database
- Configure rate limiting
- Review and set appropriate log levels
- Set up error alerting
- Test all API endpoints
- Load test with expected traffic
Next steps
Quickstart
Run your first query in 5 minutes
Agent system
Understand the RAG architecture
API reference
Explore endpoints and integration
Data ingestion
Deep dive into the ingestion pipeline
For questions or issues, reach out at [email protected] or open an issue on GitHub.