Creating Projects
Learn how to create and manage FluxLoop projects in VSCode.
Prerequisites
-
FluxLoop CLI and SDK installed
pip install fluxloop-cli fluxloop -
FluxLoop VSCode Extension installed
- Open VSCode Extensions (Cmd+Shift+X)
- Search for "FluxLoop"
- Click Install
Creating Your First Project
Method 1: Default Flow (Recommended)
Best for most users—FluxLoop reuses your open workspace as the agent source, auto-detects its environment, and places the FluxLoop configs in a shared root (~/FluxLoopProjects by default).
- Launch the wizard
- Projects view → Create New Project…
- or Command Palette →
FluxLoop: Create FluxLoop Project
- Choose flow → Default (Recommended)
- Name your project (preview shows target location, e.g.
~/FluxLoopProjects/support-agent) - Select environment
- Wizard lists interpreters discovered via VS Code Python extension,
.venv, Poetry, Conda, pyenv, uv, etc. - Options include:
- ⭐ Detected workspace venv (preferred)
- 📂 Choose another environment… to browse anywhere
- ⚠️ Use system Python (fallback only)
- If required packages (
fluxloop-cli,fluxloop,fluxloop-mcp) are missing, a dialog offers:- Install automatically (runs pip inside chosen env)
- Install manually (opens terminal with instructions)
- Select different environment
- Wizard lists interpreters discovered via VS Code Python extension,
- Include sample agent? (toggle)
- Finish
- Wizard runs
fluxloop init projectinside the shared root - Sets
fluxloop.projectRootin workspace settings (change anytime under Settings → FluxLoop → Project Root) - Registers the project and makes it active in VSCode
- Wizard runs
Method 2: Custom Flow (Advanced)
Use when you need full control—e.g., mono-repos, remote folders, or keeping configs beside your source tree.
- Run
FluxLoop: Create FluxLoop Project - Choose Custom (Advanced)
- Pick a destination folder for the FluxLoop project (can be inside the repo)
- Enter project name (created inside the folder you picked)
- Select environment:
- Create/select a
.venvwithin your repo, or browse to any interpreter/Conda env - Same package installation dialog appears if dependencies are missing
- Create/select a
- Include sample agent (optional)
- Finish—FluxLoop writes configs exactly where you pointed and saves per-folder settings:
fluxloop.targetSourceRootfluxloop.executionModefluxloop.pythonPath/fluxloop.mcpCommandPathif custom executables were chosen
Project Structure
After creation, your FluxLoop project (default flow) lives under the shared root:
~/FluxLoopProjects/my-chatbot/ # Default flow result (configurable)
├── configs/
│ ├── project.yaml # Project metadata
│ ├── input.yaml # Input generation
│ ├── simulation.yaml # Experiment config
│ └── evaluation.yaml # Evaluators
├── .env # Environment variables
├── examples/
│ └── simple_agent.py # Sample agent
├── experiments/ # Results (created on run)
├── inputs/ # Generated inputs
└── recordings/ # Recorded args (optional)
Custom flow places the project wherever you choose, but the directory structure is identical.
FluxLoop also updates .vscode/settings.json with:
{
"fluxloop.executionMode": "auto",
"fluxloop.targetSourceRoot": "/path/to/your/workspace",
"fluxloop.projectRoot": "~/FluxLoopProjects"
}
Adjust these in Settings UI or directly in the JSON file.
Configuring Your Project
1. Update Project Metadata
Click on Projects → Your Project → Configure
Edit configs/project.yaml:
project:
name: my-chatbot
version: "1.0.0"
description: "Customer support chatbot"
2. Add Your Agent Code
Replace the example agent:
# examples/chatbot.py
import fluxloop
@fluxloop.agent()
def run(user_message: str) -> str:
"""Your chatbot logic"""
response = generate_response(user_message)
return response
Update configs/simulation.yaml:
runner:
target: "examples.chatbot:run"
3. Define Personas and Inputs
Click Inputs → Base Inputs → Edit
Add to configs/input.yaml:
personas:
- name: frustrated_customer
description: Customer with unresolved issue
- name: new_customer
description: First-time user
base_inputs:
- input: "I've been waiting for 3 days!"
persona: frustrated_customer
- input: "How do I create an account?"
persona: new_customer
Managing Multiple Projects
Add Existing Project
If you already have a FluxLoop project (Default or Custom flow):
- Command Palette →
FluxLoop: Add Existing FluxLoop Project - Select the project directory (the folder containing
configs/) - Project added to Projects view (shared root detection is optional)
Switch Between Projects
Click on any project in the Projects view to make it active.
The status bar shows the active project:
FluxLoop: my-chatbot
Remove Project
Right-click project → Remove Project
This only removes from VSCode, doesn't delete files.
Project Status Indicators
The Projects view shows status for each project:
- ✅ Green check: Configuration valid
- ⚠️ Yellow warning: Configuration issues
- ❌ Red X: Missing required files
Click on the status icon to see details.
Best Practices
1. One Project Per Agent
Create separate projects for different agents:
fluxloop/
├── customer-support/
├── sales-assistant/
└── technical-qa/
2. Version Control
Initialize git in your project:
cd fluxloop/my-chatbot
git init
git add configs/ examples/
git commit -m "Initial project setup"
Add .gitignore:
.env
experiments/
inputs/generated.yaml
recordings/
3. Environment Variables
Store secrets in .env (never commit):
OPENAI_API_KEY=sk-your-key
ANTHROPIC_API_KEY=sk-ant-your-key
4. Start Simple
Begin with:
- 3-5 personas
- 5-10 base inputs
- 10 iterations per input
Expand as you validate the setup.
Troubleshooting
"CLI Not Found"
Install FluxLoop CLI:
pip install fluxloop-cli
Check status in Status view.
"Invalid Configuration"
Click the warning icon to see specific issues:
- Missing required fields
- Invalid YAML syntax
- File path errors
"Project Not Loading"
Ensure your project has:
configs/directory- Required YAML files
- Valid
.envfile
Next Steps
- Managing Inputs - Generate and manage inputs
- Managing Inputs - Generate/groom inputs
- Running Experiments - Execute simulations
- Viewing Results - Analyze experiment output