stagent 0.3.6 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/README.md +70 -23
  2. package/dist/cli.js +44 -10
  3. package/docs/.last-generated +1 -1
  4. package/docs/features/chat.md +54 -49
  5. package/docs/features/schedules.md +38 -32
  6. package/docs/features/settings.md +105 -50
  7. package/docs/manifest.json +8 -8
  8. package/docs/superpowers/specs/2026-03-27-chat-screenshot-display-design.md +303 -0
  9. package/drizzle.config.ts +3 -1
  10. package/package.json +5 -1
  11. package/src/app/api/book/bookmarks/route.ts +73 -0
  12. package/src/app/api/book/progress/route.ts +79 -0
  13. package/src/app/api/book/regenerate/route.ts +111 -0
  14. package/src/app/api/book/stage/route.ts +13 -0
  15. package/src/app/api/chat/conversations/[id]/messages/route.ts +3 -2
  16. package/src/app/api/chat/conversations/[id]/respond/route.ts +19 -20
  17. package/src/app/api/chat/conversations/[id]/route.ts +2 -1
  18. package/src/app/api/chat/entities/search/route.ts +97 -0
  19. package/src/app/api/documents/[id]/file/route.ts +4 -1
  20. package/src/app/api/documents/[id]/route.ts +34 -2
  21. package/src/app/api/documents/route.ts +91 -0
  22. package/src/app/api/projects/[id]/route.ts +119 -9
  23. package/src/app/api/projects/__tests__/delete-project.test.ts +170 -0
  24. package/src/app/api/settings/browser-tools/route.ts +68 -0
  25. package/src/app/api/settings/runtime/route.ts +29 -8
  26. package/src/app/book/page.tsx +14 -0
  27. package/src/app/chat/page.tsx +7 -1
  28. package/src/app/globals.css +375 -0
  29. package/src/app/projects/[id]/page.tsx +31 -6
  30. package/src/app/settings/page.tsx +2 -0
  31. package/src/app/{playbook → user-guide}/[slug]/page.tsx +12 -2
  32. package/src/app/{playbook → user-guide}/page.tsx +2 -2
  33. package/src/app/workflows/[id]/page.tsx +28 -2
  34. package/src/components/book/book-reader.tsx +801 -0
  35. package/src/components/book/chapter-generation-bar.tsx +109 -0
  36. package/src/components/book/content-blocks.tsx +432 -0
  37. package/src/components/book/path-progress.tsx +33 -0
  38. package/src/components/book/path-selector.tsx +42 -0
  39. package/src/components/book/try-it-now.tsx +164 -0
  40. package/src/components/chat/chat-activity-indicator.tsx +92 -0
  41. package/src/components/chat/chat-command-popover.tsx +277 -0
  42. package/src/components/chat/chat-input.tsx +85 -10
  43. package/src/components/chat/chat-message-list.tsx +3 -0
  44. package/src/components/chat/chat-message.tsx +29 -7
  45. package/src/components/chat/chat-permission-request.tsx +5 -1
  46. package/src/components/chat/chat-question.tsx +3 -0
  47. package/src/components/chat/chat-shell.tsx +159 -24
  48. package/src/components/chat/conversation-list.tsx +8 -2
  49. package/src/components/chat/screenshot-gallery.tsx +96 -0
  50. package/src/components/monitoring/log-entry.tsx +61 -27
  51. package/src/components/playbook/adoption-heatmap.tsx +1 -1
  52. package/src/components/playbook/journey-card.tsx +1 -1
  53. package/src/components/playbook/playbook-card.tsx +1 -1
  54. package/src/components/playbook/playbook-detail-view.tsx +15 -5
  55. package/src/components/playbook/playbook-homepage.tsx +1 -1
  56. package/src/components/playbook/playbook-updated-badge.tsx +1 -1
  57. package/src/components/projects/project-detail.tsx +160 -27
  58. package/src/components/projects/project-form-sheet.tsx +6 -2
  59. package/src/components/projects/project-list.tsx +1 -1
  60. package/src/components/schedules/schedule-create-sheet.tsx +24 -330
  61. package/src/components/schedules/schedule-detail-sheet.tsx +37 -21
  62. package/src/components/schedules/schedule-edit-sheet.tsx +159 -0
  63. package/src/components/schedules/schedule-form.tsx +410 -0
  64. package/src/components/schedules/schedule-list.tsx +16 -0
  65. package/src/components/settings/browser-tools-section.tsx +247 -0
  66. package/src/components/settings/runtime-timeout-section.tsx +117 -37
  67. package/src/components/shared/app-sidebar.tsx +7 -1
  68. package/src/components/shared/command-palette.tsx +4 -33
  69. package/src/components/shared/screenshot-lightbox.tsx +151 -0
  70. package/src/hooks/use-caret-position.ts +104 -0
  71. package/src/hooks/use-chapter-generation.ts +255 -0
  72. package/src/hooks/use-chat-autocomplete.ts +290 -0
  73. package/src/lib/agents/__tests__/browser-mcp.test.ts +175 -0
  74. package/src/lib/agents/__tests__/claude-agent.test.ts +3 -0
  75. package/src/lib/agents/browser-mcp.ts +119 -0
  76. package/src/lib/agents/claude-agent.ts +78 -14
  77. package/src/lib/book/chapter-generator.ts +193 -0
  78. package/src/lib/book/chapter-mapping.ts +91 -0
  79. package/src/lib/book/content.ts +251 -0
  80. package/src/lib/book/markdown-parser.ts +317 -0
  81. package/src/lib/book/reading-paths.ts +82 -0
  82. package/src/lib/book/types.ts +152 -0
  83. package/src/lib/book/update-detector.ts +157 -0
  84. package/src/lib/chat/codex-engine.ts +537 -0
  85. package/src/lib/chat/command-data.ts +50 -0
  86. package/src/lib/chat/context-builder.ts +145 -7
  87. package/src/lib/chat/engine.ts +207 -49
  88. package/src/lib/chat/model-discovery.ts +13 -5
  89. package/src/lib/chat/permission-bridge.ts +14 -2
  90. package/src/lib/chat/slash-commands.ts +191 -0
  91. package/src/lib/chat/stagent-tools.ts +2 -0
  92. package/src/lib/chat/system-prompt.ts +16 -1
  93. package/src/lib/chat/tool-catalog.ts +185 -0
  94. package/src/lib/chat/tools/chat-history-tools.ts +177 -0
  95. package/src/lib/chat/tools/document-tools.ts +241 -0
  96. package/src/lib/chat/tools/settings-tools.ts +29 -3
  97. package/src/lib/chat/types.ts +19 -2
  98. package/src/lib/constants/settings.ts +5 -0
  99. package/src/lib/data/chat.ts +83 -2
  100. package/src/lib/data/clear.ts +24 -4
  101. package/src/lib/db/bootstrap.ts +29 -0
  102. package/src/lib/db/migrations/0012_add_screenshot_columns.sql +5 -0
  103. package/src/lib/db/schema.ts +37 -0
  104. package/src/lib/docs/types.ts +9 -0
  105. package/src/lib/screenshots/__tests__/persist.test.ts +104 -0
  106. package/src/lib/screenshots/persist.ts +114 -0
  107. package/src/lib/utils/stagent-paths.ts +4 -0
  108. /package/src/app/api/{playbook → user-guide}/status/route.ts +0 -0
