Deployment Strategy & Environment Config
Relevant source files
The following files were used as context for generating this wiki page:
Deployment and environment configuration for the Abee (SynthCrowd) platform involve a multi-layered approach that integrates cloud-based LLMs, real-time backend services, and sandboxed browser environments. The system is designed to facilitate both local development of target websites and large-scale synthetic user testing via distributed agents.
The project relies on a distributed architecture where the core engine orchestrates interactions between Anthropic's Claude for reasoning, Browser Use for navigation, and Convex for real-time data persistence. Environmental configuration is centralized through .env files and specific SDK initializations to manage API keys and service endpoints.
Sources: README.md:195-212, plan.md:143-160, test-smoke.ts:16-60
Environment Configuration
The platform requires several environment variables to interface with third-party providers. These are primarily managed through a .env file at the root of the repository.
Required API Keys & Endpoints
| Variable | Purpose | Source |
|---|---|---|
ANTHROPIC_API_KEY | Powers the Interpreter, Report Generator, and Code Analysis via Claude. | README.md:288 |
BROWSER_USE_API_KEY | Enables autonomous browser agent navigation via the Browser Use SDK. | README.md:289 |
CONVEX_URL | Endpoint for the real-time serverless database and event sink. | test-smoke.ts:46 |
LMNR_PROJECT_API_KEY | API key for Laminar, used for tracing system decisions and executions. | test-smoke.ts:19 |
MONGODB_URI | Connection string for persistent storage of personas and run snapshots. | test-smoke.ts:60 |
DAYTONA_API_KEY | Used for provisioning isolated sandboxes per agent. | test-smoke.ts:133 |
Sources: README.md:280-290, test-smoke.ts:16-65, plan.md:143-160
Service Initialization Flow
The system initializes services based on the presence of environment variables. The following diagram illustrates the initialization sequence during a typical run:
The initialization logic ensures graceful degradation; for instance, if LMNR_PROJECT_API_KEY is missing, tracing is skipped while the rest of the smoke test continues.
Sources: test-smoke.ts:18-35, src/engine/optimizationLoop.ts:77-85
Deployment Strategy
The deployment strategy distinguishes between the Abee platform (the testing engine) and the target websites being optimized.
Platform Deployment
- Frontend/Dashboard: Deployed via Vercel for real-time monitoring and reporting.
- Backend/Logic: Utilizes a serverless approach with Convex for data handling and event streaming.
- Agent Runtimes: Agents are deployed into isolated sandboxes provided by Daytona to ensure no shared cookies, sessions, or state between personas.
Sources: plan.md:105-110, plan.md:155, README.md:214-230
Target Website Hosting
Target websites can be deployed and managed through different workflows, particularly when using integrated tools like Lovable:
- Lovable Deployment: Users can publish directly via the "Share -> Publish" feature in the Lovable interface.
- Custom Domains: Supported through Lovable project settings.
- Local/Dev Hosting: For the optimization loop to apply code changes, the target site is often hosted locally or in a git-tracked directory. The
optimizationLoop.tsreads from asitePathto modify files.
Sources: demo-website/README.md:58-66, src/engine/optimizationLoop.ts:31-38, plan.md:118-121
Optimization Loop & Code Modification
A core feature of the deployment strategy is the "Fix" phase, where the platform modifies the target site's code based on test results.
Rollback & Verification Workflow
To prevent deploying broken code, the codeModifier employs a strict Git-based safety protocol:
- Pre-change Commit: A Git commit is made before any modification to establish a rollback point.
- Modification: The
CodeModifierapplies string replacements to local source files. - Smoke Test: The system attempts to fetch the
siteUrlto verify the site still loads (e.g., checks for<html>orroottags). - Revert/Commit: If the site fails to load,
git checkout -- .is executed to revert changes. If successful, a final commit is made.
Site Code Analysis Config
The system filters which files are eligible for analysis and modification. This prevents the agent from attempting to edit build artifacts or dependencies.
const SOURCE_EXTENSIONS = new Set([".tsx", ".ts", ".jsx", ".js", ".css", ".html"]);
const SKIP_DIRS = new Set(["node_modules", ".git", "dist", "build", ".next", "ui"]);
Sources: src/engine/optimizationLoop.ts:54-58, src/test-demo-site.ts:18-19
Build and Local Execution
The project utilizes npm and tsx for managing dependencies and executing the pipeline locally.
| Command | Action |
|---|---|
npm install | Installs dependencies including Anthropic SDK, Browser Use, and Convex. |
npm run dev | Starts the Convex development server for real-time database operations. |
npm run build | Compiles TypeScript source files into the dist/ directory. |
npx tsx src/test-full-pipeline.ts | Executes a complete E2E test run with reports and tracing. |
Sources: package.json:6-15, README.md:273-277
Deployment of the Abee platform is centered on a robust environment configuration that bridges local development with cloud-scale AI agents. By utilizing Daytona for sandboxing and Git for atomic code modifications, the system maintains high reliability during automated optimization cycles.