picoflow.io

Lesson 1: Setup & Runtime

Prerequisites

  1. Node.js v20+ (use nvm install 20).
  2. Docker with MongoDB or Cosmos emulator if you want durable sessions.
  3. Nest CLI: npm i -g @nestjs/cli.
  4. Gemini + optional OpenAI keys.
  5. A Picoflow developer key.

Environment File

Create medical-appointment-bot/.env:

PICOFLOW_KEY=<picoflow dev key>
GEMINI_KEY=<gemini api key>
OPENAI_KEY=<optional>

LLM_RETRY=3
LLM_TEMPERATURE=0.5
SESSION_EXPIRATION=50000

DOCUMENT_DB=MONGO
MONGODB_URL=mongodb://localhost:27017/?directConnection=true
MONGODB_NAME=picoflow
MONGODB_COLLECTION=sessions

Swap the Mongo block for Cosmos if needed (DOCUMENT_DB=COSMO).


Install & Run

cd medical-appointment-bot
npm install
npm run start:dev

The server listens on http://localhost:8000 and serves Swagger at /api. We’ll wire the flow next.