Agent Setup
The FlowGuard Agent is a .NET CLI tool that runs locally on your machine or CI/CD pipeline. It handles codebase scanning, flow execution via Playwright, and result reporting.
Prerequisites
- .NET 8 SDK or later —
dotnet --versionshould return 8.0+ - Chromium — the agent installs Playwright browsers on first run, or you can pre-install with
playwright install chromium - FlowGuard account — sign up at
app.flowguardians.com
Installation
Install the FlowGuard Agent as a global .NET tool:
1"function">dotnet tool install "flag">--global FlowGuard.Agent23"comment"># Verify installation4"function">flowguard "flag">--versionAuthenticate with your FlowGuard account:
1"function">flowguard auth login2"comment"># This opens a browser window for authentication3"comment"># Your token is stored securely in your system keychainRunning Modes
The agent supports three operating modes:
Scan Mode
Analyzes your codebase and generates flow proposals. Code is analyzed locally and only metadata (page names, route patterns, form fields) is sent to the FlowGuard API.
1"function">flowguard "function">scan "flag">--repo ./my-app "flag">--app-id YOUR_APP_ID23"comment"># Options:4"comment"># "flag">--repo Path to your repository root5"comment"># "flag">--app-id Your application ID from the dashboard6"comment"># "flag">--include Glob patterns for files to include (default: auto-detect)7"comment"># "flag">--exclude Glob patterns for files to exclude8"comment"># "flag">--max-files Maximum files to analyze (default: 200)Run Mode
Executes test flows using Playwright. The agent opens a browser, performs each step, captures screenshots, records API calls, and reports results.
1"function">flowguard "function">run "flag">--app-id YOUR_APP_ID "flag">--flow-id FLOW_ID23"comment"># Run all flows:4"function">flowguard "function">run "flag">--app-id YOUR_APP_ID "flag">--all56"comment"># Options:7"comment"># "flag">--app-id Your application ID8"comment"># "flag">--flow-id Specific flow to "function">run (omit for "flag">--all)9"comment"># "flag">--all Run all active flows10"comment"># "flag">--headless Run browser in headless mode (default: true)11"comment"># "flag">--base-url Override the application base URL12"comment"># "flag">--timeout Step timeout in seconds (default: 30)13"comment"># "flag">--parallel Number of parallel browser instances (default: 1)Listen Mode
Connects to the FlowGuard hub via SignalR and waits for execution commands. Ideal for CI/CD pipelines and always-on test runners.
1"function">flowguard "function">listen "flag">--app-id YOUR_APP_ID23"comment"># Options:4"comment"># "flag">--app-id Your application ID5"comment"># "flag">--headless Run browser in headless mode (default: true)6"comment"># "flag">--base-url Override the application base URLCLI Reference
| Command | Description |
|---|---|
flowguard auth login | Authenticate with FlowGuard |
flowguard auth logout | Clear stored credentials |
flowguard scan | Scan codebase and generate proposals |
flowguard run | Execute test flows |
flowguard listen | Listen for remote execution commands |
flowguard status | Show agent status and configuration |
flowguard --version | Print version information |
flowguard --help | Show help for all commands |
Code Privacy
In scan mode, your source code is analyzed locally on your machine. Only extracted metadata (page names, route patterns, form field names, and CSS selectors) is sent to the FlowGuard API. Your full source code never leaves your environment.