package/README.md CHANGED
@@ -58,7 +58,7 @@ Stagent ships a shared runtime registry that routes tasks, schedules, and workfl
58
58
  | ⏰ | **[Schedules](#schedules)** | Recurring and one-shot automations with cadence, expiry, and firing controls |
59
59
  | 📄 | **[Documents](#document-management)** | Upload, preprocess, inspect, and link files to tasks and projects |
60
60
  | 📥 | **[Human-in-the-Loop Inbox](#inbox--human-in-the-loop)** | Approve tool use, answer questions, and review results from one queue |
61
- | 💬 | **[Chat](#chat)** | Conversational AI with model selection, suggested prompts, and entity-aware responses |
61
+ | 💬 | **[Chat](#chat)** | Tool catalog with model selection, @ mentions, slash commands, and browser automation |
62
62
  | 👀 | **[Monitoring](#monitoring)** | Live runtime visibility with log streaming, filters, and health signals |
63
63
  | 🔁 | **[Provider Runtimes](#provider-runtimes)** | Shared runtime layer with Claude Code and OpenAI Codex App Server adapters |
64
64
  | 🧪 | **[Parallel + Swarm Workflows](#parallel--swarm-workflows)** | Bounded fork/join and swarm orchestration without a free-form graph editor |
@@ -73,6 +73,9 @@ Stagent ships a shared runtime registry that routes tasks, schedules, and workfl
73
73
  | 🧪 | **[E2E Test Automation](#e2e-test-automation)** | API-level end-to-end test suite covering both runtimes, 4 profiles, and 4 workflow patterns |
74
74
  | ⌨️ | **[Command Palette](#command-palette)** | Global `⌘K` search for fast navigation across tasks, projects, workflows, and settings |
75
75
  | 📖 | **[Playbook](#playbook)** | Built-in documentation with usage-stage awareness, adoption heatmap, and guided learning journeys |
76
+ | 📚 | **[Living Book](#living-book)** | AI-native book reader with 9 chapters, agent-powered regeneration, staleness detection, and reading paths |
77
+ | 🌐 | **[Environment](#environment)** | Control plane for Claude Code and Codex CLI environments with scanning, caching, sync, and templates |
78
+ | 🔧 | **[Browser Tools](#browser-tools)** | Chrome DevTools and Playwright MCP integration for browser automation in chat and task execution |
76
79
 
77
80
  ---
78
81
 
@@ -207,6 +210,38 @@ Built-in documentation system at `/playbook` with usage-stage awareness that ada
207
210
 
208
211
  <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/playbook-list.png" alt="Stagent playbook documentation" width="1200" />
209
212
 
213
+ #### Living Book
214
+ AI-native book reader at `/book` with 9 chapters across 3 parts (Foundation, Intelligence, Autonomy). Each chapter is generated from Stagent's own source code and feature docs by the document-writer agent — making this a book that writes itself.
215
+
216
+ - **Chapter regeneration** — one-click regeneration via the document-writer agent profile with fire-and-forget task execution
217
+ - **Staleness detection** — git-based change tracking compares source file timestamps against `lastGeneratedBy` frontmatter to show when chapters need updating
218
+ - **Live progress streaming** — SSE subscription shows real-time agent steps during generation (Reading files → Planning → Composing → Writing) with fade-in animation
219
+ - **Reading paths** — 4 persona-based paths (Getting Started, Team Lead, Power User, Developer) filter chapter navigation
220
+ - **Try It Now** — each chapter links to related Playbook feature docs and user journeys
221
+ - **Author's Notes** — collapsible callout blocks with behind-the-scenes commentary
222
+
223
+ ### Environment
224
+
225
+ #### Environment
226
+ Stagent doubles as a **control plane for AI coding environments** — scanning, caching, and syncing configuration for Claude Code and Codex CLI across projects. The environment dashboard surfaces detected tools, active configurations, git checkpoint status, and health scores.
227
+
228
+ - **Environment Scanner** — detects Claude Code and Codex CLI configurations, MCP servers, skills, and project settings
229
+ - **Environment Cache** — persists scanned state for fast dashboard rendering without re-scanning
230
+ - **Environment Dashboard** — unified view of all detected environments with health indicators
231
+ - **Git Checkpoint Manager** — tracks environment state via git commits for rollback and comparison
232
+ - **Environment Sync Engine** — bidirectional sync between local config and cached state
233
+ - **Project Onboarding** — guided flow for setting up new projects with environment-aware defaults
234
+ - **Environment Templates** — reusable environment configurations for common project types
235
+ - **Cross-Project Comparison** — compare environment settings across projects
236
+ - **Skill Portfolio** — aggregate view of skills across all detected environments
237
+ - **Environment Health Scoring** — composite health score based on configuration completeness and freshness
238
+ - **Agent Profile from Environment** — auto-generate agent profiles from detected environment capabilities
239
+
240
+ <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/environment-list.png" alt="Stagent environment dashboard" width="1200" />
241
+
242
+ #### Browser Tools
243
+ Enable browser automation in chat and task execution through two MCP integrations: **Chrome DevTools MCP** (29 tools for connecting to a running Chrome instance via CDP) and **Playwright MCP** (50+ tools for headless browser automation). Configure both from Settings with independent toggles and permission tiering — read-only operations auto-approve while mutations are gated through the inbox approval flow.
244
+
210
245
  ### Platform
211
246
 
212
247
  #### Tool Permission Persistence
@@ -243,13 +278,13 @@ When an agent needs approval or input, a notification appears in your inbox. Rev
243
278
  | <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/inbox-expanded.png" alt="Inbox notification expanded" width="580" /> |
244
279
 
245
280
  #### Chat
246
- Conversational control plane for all workspace primitives — projects, tasks, workflows, documents, and profiles are all reachable from the chat surface. Progressive 5-tier context injection (~53K token budget) builds workspace awareness from lightweight summaries up to full document content. Multi-provider model selection with cost tiers ($, $$, $$$) spans Claude Haiku through Opus and GPT-5.x models, with a Settings-level default preference. Claude.ai-style tabbed suggested prompts (Explore, Create, Analyze) with hover preview help new users discover workspace capabilities. Quick Access navigation pills in responses provide entity deep-linking — click a mentioned project or task to jump directly to its detail view. Stagent CRUD tools let you create, update, and delete projects, tasks, and workflows through natural language. Streaming responses render in real time with full markdown support.
281
+ Conversational control plane for all workspace primitives — projects, tasks, workflows, documents, and profiles are all reachable from the chat surface. The chat interface is organized as a **tool catalog** with five categories (Explore, Create, Debug, Automate, Smart Picks) that help discover workspace capabilities. Progressive 5-tier context injection (~53K token budget) builds workspace awareness from lightweight summaries up to full document content. **@ mentions** let you reference documents and entities directly in prompts with fuzzy search autocomplete, injecting their content as context. **Slash commands** (`/`) provide quick access to tools and actions. Multi-provider model selection with cost tiers ($, $$, $$$) spans Claude Haiku through Opus and GPT-5.x models. Browser automation via Chrome DevTools and Playwright MCP enables screenshot capture and web interaction from chat. Quick Access navigation pills in responses provide entity deep-linking. Stagent CRUD tools let you create, update, and delete workspace entities through natural language.
247
282
 
248
- <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/chat-conversation.png" alt="Stagent chat conversation with Quick Access navigation pills" width="1200" />
283
+ <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/chat-conversation.png" alt="Stagent chat conversation with @ document context" width="1200" />
249
284
 
250
- | Empty State & Suggested Prompts | Model Selector | Quick Access Pills |
285
+ | Tool Catalog | Model Selector | Create Tab |
251
286
  |:-:|:-:|:-:|
252
- | <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/chat-list.png" alt="Chat empty state with suggested prompts" width="380" /> | <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/chat-model-selector.png" alt="Chat model selector with cost tiers" width="380" /> | <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/chat-quick-access.png" alt="Chat Quick Access navigation pills" width="380" /> |
287
+ | <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/chat-list.png" alt="Chat tool catalog with category tabs" width="380" /> | <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/chat-model-selector.png" alt="Chat model selector with cost tiers" width="380" /> | <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/chat-create-tab.png" alt="Chat Create category prompts" width="380" /> |
253
288
 
254
289
  #### Monitoring
255
290
  Real-time agent log streaming via Server-Sent Events. Filter by task or event type, click entries to jump to task details, and auto-pause polling when the tab is hidden (Page Visibility API).
@@ -260,19 +295,19 @@ Real-time agent log streaming via Server-Sent Events. Filter by task or event ty
260
295
  File upload with drag-and-drop in task creation. Type-aware content preview for text, markdown (via react-markdown), code, and JSON. Copy-to-clipboard and download-as-file for task outputs.
261
296
 
262
297
  #### Settings
263
- Configuration hub with provider-aware sections: Claude authentication (API key or OAuth), OpenAI Codex runtime API-key management, tool permissions (saved "Always Allow" patterns with revoke), permission presets, budget configuration, and data management.
298
+ Configuration hub with provider-aware sections: Claude authentication (API key or OAuth), OpenAI Codex runtime API-key management, chat defaults (model selection), **browser tools** (Chrome DevTools and Playwright MCP toggles), runtime configuration (SDK timeout and max turns), tool permissions (saved "Always Allow" patterns with revoke), permission presets, budget guardrails, and data management.
264
299
 
265
300
  <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/settings-list.png" alt="Stagent settings" width="1200" />
266
301
 
267
- | Permission Presets | Budget Configuration | Data Management |
302
+ | Browser Tools | Permission Presets | Budget Configuration |
268
303
  |:-:|:-:|:-:|
269
- | <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/settings-presets.png" alt="Tool permission presets" width="380" /> | <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/settings-budget.png" alt="Budget configuration" width="380" /> | <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/settings-data.png" alt="Data management" width="380" /> |
304
+ | <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/settings-browser-tools.png" alt="Browser tools MCP toggles" width="380" /> | <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/settings-presets.png" alt="Tool permission presets" width="380" /> | <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/settings-budget.png" alt="Budget configuration" width="380" /> |
270
305
 
271
306
  #### CLI
272
307
  The `npx stagent` entry point boots a Next.js server from the published npm package. It is built from `bin/cli.ts` into `dist/cli.js` using tsup, and serves as the primary distribution channel — no clone required.
273
308
 
274
309
  #### Database
275
- SQLite with WAL mode via better-sqlite3 + Drizzle ORM. Twelve tables: `projects`, `tasks`, `workflows`, `agent_logs`, `notifications`, `documents`, `schedules`, `settings`, `learned_context`, `usage_ledger`, `conversations`, `chat_messages`. Self-healing bootstrap — tables are created on startup if missing.
310
+ SQLite with WAL mode via better-sqlite3 + Drizzle ORM. Fourteen tables: `projects`, `tasks`, `workflows`, `agent_logs`, `notifications`, `documents`, `schedules`, `settings`, `learned_context`, `usage_ledger`, `conversations`, `chat_messages`, `environments`, `environment_configs`. Self-healing bootstrap — tables are created on startup if missing.
276
311
 
277
312
  #### Command Palette
278
313
  Global `⌘K` command palette for fast navigation and search across tasks, projects, workflows, and settings. Recent items, fuzzy search, and keyboard-driven navigation.
@@ -282,7 +317,7 @@ Global `⌘K` command palette for fast navigation and search across tasks, proje
282
317
  | <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/command-palette-empty.png" alt="Command palette empty state" width="580" /> | <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/command-palette-search.png" alt="Command palette search results" width="580" /> |
283
318
 
284
319
  #### App Shell
285
- Responsive sidebar with collapsible icon-only mode, custom Stagent logo, tooltip navigation, dark/light/system theme, and OKLCH hue 250 blue-indigo color palette. Built on shadcn/ui (New York style) with PWA manifest and app icons. Routes: Home, Dashboard, Inbox, Chat, Monitor, Projects, Workflows, Documents, Profiles, Schedules, Cost & Usage, Playbook, Settings.
320
+ Responsive sidebar with collapsible icon-only mode, custom Stagent logo, tooltip navigation, dark/light/system theme, and OKLCH hue 250 blue-indigo color palette. Built on shadcn/ui (New York style) with PWA manifest and app icons. Routes: Home, Dashboard, Inbox, Chat, Projects, Workflows, Documents, Monitor, Profiles, Schedules, Cost & Usage, AI Native Book, User Guide, Environment, Settings.
286
321
 
287
322
  #### E2E Test Automation
288
323
  API-level end-to-end test suite built on Vitest with 120-second timeouts and sequential execution. Five test files cover single-task execution, sequence workflows, parallel workflows, blueprints, and cross-runtime scenarios across both Claude and Codex backends. Tests skip gracefully when runtimes are not configured, preventing CI failures. Run with `npm run test:e2e`.
@@ -332,7 +367,9 @@ src/
332
367
  │ ├── schedules/ # Schedule management
333
368
  │ ├── costs/ # Cost & usage dashboard
334
369
  │ ├── playbook/ # Documentation & learning journeys
335
- │ ├── chat/ # Conversational AI
370
+ │ ├── chat/ # Conversational AI (tool catalog)
371
+ │ ├── book/ # AI Native Book reader
372
+ │ ├── environment/ # Environment control plane
336
373
  │ ├── inbox/ # Notifications
337
374
  │ ├── monitor/ # Log streaming
338
375
  │ └── settings/ # Configuration
@@ -346,9 +383,11 @@ src/
346
383
  │ ├── playbook/ # Playbook docs + journeys + adoption
347
384
  │ ├── schedules/ # Schedule management
348
385
  │ ├── monitoring/ # Log viewer
349
- │ ├── chat/ # Chat shell, messages, input composer
386
+ │ ├── chat/ # Chat shell, messages, input composer, tool catalog
387
+ │ ├── book/ # Book reader, chapters, reading paths
388
+ │ ├── environment/ # Environment dashboard, scanner, templates
350
389
  │ ├── notifications/ # Inbox + permission actions
351
- │ ├── settings/ # Auth, permissions, budgets, data mgmt
390
+ │ ├── settings/ # Auth, permissions, budgets, browser tools, data mgmt
352
391
  │ ├── shared/ # App shell, sidebar
353
392
  │ └── ui/ # shadcn/ui primitives
354
393
  └── lib/
@@ -443,24 +482,32 @@ All 14 features shipped across three layers:
443
482
  | **Core** | Project management, task board, agent integration, inbox notifications, monitoring dashboard |
444
483
  | **Polish** | Homepage dashboard, UX fixes, workflow engine, AI task assist, content handling, session management |
445
484
 
446
- ### Post-MVP — 37 features shipped
485
+ ### Post-MVP — 52 features shipped
447
486
 
448
487
  | Category | Features |
449
488
  |----------|---------|
450
489
  | **Documents** (5) | File attachments, preprocessing (5 formats), agent context injection, document browser, output generation |
451
490
  | **Agent Intelligence** (6) | Multi-agent routing, autonomous loops, multi-agent swarm, AI assist→workflows, agent self-improvement, workflow context batching |
452
- | **Agent Profiles** (2) | Agent profile catalog (13+ profiles), workflow blueprints (8 templates) |
453
- | **UI Enhancement** (13) | Ambient approvals, learned context UX, micro-visualizations, command palette, operational surface, profile surface, accessibility, UI density, kanban operations, board persistence, detail view redesign, playbook documentation, workflow UX overhaul (in-progress) |
491
+ | **Agent Profiles** (2) | Agent profile catalog (21 profiles), workflow blueprints (8 templates) |
492
+ | **UI Enhancement** (13) | Ambient approvals, learned context UX, micro-visualizations, command palette, operational surface, profile surface, accessibility, UI density, kanban operations, board persistence, detail view redesign, playbook documentation, workflow UX overhaul |
454
493
  | **Platform** (8) | Scheduled prompt loops, tool permissions, provider runtimes, OpenAI Codex runtime, cross-provider profiles, parallel fork/join, tool permission presets, npm publish (deferred) |
455
494
  | **Runtime Quality** (2) | SDK runtime hardening, E2E test automation |
456
495
  | **Governance** (3) | Usage metering ledger, spend budget guardrails, cost & usage dashboard |
457
- | **Chat** (6) | Chat data layer, chat engine (5-tier context, CRUD tools), API routes (SSE streaming), UI shell, message rendering (Quick Access pills), input composer (model selector, suggested prompts) |
458
-
459
- ### In Progress
460
-
461
- | Feature | Description |
462
- |---------|-------------|
463
- | Workflow UX Overhaul | Document context propagation, output readability, dashboard visibility, AI assist guidance |
496
+ | **Chat** (6) | Chat data layer, chat engine (5-tier context, CRUD tools), API routes (SSE streaming), UI shell, message rendering (Quick Access pills), input composer (tool catalog, model selector) |
497
+ | **Environment** (11) | Environment scanner, cache, dashboard, git checkpoint manager, sync engine, project onboarding, templates, cross-project comparison, skill portfolio, health scoring, agent profile from environment |
498
+ | **Living Book** (5) | Content merge (chapters → playbook), author's notes, reading paths, markdown pipeline, self-updating chapters |
499
+
500
+ ### Planned
501
+
502
+ | Feature | Priority | Description |
503
+ |---------|----------|-------------|
504
+ | Browser Use | P1 | Chrome DevTools + Playwright MCP integration for browser automation |
505
+ | Workspace Context Awareness | P1 | Surface cwd, git branch, worktree status to chat agents |
506
+ | Chat Command Mentions | P1 | Slash commands for tools/actions + @ entity mentions |
507
+ | Task Hierarchy Clarity | P1 | Distinguish standalone vs workflow-bound tasks |
508
+ | Chat Conversation Persistence | P1 | URL/localStorage persistence for active conversations |
509
+ | Settings Interactive Controls | P2 | Slider upgrades for SDK Timeout and Max Turns |
510
+ | Agent Document API Access | P2 | MCP-based document tools for agent consumption |
464
511
 
465
512
  ---
466
513
 
package/dist/cli.js CHANGED
@@ -104,7 +104,9 @@ var STAGENT_TABLES = [
104
104
  "environment_sync_ops",
105
105
  "environment_templates",
106
106
  "conversations",
107
- "chat_messages"
107
+ "chat_messages",
108
+ "reading_progress",
109
+ "bookmarks"
108
110
  ];
109
111
  function bootstrapStagentDatabase(sqlite2) {
110
112
  sqlite2.exec(`
@@ -319,6 +321,11 @@ function bootstrapStagentDatabase(sqlite2) {
319
321
  addColumnIfMissing(`ALTER TABLE projects ADD COLUMN working_directory TEXT;`);
320
322
  addColumnIfMissing(`ALTER TABLE schedules ADD COLUMN assigned_agent TEXT;`);
321
323
  addColumnIfMissing(`ALTER TABLE documents ADD COLUMN version INTEGER NOT NULL DEFAULT 1;`);
324
+ addColumnIfMissing(`ALTER TABLE documents ADD COLUMN source TEXT DEFAULT 'upload';`);
325
+ addColumnIfMissing(`ALTER TABLE documents ADD COLUMN conversation_id TEXT REFERENCES conversations(id);`);
326
+ addColumnIfMissing(`ALTER TABLE documents ADD COLUMN message_id TEXT;`);
327
+ sqlite2.exec(`CREATE INDEX IF NOT EXISTS idx_documents_source ON documents(source);`);
328
+ sqlite2.exec(`CREATE INDEX IF NOT EXISTS idx_documents_conversation_id ON documents(conversation_id);`);
322
329
  sqlite2.exec(`
323
330
  CREATE TABLE IF NOT EXISTS environment_scans (
324
331
  id TEXT PRIMARY KEY NOT NULL,
@@ -448,6 +455,26 @@ function bootstrapStagentDatabase(sqlite2) {
448
455
  CREATE INDEX IF NOT EXISTS idx_chat_messages_conversation_id ON chat_messages(conversation_id);
449
456
  CREATE INDEX IF NOT EXISTS idx_chat_messages_conversation_created ON chat_messages(conversation_id, created_at);
450
457
  `);
458
+ sqlite2.exec(`
459
+ CREATE TABLE IF NOT EXISTS reading_progress (
460
+ chapter_id TEXT PRIMARY KEY NOT NULL,
461
+ progress INTEGER DEFAULT 0 NOT NULL,
462
+ scroll_position INTEGER DEFAULT 0 NOT NULL,
463
+ last_read_at INTEGER NOT NULL,
464
+ updated_at INTEGER NOT NULL
465
+ );
466
+
467
+ CREATE TABLE IF NOT EXISTS bookmarks (
468
+ id TEXT PRIMARY KEY NOT NULL,
469
+ chapter_id TEXT NOT NULL,
470
+ section_id TEXT,
471
+ scroll_position INTEGER DEFAULT 0 NOT NULL,
472
+ label TEXT NOT NULL,
473
+ created_at INTEGER NOT NULL
474
+ );
475
+
476
+ CREATE INDEX IF NOT EXISTS idx_bookmarks_chapter_id ON bookmarks(chapter_id);
477
+ `);
451
478
  }
452
479
  function hasLegacyStagentTables(sqlite2) {
453
480
  const placeholders = STAGENT_TABLES.map(() => "?").join(", ");
@@ -496,15 +523,16 @@ function markAllMigrationsApplied(sqlite2, migrationsFolder, migrationsTable = "
496
523
  var __dirname = dirname2(fileURLToPath(import.meta.url));
497
524
  var appDir = join3(__dirname, "..");
498
525
  var launchCwd = process.cwd();
499
- var DATA_DIR = getStagentDataDir();
500
- var dbPath = getStagentDbPath();
501
526
  var pkg = JSON.parse(readFileSync(join3(appDir, "package.json"), "utf-8"));
502
- var HELP_TEXT = `
527
+ function getHelpText() {
528
+ const dir = getStagentDataDir();
529
+ const db2 = getStagentDbPath();
530
+ return `
503
531
  Data:
504
- Directory ${DATA_DIR}
505
- Database ${dbPath}
506
- Sessions ${join3(DATA_DIR, "sessions")}
507
- Logs ${join3(DATA_DIR, "logs")}
532
+ Directory ${dir}
533
+ Database ${db2}
534
+ Sessions ${join3(dir, "sessions")}
535
+ Logs ${join3(dir, "logs")}
508
536
 
509
537
  Environment variables:
510
538
  STAGENT_DATA_DIR Custom data directory for the web app
@@ -513,10 +541,16 @@ Environment variables:
513
541
 
514
542
  Examples:
515
543
  node dist/cli.js --port 3210 --no-open
516
- STAGENT_DATA_DIR=/tmp/stagent node dist/cli.js --reset
544
+ node dist/cli.js --data-dir ~/.stagent-dogfood --port 3100
517
545
  `;
518
- program.name("stagent").description("Governed AI agent workspace").version(pkg.version).addHelpText("after", HELP_TEXT).option("-p, --port <number>", "port to start on", "3000").option("--reset", "delete the local database before starting").option("--no-open", "don't auto-open browser").parse();
546
+ }
547
+ program.name("stagent").description("Governed AI agent workspace").version(pkg.version).addHelpText("after", getHelpText).option("-p, --port <number>", "port to start on", "3000").option("--data-dir <path>", "custom data directory (overrides STAGENT_DATA_DIR)").option("--reset", "delete the local database before starting").option("--no-open", "don't auto-open browser").parse();
519
548
  var opts = program.opts();
549
+ if (opts.dataDir) {
550
+ process.env.STAGENT_DATA_DIR = opts.dataDir;
551
+ }
552
+ var DATA_DIR = getStagentDataDir();
553
+ var dbPath = getStagentDbPath();
520
554
  var requestedPort = Number.parseInt(opts.port, 10);
521
555
  if (Number.isNaN(requestedPort) || requestedPort <= 0) {
522
556
  program.error(`Invalid port: ${opts.port}`);
@@ -1 +1 @@
1
- 2026-03-22T20:46:49Z
1
+ 2026-03-28T00:33:25Z
@@ -3,100 +3,105 @@ title: "Chat"
3
3
  category: "feature-reference"
4
4
  section: "chat"
5
5
  route: "/chat"
6
- tags: ["chat", "conversations", "ai", "model-selection", "suggested-prompts", "quick-access", "streaming"]
6
+ tags: ["chat", "conversation", "ai", "tool-catalog", "mentions"]
7
7
  features: ["chat-data-layer", "chat-engine", "chat-api-routes", "chat-ui-shell", "chat-message-rendering", "chat-input-composer"]
8
8
  screengrabCount: 5
9
- lastUpdated: "2026-03-22"
9
+ lastUpdated: "2026-03-27"
10
10
  ---
11
11
 
12
12
  # Chat
13
13
 
14
- The Chat page is your conversational AI interface for managing and exploring your Stagent workspace. Ask questions about your projects, tasks, workflows, and documents the assistant understands your setup and responds with context-aware answers, complete with direct links to the entities it mentions.
14
+ The Chat page is your AI-powered command center for everything in your workspace. Instead of a blank prompt, you land on a **Tool Catalog** that organizes suggested prompts into four action-oriented categories -- Explore, Create, Debug, and Automate -- plus a Smart Picks row of personalized suggestions drawn from your actual projects, tasks, and documents. Pick a model, choose a prompt (or type your own), and get context-aware answers with direct links to the items the assistant mentions.
15
15
 
16
16
  ## Screenshots
17
17
 
18
- ![Chat empty state](../screengrabs/chat-list.png)
19
- *Empty state with hero heading, suggested prompt categories, and conversation sidebar*
20
-
21
- ![Active conversation](../screengrabs/chat-conversation.png)
22
- *Active conversation showing streamed responses with Quick Access navigation pills*
18
+ ![Chat tool catalog](../screengrabs/chat-list.png)
19
+ *Tool catalog with hero heading, category tabs (Explore / Create / Debug / Automate), Smart Picks row, and conversation sidebar*
23
20
 
24
21
  ![Model selector](../screengrabs/chat-model-selector.png)
25
- *Model selector dropdown showing available models grouped by provider with cost tiers*
22
+ *Model selector dropdown showing Claude and Codex models organized by provider with cost tiers*
26
23
 
27
- ![Suggested prompts — Create tab](../screengrabs/chat-create-tab.png)
28
- *Suggested prompts with the Create tab selected, showing context-aware prompt suggestions*
24
+ ![Create category tab](../screengrabs/chat-create-tab.png)
25
+ *Create category selected, showing prompts for spinning up tasks, workflows, and projects*
29
26
 
30
- ![Quick Access pills](../screengrabs/chat-quick-access.png)
31
- *Quick Access navigation pill linking directly to a mentioned task*
27
+ ![Active conversation](../screengrabs/chat-conversation.png)
28
+ *Active conversation with @ document context injected and streamed response with formatted markdown*
29
+
30
+ ![Quick Access navigation](../screengrabs/chat-quick-access.png)
31
+ *Response content with Quick Access navigation pills linking directly to mentioned entities*
32
32
 
33
33
  ## Key Features
34
34
 
35
- ### Conversations
35
+ ### Tool Catalog
36
36
 
37
- Every chat starts a new conversation that is saved automatically. Your conversation history appears in the left sidebar, sorted by most recent. Click any past conversation to pick up where you left off. You can rename, archive, or delete conversations from the context menu.
37
+ When no conversation is active, the chat page displays a curated grid of suggested prompts organized into tabbed categories:
38
38
 
39
- On mobile and tablet, the conversation list is tucked behind a menu icon and slides in as an overlay so the message area gets full screen space.
39
+ - **Explore** -- Questions about your workspace: project statuses, task summaries, schedule overviews.
40
+ - **Create** -- Prompts that help you spin up new tasks, workflows, projects, and schedules.
41
+ - **Debug** -- Investigate failed tasks, review agent logs, and diagnose workflow issues.
42
+ - **Automate** -- Set up scheduled loops, bulk operations, and repeating workflows.
43
+ - **Smart Picks** -- A personalized row of suggestions generated from your actual workspace data. If you have a recently failed task, a prompt like "Why did [task name] fail?" appears automatically.
44
+
45
+ Click any suggestion to insert it into the input and start a conversation instantly.
40
46
 
41
47
  ### Model Selection
42
48
 
43
- Choose which AI model powers your conversation using the model selector at the bottom of the input area. Models are grouped by provider with clear cost and capability labels:
49
+ Choose which AI model powers your conversation using the model selector at the bottom-left of the input area. Models are grouped by provider with clear cost and capability labels:
44
50
 
45
- - **Haiku 4.5** Fast responses at the lowest cost ($). The default choice for everyday questions.
46
- - **Sonnet 4.6** A balance of speed and depth ($$). Good for nuanced analysis.
47
- - **Opus 4.6** The most capable model ($$$). Best for complex reasoning and detailed answers.
48
- - **GPT-4o-mini** Fast alternative ($). Available when the Codex runtime is connected.
49
- - **GPT-4o** Balanced alternative ($$). Available when the Codex runtime is connected.
51
+ - **Haiku 4.5** -- Fast responses at the lowest cost ($). The default choice for everyday questions.
52
+ - **Sonnet 4.6** -- A balance of speed and depth ($$). Good for nuanced analysis.
53
+ - **Opus 4.6** -- The most capable model ($$$). Best for complex reasoning and detailed answers.
54
+ - **GPT-4o-mini** -- Fast alternative ($). Available when the Codex runtime is connected.
55
+ - **GPT-4o** -- Balanced alternative ($$). Available when the Codex runtime is connected.
50
56
 
51
57
  Your preferred default model can be set in the Settings page under "Chat default model." The selection persists per conversation, so switching models mid-conversation is seamless.
52
58
 
53
- ### Suggested Prompts
59
+ ### @ Mentions and Context
54
60
 
55
- When you open Chat with no active conversation, the hero area displays a grid of suggested prompts organized into tabbed categories. These prompts are generated from your actual workspace data:
61
+ Type **@** in the chat input to reference a specific project, task, workflow, document, profile, or schedule by name. An autocomplete popover appears with fuzzy-searchable results grouped by entity type. When you select a mention, the assistant receives the full details of that entity as part of the conversation context -- so it can give precise, informed answers without you having to copy-paste information.
56
62
 
57
- - **Project-aware** "What's the status of [your project name]?"
58
- - **Task-aware** — "Why did [a recently failed task] fail?"
59
- - **Document-aware** — "Summarize [a recent document]"
60
- - **System** — "What can you help me with?"
63
+ The assistant also loads workspace context automatically in the background. Your active project, recent tasks, running workflows, and linked documents are all available to the model without any extra effort on your part.
61
64
 
62
- Click any suggestion to insert it into the input and start a conversation instantly.
65
+ ### Conversation Management
63
66
 
64
- ### Quick Access Navigation Pills
67
+ Every chat starts a new conversation that is saved automatically. Your conversation history appears in the left sidebar, sorted by most recent. Click any past conversation to pick up where you left off. You can rename, archive, or delete conversations from the context menu.
65
68
 
66
- When the assistant mentions a project, task, workflow, document, or schedule in its response, navigation pills appear at the bottom of the message bubble after streaming completes. Each pill shows an icon and label click it to jump directly to that entity's page. This turns the chat into a workspace control plane: ask a question, then navigate to the relevant item in one click.
69
+ On smaller screens, the conversation list is tucked behind a menu icon and slides in as an overlay so the message area gets full screen space.
67
70
 
68
- ### Entity Management via Chat
71
+ ### Quick Access Navigation
69
72
 
70
- The assistant understands your Stagent workspace — your projects, tasks, workflows, documents, and schedules. You can ask about statuses, request summaries, or get recommendations, and the assistant draws from your actual data to answer. The progressive context system loads relevant workspace information automatically so you don't need to explain your setup.
73
+ When the assistant mentions a project, task, workflow, document, or schedule in its response, navigation pills appear at the bottom of the message bubble after the response completes. Each pill shows an icon and label -- click it to jump directly to that entity's page. This turns the chat into a workspace control plane: ask a question, then navigate to the relevant item in one click.
71
74
 
72
75
  ### Streaming Responses
73
76
 
74
- Responses stream in token by token with a blinking cursor, so you see the answer forming in real time. A "Thinking..." indicator appears before the first token arrives. Markdown formatting headings, lists, code blocks with syntax highlighting, tables, and links renders as the text streams in. Code blocks include a copy button and language label for easy reference.
77
+ Responses stream in token by token with a blinking cursor, so you see the answer forming in real time. A "Thinking..." indicator appears before the first token arrives. Markdown formatting -- headings, lists, code blocks with syntax highlighting, tables, and links -- renders as the text streams in. Code blocks include a copy button and language label for easy reference.
75
78
 
76
79
  ## How To
77
80
 
78
- ### Start a Conversation
81
+ ### Start a New Conversation
79
82
 
80
83
  1. Click **Chat** in the sidebar (under the Work section).
81
- 2. Type your question in the input area at the bottom, or click a suggested prompt.
82
- 3. Press **Enter** to send. The assistant's response streams in immediately.
84
+ 2. Browse the tool catalog categories or type your question in the input area at the bottom.
85
+ 3. Click a suggested prompt to insert it, or type your own message.
86
+ 4. Press **Enter** to send. The assistant's response streams in immediately.
83
87
 
84
- ### Switch Models
88
+ ### Switch AI Models
85
89
 
86
- 1. Click the model selector to the left of the input area (it shows the current model name).
90
+ 1. Click the model selector to the left of the input area (it shows the current model name and cost tier).
87
91
  2. Choose a different model from the dropdown. Models are labeled with cost tiers ($, $$, $$$).
88
92
  3. Your next message will use the selected model. The choice is saved for this conversation.
89
93
 
90
- ### Use Suggested Prompts
94
+ ### Reference Documents in Chat
91
95
 
92
- 1. On the Chat page with no active conversation, browse the suggested prompt categories.
93
- 2. Click a prompt to insert it into the input area.
94
- 3. Edit the prompt text if needed, then press **Enter** to send.
96
+ 1. In the chat input, type **@** followed by the name of a document, project, task, or other entity.
97
+ 2. An autocomplete popover appears -- use arrow keys or click to select the entity you want.
98
+ 3. The selected mention appears as a highlighted reference in your message.
99
+ 4. When you send the message, the assistant receives the full context of the mentioned entity and can answer questions about it in detail.
95
100
 
96
101
  ### Navigate to Entities from Chat
97
102
 
98
103
  1. Ask the assistant about a project, task, or other workspace item.
99
- 2. After the response finishes streaming, look for the Quick Access pills at the bottom of the message.
104
+ 2. After the response finishes, look for the Quick Access pills at the bottom of the message.
100
105
  3. Click a pill to navigate directly to that entity's detail page.
101
106
 
102
107
  ### Manage Conversations
@@ -112,8 +117,8 @@ Responses stream in token by token with a blinking cursor, so you see the answer
112
117
 
113
118
  ## Related
114
119
 
115
- - [Dashboard Kanban](./dashboard-kanban.md) manage the tasks your chat assistant references
116
- - [Profiles](./profiles.md) agent profiles that shape task execution behavior
117
- - [Projects](./projects.md) the projects that provide context to your chat conversations
118
- - [Documents](./documents.md) documents the assistant can summarize and reference
119
- - [Settings](./settings.md) configure your default chat model and other preferences
120
+ - [Settings](./settings.md) -- Configure default chat model and browser tools
121
+ - [Documents](./documents.md) -- Documents the assistant can summarize and reference via @ mentions
122
+ - [Projects](./projects.md) -- Projects that provide context to your chat conversations
123
+ - [Profiles](./profiles.md) -- Agent profiles that shape how the assistant responds
124
+ - [Dashboard Kanban](./dashboard-kanban.md) -- Manage the tasks your chat assistant references
@@ -3,66 +3,72 @@ title: "Schedules"
3
3
  category: "feature-reference"
4
4
  section: "schedules"
5
5
  route: "/schedules"
6
- tags: [schedules, automation, loops, recurring, intervals, autonomous]
7
- features: ["scheduled-prompt-loops", "autonomous-loop-execution"]
8
- screengrabCount: 1
9
- lastUpdated: "2026-03-21"
6
+ tags: ["schedules", "automation", "recurring", "prompts"]
7
+ features: ["scheduled-prompt-loops"]
8
+ screengrabCount: 3
9
+ lastUpdated: "2026-03-27"
10
10
  ---
11
11
 
12
12
  # Schedules
13
13
 
14
- Schedule recurring agent tasks with configurable intervals and autonomous loop execution. The scheduler engine manages the full execution lifecycle, running prompts on a cadence you define with preset intervals or custom timing. Autonomous loops add intelligent stop conditions so agents can iterate toward a goal and stop when done.
14
+ Automate recurring AI prompts on configurable intervals. Define what you want an agent to do, set a schedule, and let it run unattended. Each firing creates a tracked task with full execution history, so you always know what ran, when it ran, and what it produced. Pause, resume, or edit schedules at any time without losing history.
15
15
 
16
16
  ## Screenshots
17
17
 
18
- ![Schedules list showing active and paused schedules](../screengrabs/schedules-list.png)
19
- *The schedules list displays all configured schedules with their status, interval, next run time, and associated project.*
18
+ ![Schedules list showing active and paused schedules with status, frequency, and next firing time](../screengrabs/schedules-list.png)
19
+ *The schedules list displays all configured schedules with their current status, interval, next run time, and associated project.*
20
+
21
+ ![Schedule detail sheet showing configuration and firing history](../screengrabs/schedules-detail.png)
22
+ *The schedule detail sheet shows the full configuration, execution statistics, and a chronological firing history with results from each run.*
23
+
24
+ ![Schedule edit dialog with name, prompt, interval, runtime, and profile fields](../screengrabs/schedules-edit-form.png)
25
+ *The edit dialog lets you modify a schedule's name, prompt, interval, runtime provider, and agent profile without recreating it.*
20
26
 
21
27
  ## Key Features
22
28
 
23
- ### Preset Intervals
24
- Choose from six built-in interval presets for common scheduling patterns: every 5 minutes, 15 minutes, 30 minutes, hourly, every 2 hours, or daily at 9 AM. Presets cover the most common automation cadences without requiring manual configuration.
29
+ ### Schedule Management
30
+ Create, edit, pause, resume, and delete schedules from a single list view. Each schedule captures a complete execution context: a descriptive name, the prompt to send to the agent, the execution interval, a project for scoping, the provider runtime, and the agent profile that governs behavior. Schedules persist in the database and survive server restarts.
25
31
 
26
- ### Custom Intervals
27
- Define custom intervals beyond the presets using the interval parser. Specify any duration to match your exact automation needs, from rapid polling to weekly recurring tasks.
32
+ ### Schedule Editing
33
+ Edit any schedule after creation using the edit dialog. Update the schedule name, prompt text, execution interval, runtime provider (Claude or Codex), and agent profile without deleting and recreating the schedule. All changes take effect on the next firing.
28
34
 
29
- ### Schedule Configuration
30
- Each schedule captures a complete execution context: a descriptive name, the execution interval, the prompt to send to the agent, the project context for scoping, the provider runtime (Claude or Codex), and the agent profile that governs behavior.
35
+ ### Firing History
36
+ Every schedule firing creates a tracked child task. The detail view shows a chronological history of all past executions with their results, making it easy to audit what the agent did on each run and spot patterns over time.
31
37
 
32
- ### Scheduler Engine
33
- The scheduler engine runs as a background process initialized via the Next.js instrumentation hook. It tracks all active schedules, calculates next run times, triggers executions on cadence, and manages the lifecycle of each schedule through active, paused, and completed states.
38
+ ### Flexible Intervals
39
+ Choose from six built-in presets (every 5 minutes, 15 minutes, 30 minutes, hourly, every 2 hours, or daily at 9 AM) or define a custom interval. Advanced users can enter standard 5-field cron expressions for precise control. Human-friendly shorthand like `5m`, `2h`, or `1d` is also accepted.
34
40
 
35
- ### Autonomous Loop Execution
36
- Autonomous loops extend scheduled execution with intelligent stop conditions. Four stop condition types are available: max iterations (stop after N runs), time limit (stop after a duration), goal achieved (agent determines the objective is met), and error threshold (stop after too many failures). The loop executor passes iteration context between runs so the agent can build on previous results.
41
+ ### Runtime and Profile Selection
42
+ Choose which AI provider runtime (Claude or Codex) and which agent profile each schedule uses. This lets you match the right model and behavioral profile to each automation task, whether it needs a code reviewer, researcher, or general assistant.
37
43
 
38
44
  ### Pause and Resume
39
- Schedules can be paused and resumed without losing their configuration or execution history. Pausing a schedule suspends future runs while preserving the next-run calculation, so resuming picks up right where it left off.
45
+ Suspend a schedule without losing its configuration or execution history. Pausing stops future runs while preserving the next-run calculation, so resuming picks up right where it left off.
40
46
 
41
47
  ## How To
42
48
 
43
- ### Create a Recurring Schedule
44
- 1. Navigate to `/schedules` from the sidebar under the **Manage** group.
49
+ ### Create a New Schedule
50
+ 1. Navigate to **Schedules** from the sidebar under the Manage group.
45
51
  2. Click the **Create Schedule** button to open the creation form.
46
52
  3. Enter a descriptive name for the schedule.
47
- 4. Select an interval from the presets (5min, 15min, 30min, hourly, 2h, daily 9AM) or define a custom interval.
53
+ 4. Select an interval from the presets or define a custom interval.
48
54
  5. Write the prompt that the agent will execute on each run.
49
55
  6. Optionally select a project for context scoping.
50
56
  7. Choose the provider runtime and agent profile.
51
57
  8. Save the schedule. It begins executing on the configured cadence.
52
58
 
53
- ### Set Up an Autonomous Loop
54
- 1. Create a schedule with your desired prompt and interval.
55
- 2. Configure one or more stop conditions: set a max iteration count, a time limit, a goal description, or an error threshold.
56
- 3. Start the schedule. The loop executor passes context from each iteration to the next.
57
- 4. The loop automatically stops when any stop condition is met.
59
+ ### Edit an Existing Schedule
60
+ 1. Open the schedules list at **Schedules**.
61
+ 2. Select a schedule to open its detail view.
62
+ 3. Click the **Edit** button to open the edit dialog.
63
+ 4. Modify any combination of name, prompt, interval, runtime, or agent profile.
64
+ 5. Save your changes. They take effect on the next scheduled firing.
58
65
 
59
- ### Pause or Resume a Schedule
60
- 1. Open the schedules list at `/schedules`.
66
+ ### Pause and Resume a Schedule
67
+ 1. Open the schedules list at **Schedules**.
61
68
  2. Locate the schedule you want to control.
62
69
  3. Click the pause button to suspend future executions, or the resume button to reactivate a paused schedule.
63
- 4. The schedule status updates to reflect the current state.
70
+ 4. The schedule status updates immediately and the list reflects the new state.
64
71
 
65
72
  ## Related
66
- - [Monitoring](./monitoring.md)
67
- - [Profiles](./profiles.md)
68
- - [Cost & Usage](./cost-usage.md)
73
+ - [Profiles](./profiles.md) — Agent profiles used by schedule firings
74
+ - [Monitor](./monitoring.md) — View execution logs from schedule firings