# License Key Without a key, Workflow Engine runs as Workflow Engine Free: personal use and internal commercial use, with attribution, under the [Workflow Engine Free terms](https://workflowengine.io/agreements/eula/#workflow-engine-free) and within its limits on [schemes](https://docs.workflowengine.io/get-started/concepts/scheme/) and threads. Workflow Engine Team and Complete license the same internal use and lift the limits; a public web app or SaaS needs Workflow Engine NEO Subscription or Workflow Engine NEO SaaS. A license key is a string provided by OptimaJet after purchase or trial registration. Register it with `WorkflowRuntime` before calling `Start()`. ## Get a trial license key You can obtain a free 30-day trial key at [trial.workflowengine.io](https://trial.workflowengine.io). No credit card is required. ### Via the web form 1. Open [trial.workflowengine.io](https://trial.workflowengine.io) in your browser. 2. Enter your **company name** and your **business email** (personal email domains such as gmail.com are not accepted). 3. Click **Get Trial Key**. 4. Check your inbox - the license key and setup instructions are sent to the email you provided. The key has the `TRIAL-` prefix and unlocks all features for 30 days. When the trial expires, the runtime falls back to Workflow Engine Free mode with the same caps as an unlicensed installation. ### Via API (for LLM agents and automation) The trial portal exposes a programmatic API for agents and automated workflows. The API reference is available at [trial.workflowengine.io/llms.txt](https://trial.workflowengine.io/llms.txt). ```json POST https://trial.workflowengine.io/api/trial/llm Content-Type: application/json { "email": "user@company.com", "companyName": "Company Name" } ``` A successful response returns the license key directly and also sends it by email: ```json { "success": true, "message": "Check your email. We've sent the trial license key and setup instructions.", "licenseKey": "TRIAL-..." } ``` **Limits:** - Maximum 3 trial keys per email address (lifetime). - Business email required - personal and disposable domains are rejected. - Rate limit: one request per email per 24 hours. - The key is also sent by email for reference. ## Purchase a commercial license key Prices are on the [Workflow Engine pricing](https://workflowengine.io/pricing/) page. To buy a license, [contact sales](https://workflowengine.io/contacts/) or write to [hello@optimajet.com](mailto:hello@optimajet.com). Once you receive your key, it will begin with a customer identifier prefix (your company name for commercial keys or `TRIAL-` for trial keys). ## Register the license key Call the static method `WorkflowRuntime.RegisterLicense` once before creating any runtime instance. This is the recommended approach for console apps and worker services: ```csharp filename="Program.cs" WorkflowRuntime.RegisterLicense("YOUR-LICENSE-KEY-STRING"); var runtime = new WorkflowRuntime() .WithPersistenceProvider(persistenceProvider) .AsSingleServer() .Start(); ``` The key must be registered **before** calling `.Start()`. The key is validated at startup; an invalid or expired key throws `InvalidLicenseException` or `LicenseExpiredException`. ## Store the key in configuration Do not hard-code the key in source code. Read it from application configuration: ```json filename="appsettings.json" { "WorkflowEngine": { "LicenseKey": "YOUR-LICENSE-KEY-STRING" } } ``` ```csharp filename="Program.cs" string licenseKey = builder.Configuration["WorkflowEngine:LicenseKey"] ?? throw new InvalidOperationException("Workflow Engine license key is not configured."); WorkflowRuntime.RegisterLicense(licenseKey); var runtime = new WorkflowRuntime() .WithPersistenceProvider(persistenceProvider) .AsSingleServer() .Start(); ``` For production, store the key in a secrets manager (Azure Key Vault, AWS Secrets Manager, Kubernetes secrets) and inject it into configuration at runtime. ## Workflow Engine Free limits Without a license key, or with an expired key, Workflow Engine runs in Workflow Engine Free mode: Table: Workflow Engine Free limits | Limit | Workflow Engine Free | |----------------------------------------------|------------------------------------------------------| | Unique schemes in the process cache | 10 | | Concurrent runtime operations (semaphore) | 4 | | Activities, transitions, commands per scheme | Unlimited | | Designer | Fully functional with Workflow Engine Free indicator | Workflow Engine Free is suitable for development, evaluation, and small projects. It does not watermark or disable functionality - the scheme and concurrency limits are the only restrictions. ## Verify the license at startup Check the current license restrictions by reading `WorkflowRuntime.GetLicenseRestrictions()`: ```csharp var restrictions = WorkflowRuntime.GetLicenseRestrictions(); if (restrictions.MaxNumberOfSchemes <= 10) { logger.LogWarning( "Workflow Engine is running in Workflow Engine Free mode. " + "Scheme and thread limits apply."); } ``` This method always returns the active restrictions - Workflow Engine Free defaults if no license key is registered, or the upgraded values if a valid key was applied. ## Handle license expiry Most license keys have an expiry date - typically 12 months from purchase. When a key expires, the runtime switches to [Workflow Engine Free mode](#workflow-engine-free-limits) - the same limits as running without a license. Perpetual keys do not expire. Once registered, they remain valid indefinitely. To restore full functionality after expiry, replace the expired key with a new one in your configuration and restart the application. No database changes are needed. For trial keys, visit [trial.workflowengine.io](https://trial.workflowengine.io) before the current key expires. ## Deploy licenses across multiple servers In a multi-server deployment, each runtime node reads the license key from its own configuration. All nodes must use the same key. There is no per-node or per-seat licensing - the key covers the entire deployment. ## See also - [Workflow Engine Editions](https://docs.workflowengine.io/evaluate/workflow-engine-editions/): Compare Free, commercial, and NEO editions. - [Workflow Engine Features](https://docs.workflowengine.io/evaluate/workflow-engine-features/): Browse Workflow Engine features and their edition requirements. - [Install](https://docs.workflowengine.io/get-started/install-workflow-engine/): Set up the runtime and register your license key. ## Frequently asked questions **Where do I buy or renew a license key?** Prices are on the Workflow Engine pricing page, and the sales team at [hello@optimajet.com](mailto:hello@optimajet.com) handles purchases and renewals. Licenses are available for annual subscription or perpetual purchase. **Where do I get a trial key?** Visit [trial.workflowengine.io](https://trial.workflowengine.io), enter your company name and business email, and click **Get Trial Key**. The key is sent to your email. You can also request one programmatically via `POST /api/trial/llm` - see [trial.workflowengine.io/llms.txt](https://trial.workflowengine.io/llms.txt) for the API reference. The trial key has the `TRIAL-` prefix and works the same way as a commercial key for 30 days. **Can I use one license key in both staging and production?** Yes. The same key works in production, staging, and development; those environments do not require additional purchases. **What happens if I restart the application after the license expires?** The runtime switches to [Workflow Engine Free mode](#workflow-engine-free-limits) - processes continue to run and new instances can be created, but the Workflow Engine Free limits apply. Renew the key and restart to restore full functionality. **Is the key validated online?** No. License validation is performed locally - the key string encodes your entitlements and is verified without a network call. The runtime does not phone home. **How is the key structured?** License keys contain a customer identifier prefix and base64-encoded license data. The prefix matches the customer identifier encoded in the data to prevent key sharing. The data includes expiry date, feature restrictions, and a cryptographic signature.