feat: add workflow executor doc#15
Conversation
Add end-to-end documentation for the workflow webhook trigger: - New API reference page for the trigger endpoint: copied webhook URL, Bearer application-token auth, JSON body, 202/4xx/409/429 responses, idempotency and per-webhook rate limiting. - New no-code page covering the Process-section triggers (Manual vs Webhook), URL copy, token management, URL regeneration and revocation. - Wire both pages into the navigation, the API endpoints table, the workflows overview and the execute page. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- clarify that a superseded/regenerated URL returns 400 in the errors table - align the revocation table button label with "Generate new URL" Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- move the webhook endpoint out of the public API table into a Note, since its URL does not follow the base URL + path convention - check response.ok in the Node.js example before parsing the body - scope the "safe to retry" guidance to in-flight runs only Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Match the trigger settings section to the shipped Process panel: the webhook shows the URL with a copy button, a record_id body hint, and a Generate new URL button. Drop the token-management and Start-step-summary bullets, which are not part of the delivered settings UI. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
| FOREST_AUTH_SECRET="your-auth-secret" \ | ||
| AGENT_URL="https://your-agent-url" \ | ||
| DATABASE_URL="postgres://user:pass@localhost:5432/mydb" \ | ||
| npx @forestadmin/workflow-executor |
There was a problem hiding this comment.
🟡 Medium workflows/forest-runtime.mdx:62
The npx @forestadmin/workflow-executor instructions don't mention the Node.js version requirement, so users on older Node versions will get an install or startup failure instead of a working runtime — the package requires Node.js >= 22.12.0. Consider adding the minimum Node version next to the npx command.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @product/process/workflows/forest-runtime.mdx around line 62:
The `npx @forestadmin/workflow-executor` instructions don't mention the Node.js version requirement, so users on older Node versions will get an install or startup failure instead of a working runtime — the package requires Node.js >= 22.12.0. Consider adding the minimum Node version next to the `npx` command.
Scra3
left a comment
There was a problem hiding this comment.
Reviewed against the workflow-executor source (agent-nodejs) and the Ruby agent. Technically accurate throughout — env vars, port 3400, /health body, the auto-created workflow_step_executions table, the workflowExecutorUrl/config.workflow_executor_url options (both Node and Rails confirmed), AES-256-GCM + openssl rand -hex 32, and the ghcr image all match the code. One factual fix below.
Scra3
left a comment
There was a problem hiding this comment.
Second pass — coverage gaps checked against agent-nodejs origin/main and the Forest architecture (flow F6 / AI plane / v1-v2 parity). The privacy framing (top comment) is the important one for a data-residency page.
| }) | ||
| ``` | ||
|
|
||
| ```ruby Ruby (Rails) |
There was a problem hiding this comment.
question: the CodeGroup covers v2 Node + Rails, but workflowExecutorUrl also exists in v1 forest-express and agent-python support is unclear — which SDKs/generations are actually supported?
Scra3
left a comment
There was a problem hiding this comment.
Final sweep — internal links, docs.json placement, the JWT-relay claim, and the 3351 port example all check out against the code. One last improvement below.
Scra3
left a comment
There was a problem hiding this comment.
Re-reviewed the fixes (5e46f07): all previous findings are addressed, and the two new claims check out against the code — the Forest AI server fallback is real (ServerAiAdapter when AI_PROVIDER is unset) and the read/update data steps do go through the AI port. One last thing before merge: the frontmatter description (line 3) still says 'no client data ever leaves your network', contradicting the body's Warning — Macroscope's suggestion on it is good to take. LGTM once that lands.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Consistent terminology (browser -> Forest Runtime), fix garden-path opening, tie the benefit to Forest Runtime rather than the orchestrator. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Orchestrator coordinates but never executes; execution runs on self-hosted Forest Runtime (no Forest-managed executor). Drop the false 'optional / managed orchestrator fallback' note and the permanent browser-rollback promise (browser execution is being retired). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| docker run -d \ | ||
| --add-host=host.docker.internal:host-gateway \ | ||
| -e FOREST_ENV_SECRET="your-env-secret" \ | ||
| -e FOREST_AUTH_SECRET="your-auth-secret" \ | ||
| -e AGENT_URL="http://host.docker.internal:3351" \ | ||
| -e DATABASE_URL="postgres://user:pass@host.docker.internal:5432/mydb" \ | ||
| -p 3400:3400 \ | ||
| ghcr.io/forestadmin/workflow-executor:latest | ||
| ``` |
There was a problem hiding this comment.
🟡 Medium workflows/forest-runtime.mdx:63
The Docker and npx examples set DATABASE_URL to a local Postgres connection (localhost:5432 / host.docker.internal:5432) without DATABASE_SSL=false. Since the executor defaults DATABASE_SSL to true, these commands fail to boot against a typical local Postgres that doesn't accept TLS. Add DATABASE_SSL=false to both examples (or point them at a TLS-enabled database).
docker run -d \
--add-host=host.docker.internal:host-gateway \
-e FOREST_ENV_SECRET="your-env-secret" \
-e FOREST_AUTH_SECRET="your-auth-secret" \
-e AGENT_URL="http://host.docker.internal:3351" \
+ -e DATABASE_SSL=false \
-e DATABASE_URL="postgres://user:pass@host.docker.internal:5432/mydb" \
-p 3400:3400 \
ghcr.io/forestadmin/workflow-executor:latest🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @product/process/workflows/forest-runtime.mdx around lines 63-71:
The Docker and `npx` examples set `DATABASE_URL` to a local Postgres connection (`localhost:5432` / `host.docker.internal:5432`) without `DATABASE_SSL=false`. Since the executor defaults `DATABASE_SSL` to `true`, these commands fail to boot against a typical local Postgres that doesn't accept TLS. Add `DATABASE_SSL=false` to both examples (or point them at a TLS-enabled database).
Deduplicate intro vs 'Do I need it?', add How-it-works diagram, who-does-what roles in Prerequisites, clarify FOREST_AUTH_SECRET provenance, add Network requirements table and multi-instance/HA note, reword AI step types, drop Forest-internal FOREST_SERVER_URL knob. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Forest-side engine switch only applies to the few legacy browser environments; new environments already use Forest Runtime. Keep that in the migration section instead of implying every reader needs it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Configuring the agent and running the Runtime aren't cleanly dev-vs-ops (npx vs Docker is test-vs-prod, often the same person), and the Running section already covers deployment. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…into two modes Forest Runtime can run embedded in the Node.js agent (addWorkflowExecutor, agent >= 1.84.0) or standalone (Docker/CLI, agent >= 1.79.0 or rails >= 1.31.0). Lead with embedded as the simplest path; scope the env-var config to the standalone deployment. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
|
||
| Requires **`@forestadmin/agent` ≥ 1.84.0**. Add one line — the executor runs inside the agent process, so there is nothing else to deploy: |
There was a problem hiding this comment.
🟠 High workflows/forest-runtime.mdx:48
The embedded setup instructions tell users to add .addWorkflowExecutor(...) after upgrading @forestadmin/agent but never mention installing @forestadmin/workflow-executor. In @forestadmin/agent that package is an optional peer dependency that addWorkflowExecutor() dynamically imports, so a project that only follows the documented steps will fail during start() with a missing-dependency error. Add an explicit npm install @forestadmin/workflow-executor (at a compatible version) before the code example.
| Requires **`@forestadmin/agent` ≥ 1.84.0**. Add one line — the executor runs inside the agent process, so there is nothing else to deploy: | |
| ### Embedded in the Node.js agent | |
| Requires **`@forestadmin/agent` ≥ 1.84.0** and **`@forestadmin/workflow-executor`** (an optional peer dependency that is dynamically imported — install it explicitly): | |
| ```bash | |
| npm install @forestadmin/workflow-executor |
Add one line — the executor runs inside the agent process, so there is nothing else to deploy:
<details>
<summary>🚀 Reply "<strong>fix it for me</strong>" or copy this <strong>AI Prompt</strong> for your agent:</summary>
```text
In file @product/process/workflows/forest-runtime.mdx around lines 48-49:
The embedded setup instructions tell users to add `.addWorkflowExecutor(...)` after upgrading `@forestadmin/agent` but never mention installing `@forestadmin/workflow-executor`. In `@forestadmin/agent` that package is an optional peer dependency that `addWorkflowExecutor()` dynamically imports, so a project that only follows the documented steps will fail during `start()` with a missing-dependency error. Add an explicit `npm install @forestadmin/workflow-executor` (at a compatible version) before the code example.
…config The embedded executor passes no AI/tuning config, so it uses Forest's AI server and built-in defaults; custom AI provider, MCP credential encryption, and env-var tuning are standalone-only. The six options are the complete embedded surface. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…oesn't Schema is settable via database.schema; FOREST_EXECUTOR_ENCRYPTION_KEY is read from the process env so OAuth-MCP works embedded. Only the custom AI provider and the tuning knobs are standalone-only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Mirrors the agent-nodejs change routing FOREST_EXECUTOR_ENCRYPTION_KEY
through injection; embedded now passes it via addWorkflowExecutor({ encryptionKey }).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| | `port` | Loopback port the executor listens on internally (default `3400`). | | ||
| | `pollingIntervalS` | How often it polls the orchestrator for pending steps (default `30`). | | ||
| | `stepTimeoutS` | Per-step timeout in seconds (default `300`). | | ||
| | `encryptionKey` | At-rest key (AES-256-GCM) for [OAuth-protected MCP connector](#oauth-protected-mcp-connectors) credentials. Generate with `openssl rand -hex 32`. Omit if you don't use them. | |
There was a problem hiding this comment.
🟠 High workflows/forest-runtime.mdx:68
The embedded options table documents an encryptionKey field, but the embedded executor has no such option in its TypeScript interface and never reads it. Code following this guidance fails TypeScript compilation (the encryptionKey property is rejected) and does not configure OAuth credential encryption, so OAuth-protected MCP connectors still fail when they need the key. Either remove this row and point embedded users to the FOREST_EXECUTOR_ENCRYPTION_KEY environment variable, or add the option to the agent before documenting it.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @product/process/workflows/forest-runtime.mdx around line 68:
The embedded options table documents an `encryptionKey` field, but the embedded executor has no such option in its TypeScript interface and never reads it. Code following this guidance fails TypeScript compilation (the `encryptionKey` property is rejected) and does not configure OAuth credential encryption, so OAuth-protected MCP connectors still fail when they need the key. Either remove this row and point embedded users to the `FOREST_EXECUTOR_ENCRYPTION_KEY` environment variable, or add the option to the agent before documenting it.
Own AI provider (ai), plus the tuning knobs, are now settable embedded (mirrors agent-nodejs #1770) — drop the 'standalone only' caveat. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| | `port` | Loopback port the executor listens on internally (default `3400`). | | ||
| | `ai` | Bring your own LLM instead of Forest's AI server: `{ provider: 'anthropic' \| 'openai', model, apiKey }` (all three required together). Omit to keep using Forest's server. | | ||
| | `encryptionKey` | At-rest key (AES-256-GCM) for [OAuth-protected MCP connector](#oauth-protected-mcp-connectors) credentials. Generate with `openssl rand -hex 32`. Omit if you don't use them. | | ||
| | `pollingIntervalS`, `stepTimeoutS`, `aiInvokeTimeoutS`, `stopTimeoutS`, `maxChainDepth`, `schemaCacheTtlS`, `loggerLevel` | The same tuning knobs as [standalone](#tuning), in camelCase — same defaults. | |
There was a problem hiding this comment.
🟡 Medium workflows/forest-runtime.mdx:68
The embedded-options table on line 68 lists aiInvokeTimeoutS, stopTimeoutS, maxChainDepth, schemaCacheTtlS, and loggerLevel as supported, but these options are silently ignored — the runtime keeps its defaults. The "full configuration parity" note in the following <Note> is therefore also incorrect. Either wire these fields through in WorkflowExecutorEmbedOptions / EmbeddedWorkflowExecutor.start(), or remove the unsupported options from the table and drop the parity claim.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @product/process/workflows/forest-runtime.mdx around line 68:
The embedded-options table on line 68 lists `aiInvokeTimeoutS`, `stopTimeoutS`, `maxChainDepth`, `schemaCacheTtlS`, and `loggerLevel` as supported, but these options are silently ignored — the runtime keeps its defaults. The "full configuration parity" note in the following `<Note>` is therefore also incorrect. Either wire these fields through in `WorkflowExecutorEmbedOptions` / `EmbeddedWorkflowExecutor.start()`, or remove the unsupported options from the table and drop the parity claim.
…ity) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The workflow executor URL is wired in v2 Node/Ruby agents AND the v1 forest-express (>=10.7) and forest-rails (>=9.18) lianas; only the Python agents lack it. Also fix the 'required for Ruby' framing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add Forest Runtime documentation for self-hosted workflow execution
Adds a new forest-runtime.mdx page to the workflows docs section covering how to run workflow steps on self-hosted infrastructure via the Forest Runtime agent. The page includes setup prerequisites, Docker and npx run instructions, required environment variables, OAuth/MCP connector configuration, OpenTelemetry observability guidance, and a health check endpoint reference.
Changes since #15 opened
@forestadmin/agentversion 1.79.0 or higher for Node andforest_admin_railsversion 1.31.0 or higher for Ruby, with clarification on configuring the executor URL [5e46f07]DATABASE_URLrequirement from a production-only note to an explicit requirement unless using the--in-memoryflag, with clarification that in-memory mode is for testing only and state is lost on restart [5e46f07]/healthendpoint behavior, specifying it returns 200 for running and draining states and 503 before ready state, with guidance on liveness versus readiness probe usage [5e46f07]POLLING_INTERVAL_Senvironment variable [5e46f07]AI_PROVIDER,AI_MODEL, andAI_API_KEYenvironment variables with all-or-nothing requirement [5e46f07]HTTP_PORT,POLLING_INTERVAL_S,LOG_LEVEL,STEP_TIMEOUT_S,AI_INVOKE_TIMEOUT_S,STOP_TIMEOUT_S,MAX_CHAIN_DEPTH,SCHEMA_CACHE_TTL_S, andFOREST_SERVER_URL[5e46f07]Forest Runtimeexecutes steps on customer infrastructure, removed the note describingForest Runtimeas optional and self-hosted, and removed the statement that workflows run on Forest's managed orchestrator without it [893c2f7]forest-runtime.mdxworkflow documentation [f6abe96]/product/process/workflows/triggersexplaining workflow triggers including manual and webhook-based triggers, webhook availability across environments, separation of stable webhook URL from bearer token-based execution identity, webhook enablement steps, UI details for URL copying and JSON body hints with regenerate URL functionality, URL regeneration and immediate invalidation behavior, revocation mechanisms and their HTTP response codes (404/400/401), and audit trail marking for webhook-triggered runs [a048ca7]/reference/api/endpoints/trigger-workflow-webhookfor triggering workflows via webhook POST requests to a copied signed webhook URL [a048ca7]product/process/workflows/triggersandreference/api/endpoints/trigger-workflow-webhookto the documentation structure indocs.json[a048ca7]/reference/api/introductionexplaining that the trigger workflow via webhook endpoint does not follow the base URL/path convention and requires copying the full signed URL from trigger settings [a048ca7]/product/execute/workflowsabout automatic workflow starts via webhook, updating a bolded sentence in/product/process/workflows/forest-runtimeto link to trigger documentation, and adding a 'Triggering workflows' section in/product/process/workflows/overviewdescribing manual and webhook-based starts with a Card component linking to trigger management guidance [a048ca7]images/workflows/webhook-regenerate-url.pngandimages/workflows/webhook-trigger-rows.pngto support the workflow triggers documentation [a048ca7]DATABASE_SCHEMAenvironment variable in the forest runtime workflow executor configuration table [4814751]GET /healthendpoint by adding a dedicated section header, replacing the Note block with a markdown table enumerating runtime states (running,draining,idle,stopped) with their HTTP codes and meanings, moving liveness/readiness guidance to a paragraph, and updating the internal reference link from#running-forest-runtimeto#health-checkin migration instructions [3c4ad14]HTTP_PORTandFOREST_SERVER_URLdescriptions [121be32]FOREST_AUTH_SECRETenvironment variable documentation to reference agent's configuredauthSecretand operator responsibility [3d54a7c]FOREST_SERVER_URLfrom optional environment variables table [3d54a7c]databaseoption documentation inforest-runtime.mdxto specify Sequelize options support for schema isolation [457e51e]forest-runtime.mdxto document embedded runtime mode configuration constraints and environment variable requirements [457e51e]encryptionKeyconfiguration option to embedded executor options table [a1f8264]pollingIntervalSandstepTimeoutSconfiguration rows with anairow for bring-your-own LLM parameters and a consolidated row listing multiple tuning knobs (pollingIntervalS,stepTimeoutS,aiInvokeTimeoutS,stopTimeoutS,maxChainDepth,schemaCacheTtlS,loggerLevel) in camelCase format that mirror standalone defaults for the embedded executor configuration [d4bc7d4]ai), encryption key, and all tuning knobs, removing the previous claim that embedded always uses Forest's AI server and defaults [d4bc7d4]loggerLevelfrom embedded executor tuning knob configuration options and added clarification that log verbosity follows the agent's logger without a separate log-level option for embedded mode [d444e2f]Macroscope summarized d2dabfa.