.env file in the root directory to configure the agent.
Quick Setup
API Keys
OpenAI Configuration
OpenAI API key for GPT-4 model access. Used for the main reasoning engine and embeddings.Used in: Get your API key from OpenAI Platform.
src/core/config.py:10Sentinel AI uses
gpt-4o as the default model with temperature set to 0 for deterministic responses.Pinecone Configuration
Pinecone API key for vector database access. Required for the knowledge base and RAG functionality.Used in: The default index name is
src/core/config.py:14sentinel-ai-index with 1536 dimensions for OpenAI embeddings.Sentinel AI automatically creates the Pinecone index on first run if it doesn’t exist, using AWS us-east-1 region with cosine similarity metric.
LlamaCloud Configuration
LlamaCloud API key for PDF parsing with LlamaParse. Required for ingesting technical documentation.Used in: Used by the knowledge base to parse PDF manuals into markdown format.
src/core/config.py:18Cohere Configuration
Cohere API key for semantic reranking. Improves retrieval accuracy by reranking top-k results.Used in: The reranker is configured to return top 5 results after reranking.
src/core/config.py:23SSH Configuration
Sentinel AI connects to remote servers via SSH to execute commands and monitor services.Target SSH server hostname or IP address.Used in:
src/core/config.py:25SSH server port number.Used in:
src/core/config.py:26SSH username for authentication.Used in:
src/core/config.py:27SSH password for authentication. Optional if using key-based authentication.Used in:
src/core/config.py:28System Configuration
These variables control Sentinel AI’s monitoring and execution behavior.Interval in seconds between service health checks.Defined in: Lower values provide faster detection but increase system load.
src/core/config.py:35Maximum number of retry attempts for failed operations.Defined in:
src/core/config.py:36Directory Configuration
Sentinel AI uses these directories for data storage. They are created automatically if they don’t exist.| Directory | Purpose | Path |
|---|---|---|
DATA_DIR | Root data directory | data/ |
MANUALS_DIR | Technical documentation PDFs | data/manuals/ |
MEMORY_DIR | Agent memory storage | data/memory/ |
SERVICES_FILE | Service configuration | data/services.json |
Example Configuration
Model Configuration
These are hardcoded inconfig.py but can be customized if needed:
Advanced Model Settings
Advanced Model Settings
- MODEL_NAME: OpenAI model for reasoning (default:
gpt-4o) - TEMPERATURE: Sampling temperature for deterministic responses (default:
0) - EMBED_MODEL: OpenAI embedding model (default:
text-embedding-3-small) - EMBEDDING_DIM: Embedding dimensions for Pinecone (default:
1536) - PINECONE_INDEX: Pinecone index name (default:
sentinel-ai-index)
src/core/config.py directly.Validation
After configuring your environment variables, validate the setup:Security Best Practices
Use Environment-Specific Files
Create separate
.env.dev, .env.staging, and .env.prod files for different environments.Rotate Keys Regularly
Rotate API keys and SSH credentials periodically, especially after team member changes.
Restrict SSH Access
Use SSH keys instead of passwords, and limit SSH user permissions to only what’s needed.
Monitor API Usage
Set up usage alerts for your API keys to detect unauthorized access or unexpected usage.
Next Steps
SSH Setup
Configure SSH authentication and permissions
Services Configuration
Define services to monitor and manage
AI Models
Customize AI model settings and behavior