FolderBot
A sub-project of OpenMaja
FolderBot is a durable, resumable AI workspace built entirely on your Microsoft 365 tenant — no custom servers, no infrastructure to manage.
The problem
Copilot Studio conversations are ephemeral. After 30 minutes of inactivity, 60 minutes of total session duration, or 100 conversation turns, the session resets and context is lost.
FolderBot solves this by giving every session a persistent workspace backed by OneDrive for Business.
What FolderBot does
Every session gets its own folder in OneDrive containing the agent’s state, working memory, active plan, conversation log, and any files it creates. Close the browser, come back the next day, type /resume — and the agent picks up exactly where it left off.
📂 Resuming session 20260525-VendorAssessment…
Active plan: Vendor shortlist — step 2 of 4 complete
You were reviewing the compliance checklist.
Steps remaining: security review (3 vendors), final scoring matrix, executive summary. Starting the security review now…
Saved to your OneDrive:
outputs/security-review.md 📄
How it works
User (M365 Copilot / Teams / web)
│
▼
FolderBot Orchestrator ← routes sessions, enforces policy
│
▼
FolderBot SessionBot ← file operations, memory, plan, results
│
├──────────────────────────────────────┐
▼ ▼
Power Automate Local Runner (optional)
← OneDrive CRUD via M365 connectors ← browser tab, runs JS tools on session files
│ │
└──────────────────┬───────────────────┘
▼
OneDrive for Business
← durable workspace (all session state lives here)
Key features
- Durable sessions — state, memory, and plan survive Copilot Studio resets; resume any session with
/resume - File operations — create, read, update, and delete text files (
.md,.json,.txt,.csv,.log,.xml,.drawio) within your session folder - File as context — drop a file into your session folder and ask the agent to reason over it
- Local runner — optional browser-based runner that executes JavaScript tools on session files directly, unlocking capabilities beyond standard Power Automate flows
- No custom infrastructure — built entirely on standard Power Automate connectors; works in any M365 tenant
- Portable — no hardcoded tenant IDs, paths, or UPNs; fully configurable per deployment
- Multi-agent — Orchestrator + SessionBot split keeps agent instructions lean and routing clean
- Extensible — add custom tools in
user_tools/without touching the runner or any flows
Session workspace
Each session is a folder in OneDrive:
FolderBot/
SOUL.md ← global behavior rules (customize per tenant)
tools/ ← built-in JS tools (runner.html lives here too)
user_tools/ ← your custom JS tools (optional)
sessions/
20260520-MyProject/
state.json ← authoritative session state
memory.md ← compact working memory
plan.md ← active task plan
history.jsonl ← full conversation log
inputs/ ← user-supplied input files
outputs/ ← agent-produced output files
jobs/ ← runner job queue (created on first RunJS call)
Components
| Component | Type | Requires |
|---|---|---|
| Orchestrator | Copilot Studio agent | Copilot Studio |
| SessionBot | Copilot Studio agent | Copilot Studio |
| PA Flows (×12) | Power Automate cloud flows | Power Automate · OneDrive for Business connector |
| Local Runner (optional) | Browser tab (tools/runner.html) | Chrome or Edge · OneDrive sync client |
Built-in JS tools (run via Local Runner)
| Tool | What it does |
|---|---|
patch | Apply a unified diff to a session file |
regex-replace | Regex find/replace with capture group support |
fetch-api | HTTP fetch with optional origin allowlist |
write-root | Write a file to the FolderBot root — used to install new custom tools |
Custom tools can be added to user_tools/ and are picked up by the runner automatically.
FolderBot does not require OpenMaja itself. It deploys entirely within standard M365 tooling using native connectors. The Local Runner is an optional enhancement — all core operations work via Power Automate alone.
Status
v0.2.0.0 — Core system feature-complete and tested end-to-end; Local Runner available as an optional extension.
Getting Started
Everything you need to deploy FolderBot in your M365 tenant is in the repository.
→ Get Started with openmaja-folderbot on GitHub