OptionalagentUrl?: stringURL the executor uses to reach this agent's data layer.
Auto-derived when the agent runs on its own server (mountOnStandaloneServer).
Required when the agent is mounted on an external framework (Express/Fastify/NestJS),
since the agent cannot know the host application's address.
Optionalai?: { apiKey: string; model: string; provider: "anthropic" | "openai" }Bring your own AI provider instead of Forest's AI server. All three fields are required
together; omit ai entirely to keep using Forest's server.
Optionaldatabase?: { uri?: string; [option: string]: unknown }Database connection used to persist workflow run state. Accepts a connection URI or a
Sequelize options object. The agent throws at startup if it is omitted (unless inMemory is
set).
OptionalencryptionKey?: stringHKDF secret encrypting OAuth-protected MCP connector credentials at rest. Only needed if you
use OAuth-protected MCP connectors; without it their credential deposits return 503. Embed-time
equivalent of the standalone FOREST_EXECUTOR_ENCRYPTION_KEY env var.
OptionalinMemory?: booleanUse an in-memory run store instead of a database. No database is required, but runs are lost
when the process restarts, so it is not meant for production. Mutually exclusive with
database.
Optionalport?: numberLoopback port the embedded executor listens on; the agent proxies to it internally.
Defaults to 3400.
Options for an embedded workflow executor, started in the same process as the agent through
agent.addWorkflowExecutor().