Task: Reproducible Local Python Environment for a Mistral Agent
You are to set up a clean, fully reproducible local Python environment to develop a small Mistral-based agent and verify it with a real API call.
Assume a Unix-like shell (macOS/Linux). If you're on Windows, use WSL or the Windows equivalents.
Requirements
-
Install a specific Python version using pyenv (e.g., Python 3.11.x).
-
Create and activate an isolated virtual environment.
-
Manage dependencies with a lockfile to ensure reproducible installs.
-
Configure secrets via environment variables without committing them.
-
Structure the project for quick local execution and testing.
-
Verify the setup by running a short script that prints the model name from a test Mistral API call.
Deliverables
-
Clear setup commands and minimal rationale for each step.
-
A project skeleton (directories and key files).
-
A verification script that calls the Mistral API and prints the model name.
-
Notes on how to run and validate the environment.