Installation
Install the SDK using your preferred package manager:Requirements
- Node.js: >= 22.0.0
- TypeScript: >= 5.0.0 (recommended)
Project Entry Point
Every Runflow project needs amain.ts file at the root that exports an async function main(). This is the function the Runflow engine calls when your agent receives a message:
main.ts
Project Structure
Learn how to organize your project as it grows
Built-in Libraries
The SDK includes the following libraries out-of-the-box. No need to install them separately - they’re available in all your agents:Quick Examples
Environment Variables
Set up your environment variables:Configuration File
Create a.runflow/rf.json file:
.runflow/rf.json in the current directory and parent directories.
To make these values available as environment variables for external tools (Promptfoo, test runners, custom scripts), add:
- Explicit config in code
.runflow/rf.json- Environment variables
- Defaults
Manual API Client Configuration
Next Steps
Quick Start
Create your first agent
Core Concepts
Learn about Agents