AgroIA uses pydantic-settings to load configuration from aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/sdarionicolas-boop/AgroIA-RAG/llms.txt
Use this file to discover all available pages before exploring further.
config/.env file at startup. The Settings class in src/utils/config.py defines every supported variable with its type and default value. All variable names are case-insensitive, so DB_HOST and db_host are treated identically. Variables not defined in the class are silently ignored.
Initial setup
Fill in your credentials
Open
config/.env in your editor and set at minimum DB_PASSWORD, GEE_PROJECT_ID, and INGESTA_SECRET_KEY.Database variables
Hostname or IP address of the PostgreSQL server. When running inside Docker Compose, this value is automatically overridden to
host.docker.internal by the service environment block.TCP port on which PostgreSQL is listening.
Name of the PostgreSQL database that holds the
informes_lotes and lote_historial tables.PostgreSQL role used to connect. Must have
CREATE TABLE, INSERT, UPDATE, and SELECT privileges on the target database.Password for
DB_USER. There is no default — the application will fail to connect if this is left empty.Docker Compose overrides
DB_HOST to host.docker.internal for the api and streamlit services, so the containers can reach a PostgreSQL instance running on the host machine. You do not need to change this variable manually when using Compose.Google Earth Engine
Google Cloud project ID registered for Earth Engine access. Used by
src/pipeline/gee_extractor.py to call ee.Initialize(project=...). Without this value the pipeline cannot retrieve Sentinel-2 imagery.API authentication
Bearer token required to call the
/ingesta and /ingesta/geojson endpoints. Set this to a long, random string and share it only with trusted clients.Ollama variables
Base URL of the Ollama HTTP server. When running inside Docker Compose, this is automatically overridden to
http://host.docker.internal:11434 so containers can reach Ollama on the host.Ollama model name used to generate 768-dimensional embeddings. Must match the dimensionality of the
embedding column in informes_lotes (vector(768)). See AI model setup for details.Ollama model name used for RAG generation (the agronomic expert LLM). See AI model setup for details.
Optional integrations
Telegram bot token
Telegram bot token
Bot token from @BotFather on Telegram. Maps to the
telegram_token field in src/utils/config.py. Required only when running python start.py --bot. If left empty the rest of the system starts normally. See Telegram bot guide for setup instructions.Docker Compose overrides
When you start AgroIA withdocker-compose up, the api and streamlit services override two variables regardless of what is set in config/.env:
| Variable | Overridden value | Reason |
|---|---|---|
DB_HOST | host.docker.internal | Reach host-machine PostgreSQL from inside the container |
OLLAMA_URL | http://host.docker.internal:11434 | Reach host-machine Ollama from inside the container |
config/.env via the env_file directive.