▶️ EXPERIMENT
Main Content Area
Enter your query to the online ChatGPT in natural language, and a Python snippet will be generated. See also EDIT/PRE-PROMPT if you want to customize the pre-prompt for your application.
The history of queries for reuse purposes.
FAQ
How do I set my OpenAI API key?
AGILAB reads your key from the environment or its managed ~/.agilab/.env file. Choose one of the following:
- Persist for future runs (recommended)
echo 'OPENAI_API_KEY=sk-your-key' >> ~/.agilab/.env - Per-session only
export OPENAI_API_KEY=sk-your-key
Avoid passing API keys on the command line because they leak into shell history and process listings. From inside the Experiment page, if your key is missing or invalid, an inline helper lets you paste and save it securely; this writes to ~/.agilab/.env and reloads the page.