Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/dominikKos9/AgentForge/llms.txt

Use this file to discover all available pages before exploring further.

AgentForge requires a single environment variable to operate: a Groq API key that authorizes calls to the Groq LLM service. This key is stored in a .env file at the project root and loaded automatically by python-dotenv when the visual agent module initialises. No other credentials or environment setup is needed beyond a working Python installation and the installed dependencies.

The .env file

Create a file named .env in the project root directory — the same directory that contains requirements.txt — and add your Groq API key:
.env
GROQ_API_KEY=gsk_xxxxxxxxxxxxxxxxx
Replace gsk_xxxxxxxxxxxxxxxxx with your actual key. The variable name must be exactly GROQ_API_KEY; the visual agent reads it with os.getenv("GROQ_API_KEY").
Without a valid GROQ_API_KEY, the visual agent will raise an authentication error when it attempts to call the Groq API. The BLIP captioning step will still run, but no Croatian description will be produced and the pipeline will fail.

Getting a Groq API key

1

Create a Groq account

Visit console.groq.com and sign up for a free account.
2

Generate an API key

In the Groq console, navigate to API Keys and click Create API Key. Give it a descriptive name such as agentforge-local.
3

Copy the key

Copy the generated key immediately — Groq only shows it once. Paste it into your .env file as shown above.

How the key is loaded

python-dotenv loads the .env file at module import time inside visual_agent.py:
backend/agents/visual_agent.py
from dotenv import load_dotenv
load_dotenv()
The call to load_dotenv() runs at the top level of the module, so the key is available in os.environ before any agent function executes. The Groq client is then initialised immediately after:
backend/agents/visual_agent.py
groq_client = Groq(api_key=os.getenv("GROQ_API_KEY"))
Because load_dotenv() runs automatically when the module is imported, you do not need to export GROQ_API_KEY as a shell variable before starting the application. Simply having the key in your .env file is sufficient.

Keeping the key out of version control

Add .env to your .gitignore file before your first commit to prevent accidentally pushing your API key to a public repository. A minimal entry is enough:
.gitignore
.env

Build docs developers (and LLMs) love