stagent 0.6.2 → 0.7.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 (176) hide show
  1. package/README.md +21 -2
  2. package/dist/cli.js +272 -1
  3. package/docs/.coverage-gaps.json +66 -16
  4. package/docs/.last-generated +1 -1
  5. package/docs/features/dashboard-kanban.md +13 -7
  6. package/docs/features/settings.md +15 -3
  7. package/docs/features/tables.md +122 -0
  8. package/docs/index.md +3 -2
  9. package/docs/journeys/developer.md +26 -16
  10. package/docs/journeys/personal-use.md +23 -9
  11. package/docs/journeys/power-user.md +40 -14
  12. package/docs/journeys/work-use.md +43 -15
  13. package/docs/manifest.json +27 -17
  14. package/package.json +3 -2
  15. package/src/app/api/chat/entities/search/route.ts +12 -3
  16. package/src/app/api/documents/[id]/route.ts +5 -1
  17. package/src/app/api/documents/[id]/versions/route.ts +53 -0
  18. package/src/app/api/documents/route.ts +5 -1
  19. package/src/app/api/projects/[id]/documents/route.ts +124 -0
  20. package/src/app/api/projects/[id]/route.ts +72 -3
  21. package/src/app/api/projects/__tests__/delete-project.test.ts +13 -0
  22. package/src/app/api/schedules/route.ts +19 -1
  23. package/src/app/api/snapshots/[id]/restore/route.ts +62 -0
  24. package/src/app/api/snapshots/[id]/route.ts +44 -0
  25. package/src/app/api/snapshots/route.ts +54 -0
  26. package/src/app/api/snapshots/settings/route.ts +67 -0
  27. package/src/app/api/tables/[id]/charts/[chartId]/route.ts +89 -0
  28. package/src/app/api/tables/[id]/charts/route.ts +72 -0
  29. package/src/app/api/tables/[id]/columns/route.ts +70 -0
  30. package/src/app/api/tables/[id]/export/route.ts +94 -0
  31. package/src/app/api/tables/[id]/history/route.ts +15 -0
  32. package/src/app/api/tables/[id]/import/route.ts +111 -0
  33. package/src/app/api/tables/[id]/route.ts +86 -0
  34. package/src/app/api/tables/[id]/rows/[rowId]/history/route.ts +32 -0
  35. package/src/app/api/tables/[id]/rows/[rowId]/route.ts +51 -0
  36. package/src/app/api/tables/[id]/rows/route.ts +101 -0
  37. package/src/app/api/tables/[id]/triggers/[triggerId]/route.ts +65 -0
  38. package/src/app/api/tables/[id]/triggers/route.ts +122 -0
  39. package/src/app/api/tables/route.ts +65 -0
  40. package/src/app/api/tables/templates/route.ts +92 -0
  41. package/src/app/api/tasks/[id]/route.ts +37 -2
  42. package/src/app/api/tasks/[id]/siblings/route.ts +48 -0
  43. package/src/app/api/tasks/route.ts +8 -9
  44. package/src/app/api/workflows/[id]/documents/route.ts +209 -0
  45. package/src/app/api/workflows/[id]/execute/route.ts +6 -2
  46. package/src/app/api/workflows/[id]/route.ts +16 -3
  47. package/src/app/api/workflows/[id]/status/route.ts +18 -2
  48. package/src/app/api/workflows/route.ts +13 -2
  49. package/src/app/documents/page.tsx +5 -1
  50. package/src/app/layout.tsx +0 -1
  51. package/src/app/manifest.ts +3 -3
  52. package/src/app/projects/[id]/page.tsx +62 -2
  53. package/src/app/settings/page.tsx +2 -0
  54. package/src/app/tables/[id]/page.tsx +67 -0
  55. package/src/app/tables/page.tsx +21 -0
  56. package/src/app/tables/templates/page.tsx +19 -0
  57. package/src/components/chat/chat-table-result.tsx +139 -0
  58. package/src/components/documents/document-browser.tsx +1 -1
  59. package/src/components/documents/document-chip-bar.tsx +17 -1
  60. package/src/components/documents/document-detail-view.tsx +51 -0
  61. package/src/components/documents/document-grid.tsx +5 -0
  62. package/src/components/documents/document-table.tsx +4 -0
  63. package/src/components/documents/types.ts +3 -0
  64. package/src/components/projects/project-form-sheet.tsx +109 -2
  65. package/src/components/schedules/schedule-form.tsx +91 -1
  66. package/src/components/settings/data-management-section.tsx +17 -12
  67. package/src/components/settings/database-snapshots-section.tsx +469 -0
  68. package/src/components/shared/app-sidebar.tsx +2 -0
  69. package/src/components/shared/document-picker-sheet.tsx +486 -0
  70. package/src/components/tables/table-browser.tsx +234 -0
  71. package/src/components/tables/table-cell-editor.tsx +226 -0
  72. package/src/components/tables/table-chart-builder.tsx +288 -0
  73. package/src/components/tables/table-chart-view.tsx +146 -0
  74. package/src/components/tables/table-column-header.tsx +103 -0
  75. package/src/components/tables/table-column-sheet.tsx +331 -0
  76. package/src/components/tables/table-create-sheet.tsx +240 -0
  77. package/src/components/tables/table-detail-sheet.tsx +144 -0
  78. package/src/components/tables/table-detail-tabs.tsx +278 -0
  79. package/src/components/tables/table-grid.tsx +61 -0
  80. package/src/components/tables/table-history-tab.tsx +148 -0
  81. package/src/components/tables/table-import-wizard.tsx +542 -0
  82. package/src/components/tables/table-list-table.tsx +95 -0
  83. package/src/components/tables/table-relation-combobox.tsx +217 -0
  84. package/src/components/tables/table-spreadsheet.tsx +499 -0
  85. package/src/components/tables/table-template-gallery.tsx +162 -0
  86. package/src/components/tables/table-template-preview.tsx +219 -0
  87. package/src/components/tables/table-toolbar.tsx +79 -0
  88. package/src/components/tables/table-triggers-tab.tsx +446 -0
  89. package/src/components/tables/types.ts +6 -0
  90. package/src/components/tables/use-spreadsheet-keys.ts +171 -0
  91. package/src/components/tables/utils.ts +29 -0
  92. package/src/components/tasks/task-card.tsx +8 -1
  93. package/src/components/tasks/task-create-panel.tsx +111 -14
  94. package/src/components/tasks/task-detail-view.tsx +47 -0
  95. package/src/components/tasks/task-edit-dialog.tsx +103 -2
  96. package/src/components/workflows/workflow-form-view.tsx +207 -7
  97. package/src/components/workflows/workflow-kanban-card.tsx +8 -1
  98. package/src/components/workflows/workflow-list.tsx +90 -45
  99. package/src/components/workflows/workflow-status-view.tsx +168 -23
  100. package/src/instrumentation.ts +3 -0
  101. package/src/lib/__tests__/npx-process-cwd.test.ts +17 -2
  102. package/src/lib/agents/__tests__/claude-agent.test.ts +5 -1
  103. package/src/lib/agents/claude-agent.ts +3 -1
  104. package/src/lib/agents/profiles/registry.ts +6 -3
  105. package/src/lib/agents/runtime/anthropic-direct.ts +29 -0
  106. package/src/lib/agents/runtime/openai-direct.ts +29 -0
  107. package/src/lib/book/__tests__/chapter-slugs.test.ts +80 -0
  108. package/src/lib/book/chapter-generator.ts +4 -19
  109. package/src/lib/book/chapter-mapping.ts +17 -0
  110. package/src/lib/book/content.ts +5 -16
  111. package/src/lib/book/update-detector.ts +3 -16
  112. package/src/lib/chat/engine.ts +1 -0
  113. package/src/lib/chat/stagent-tools.ts +2 -0
  114. package/src/lib/chat/system-prompt.ts +9 -1
  115. package/src/lib/chat/tool-catalog.ts +35 -0
  116. package/src/lib/chat/tools/settings-tools.ts +109 -0
  117. package/src/lib/chat/tools/table-tools.ts +955 -0
  118. package/src/lib/chat/tools/workflow-tools.ts +145 -2
  119. package/src/lib/constants/table-status.ts +68 -0
  120. package/src/lib/data/__tests__/clear.test.ts +1 -1
  121. package/src/lib/data/clear.ts +57 -0
  122. package/src/lib/data/seed-data/__tests__/profiles.test.ts +28 -23
  123. package/src/lib/data/seed-data/conversations.ts +350 -42
  124. package/src/lib/data/seed-data/documents.ts +564 -591
  125. package/src/lib/data/seed-data/learned-context.ts +101 -22
  126. package/src/lib/data/seed-data/notifications.ts +344 -70
  127. package/src/lib/data/seed-data/profile-test-results.ts +92 -11
  128. package/src/lib/data/seed-data/profiles.ts +144 -46
  129. package/src/lib/data/seed-data/projects.ts +50 -18
  130. package/src/lib/data/seed-data/repo-imports.ts +28 -13
  131. package/src/lib/data/seed-data/schedules.ts +208 -41
  132. package/src/lib/data/seed-data/table-templates.ts +234 -0
  133. package/src/lib/data/seed-data/tasks.ts +614 -116
  134. package/src/lib/data/seed-data/usage-ledger.ts +182 -103
  135. package/src/lib/data/seed-data/user-tables.ts +203 -0
  136. package/src/lib/data/seed-data/views.ts +52 -7
  137. package/src/lib/data/seed-data/workflows.ts +231 -84
  138. package/src/lib/data/seed.ts +55 -14
  139. package/src/lib/data/tables.ts +417 -0
  140. package/src/lib/db/bootstrap.ts +275 -0
  141. package/src/lib/db/index.ts +9 -0
  142. package/src/lib/db/migrations/0016_add_workflow_document_inputs.sql +13 -0
  143. package/src/lib/db/migrations/0017_add_document_picker_tables.sql +25 -0
  144. package/src/lib/db/migrations/0018_add_workflow_run_number.sql +2 -0
  145. package/src/lib/db/migrations/0019_add_tables_feature.sql +160 -0
  146. package/src/lib/db/migrations/0020_add_table_triggers.sql +19 -0
  147. package/src/lib/db/migrations/0021_add_row_history.sql +15 -0
  148. package/src/lib/db/schema.ts +445 -0
  149. package/src/lib/docs/reader.ts +2 -3
  150. package/src/lib/documents/context-builder.ts +75 -2
  151. package/src/lib/documents/document-resolver.ts +119 -0
  152. package/src/lib/documents/processors/spreadsheet.ts +2 -1
  153. package/src/lib/schedules/scheduler.ts +31 -1
  154. package/src/lib/snapshots/auto-backup.ts +132 -0
  155. package/src/lib/snapshots/retention.ts +64 -0
  156. package/src/lib/snapshots/snapshot-manager.ts +429 -0
  157. package/src/lib/tables/computed.ts +61 -0
  158. package/src/lib/tables/context-builder.ts +139 -0
  159. package/src/lib/tables/formula-engine.ts +415 -0
  160. package/src/lib/tables/history.ts +115 -0
  161. package/src/lib/tables/import.ts +343 -0
  162. package/src/lib/tables/query-builder.ts +152 -0
  163. package/src/lib/tables/trigger-evaluator.ts +146 -0
  164. package/src/lib/tables/types.ts +141 -0
  165. package/src/lib/tables/validation.ts +119 -0
  166. package/src/lib/utils/app-root.ts +20 -0
  167. package/src/lib/utils/stagent-paths.ts +20 -0
  168. package/src/lib/validators/__tests__/task.test.ts +43 -10
  169. package/src/lib/validators/task.ts +7 -1
  170. package/src/lib/workflows/blueprints/registry.ts +3 -3
  171. package/src/lib/workflows/engine.ts +24 -8
  172. package/src/lib/workflows/types.ts +14 -0
  173. package/tsconfig.json +3 -1
  174. package/public/icon.svg +0 -13
  175. package/src/components/tasks/file-upload.tsx +0 -120
  176. /package/docs/features/{playbook.md → user-guide.md} +0 -0
@@ -0,0 +1,122 @@
1
+ ---
2
+ title: "Tables"
3
+ category: "feature-reference"
4
+ section: "tables"
5
+ route: "/tables"
6
+ tags: [tables, structured-data, spreadsheet, charts, triggers, templates, import, export, formulas]
7
+ features: ["tables-data-layer", "tables-list-page", "tables-spreadsheet-editor", "tables-document-import", "tables-template-gallery", "tables-agent-integration", "tables-chat-queries", "tables-computed-columns", "tables-cross-joins", "tables-agent-charts", "tables-workflow-triggers", "tables-nl-creation", "tables-export", "tables-versioning"]
8
+ screengrabCount: 8
9
+ lastUpdated: "2026-04-03"
10
+ ---
11
+
12
+ # Tables
13
+
14
+ Tables is Stagent's structured data system -- a built-in spreadsheet-meets-database that lets you organize business data, track metrics, and build lightweight operational workflows without leaving the platform. Create tables from scratch, import from files, or let an agent build one from a plain-language description. Each table supports inline editing, computed columns, charts, automated triggers, and full agent access so your AI assistants can query, update, and act on your data.
15
+
16
+ ## Screenshots
17
+
18
+ ![Tables list view](../screengrabs/tables-list.png)
19
+ *Tables list view with search, filters, and table/grid toggle*
20
+
21
+ ![Spreadsheet editor](../screengrabs/tables-detail.png)
22
+ *Spreadsheet editor with inline cell editing and keyboard navigation*
23
+
24
+ ![Charts tab](../screengrabs/tables-detail-charts.png)
25
+ *Charts tab showing visual data summaries (bar, line, pie, scatter)*
26
+
27
+ ![Triggers tab](../screengrabs/tables-detail-triggers.png)
28
+ *Triggers tab for setting up automated actions based on data changes*
29
+
30
+ ![Details tab](../screengrabs/tables-detail-details.png)
31
+ *Details tab displaying table metadata, column definitions, and settings*
32
+
33
+ ![Template gallery](../screengrabs/tables-templates.png)
34
+ *Template gallery with categorized starter tables for common use cases*
35
+
36
+ ## Key Features
37
+
38
+ ### Table and Grid Views
39
+ Browse all your tables from the `/tables` list page. Toggle between a compact table view and a visual grid view. Use the filter bar to narrow by category or search by name. Click any table to open it.
40
+
41
+ ### Create Tables
42
+ Open the create dialog to define a new table with a name, description, and columns. The inline column builder lets you set each column's name, type, and whether it is required -- all before the table is saved. Supported column types include text, number, date, boolean, select (dropdown), URL, email, and computed.
43
+
44
+ ### Spreadsheet Editor
45
+ The table detail page at `/tables/[id]` is a full spreadsheet editor. Click any cell to edit it inline. Navigation follows familiar keyboard conventions -- arrow keys move between cells, Enter commits an edit, Escape cancels. Each column renders with a type-aware editor: date pickers for dates, checkboxes for booleans, dropdowns for select columns, and validated inputs for URLs and emails. Changes save optimistically so the interface stays fast.
46
+
47
+ ### Computed Columns
48
+ Add columns with formulas that calculate values from other columns. The formula engine supports 12 built-in functions (SUM, AVG, MIN, MAX, COUNT, IF, CONCAT, and more). Formulas update automatically when referenced data changes, and circular references are detected and blocked.
49
+
50
+ ### Document Import
51
+ Import data from existing files using the four-step import wizard. Upload a CSV, XLSX, or TSV file, preview the extracted data, review auto-inferred column types, then confirm to create a new table or append rows to an existing one. Column types are detected automatically based on the data content.
52
+
53
+ ### Template Gallery
54
+ Browse the template gallery at `/tables/templates` for ready-made table structures organized by category. Preview any template to see its columns and sample data, then clone it into your workspace with one click. Templates cover common business needs -- CRMs, project trackers, inventory lists, and more.
55
+
56
+ ### Charts
57
+ Visualize table data directly from the Charts tab. Build bar, line, pie, or scatter charts by choosing columns for axes and series. Charts are saved alongside the table and update as data changes.
58
+
59
+ ### Workflow Triggers
60
+ Set up automated triggers from the Triggers tab. Define conditions (e.g., "when Status changes to Done") and link them to workflows or agent tasks. The trigger evaluator watches for matching row changes and fires the configured action automatically.
61
+
62
+ ### Cross-Table Relations
63
+ Link rows between tables using relation columns. A searchable combobox lets you pick rows from a target table, creating a live reference. This is useful for connecting related data -- linking contacts to companies, tasks to projects, or orders to products.
64
+
65
+ ### Agent Integration
66
+ Agents have full read-write access to your tables. During task execution, agents can list tables, query rows with filters, aggregate data, insert or update rows, and create new tables. This means you can ask an agent to "summarize Q1 revenue from the Sales table" or "add a row to the Inventory tracker" and it will work directly with your structured data.
67
+
68
+ ### Natural-Language Table Creation
69
+ Ask an agent to create a table by describing what you need in plain language. For example, "create a table to track job applicants with name, email, resume link, stage, and rating" will produce a fully structured table with appropriate column types.
70
+
71
+ ### Export
72
+ Export any table to CSV, XLSX, or JSON. Use export to share data with external tools, create backups, or feed downstream processes.
73
+
74
+ ### Row History and Versioning
75
+ Every row edit is tracked. The History tab shows a timeline of changes, and you can roll back any row to a previous version if a mistake is made.
76
+
77
+ ## How To
78
+
79
+ ### Create a Table from Scratch
80
+ 1. Navigate to `/tables` and click "New Table."
81
+ 2. Enter a name and optional description.
82
+ 3. Add columns using the inline column builder -- set a name, choose a type, and mark required columns.
83
+ 4. Click "Create" to save the table.
84
+ 5. Start adding rows directly in the spreadsheet editor.
85
+
86
+ ### Import Data from a File
87
+ 1. From the tables list, click "Import."
88
+ 2. Upload a CSV, XLSX, or TSV file.
89
+ 3. Preview the extracted rows and review the auto-detected column types.
90
+ 4. Adjust column names or types if needed.
91
+ 5. Confirm to create the table with your imported data.
92
+
93
+ ### Create a Table from a Template
94
+ 1. Go to `/tables/templates`.
95
+ 2. Browse categories or search for a template.
96
+ 3. Click a template card to preview its structure and sample data.
97
+ 4. Click "Use Template" to clone it into your workspace.
98
+
99
+ ### Add a Chart
100
+ 1. Open a table and switch to the Charts tab.
101
+ 2. Click "Add Chart" and choose a chart type (bar, line, pie, or scatter).
102
+ 3. Select the columns for axes and data series.
103
+ 4. Save the chart -- it will update automatically as table data changes.
104
+
105
+ ### Set Up a Trigger
106
+ 1. Open a table and switch to the Triggers tab.
107
+ 2. Click "Add Trigger."
108
+ 3. Define the condition (e.g., column value equals, changes to, or exceeds a threshold).
109
+ 4. Choose the action -- run a workflow or start an agent task.
110
+ 5. Save the trigger. It will fire automatically when matching row changes occur.
111
+
112
+ ### Ask an Agent to Work with Table Data
113
+ 1. Create a task and mention a table by name in the prompt (e.g., "Query the Sales Pipeline table for deals closing this month").
114
+ 2. The agent will use its table tools to read, filter, aggregate, or update the data as needed.
115
+ 3. Results appear in the task output, and any row changes are reflected in the table immediately.
116
+
117
+ ## Related
118
+
119
+ - [Documents](./documents.md) -- Upload files and attach them to tasks for agent context.
120
+ - [Workflows](./workflows.md) -- Automate multi-step processes that can read from and write to tables.
121
+ - [Schedules](./schedules.md) -- Run recurring tasks that interact with table data on a schedule.
122
+ - [Profiles](./profiles.md) -- Agent profiles that determine how agents interact with your data.
package/docs/index.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "Stagent Documentation"
3
3
  category: "index"
4
- lastUpdated: "2026-03-31"
4
+ lastUpdated: "2026-04-03"
5
5
  ---
6
6
 
7
7
  # Stagent Documentation
@@ -39,13 +39,14 @@ Stagent is an AI Business Operating System that lets solo founders and micro-tea
39
39
  | [Projects](./features/projects.md) | `/projects` | Workspaces, task grouping, file context |
40
40
  | [Workflows](./features/workflows.md) | `/workflows` | 6 patterns, blueprints, business-function templates |
41
41
  | [Documents](./features/documents.md) | `/documents` | Upload, preprocessing, agent context |
42
+ | [Tables](./features/tables.md) | `/tables` | Spreadsheet editor, charts, triggers, templates, import/export |
42
43
  | [Monitor](./features/monitoring.md) | `/monitor` | Activity logs, execution tracking |
43
44
  | [Profiles](./features/profiles.md) | `/profiles` | Agent profiles, business roles, auto-routing |
44
45
  | [Schedules](./features/schedules.md) | `/schedules` | Heartbeat, NLP intervals, delivery channels |
45
46
  | [Cost & Usage](./features/cost-usage.md) | `/costs` | Spend tracking, budget guardrails |
46
47
  | [Delivery Channels](./features/delivery-channels.md) | `/settings` | Slack, Telegram, webhook, bidirectional chat |
47
48
  | [Settings](./features/settings.md) | `/settings` | Auth, Ollama, channels, permissions, budgets |
48
- | [User Guide](./features/playbook.md) | `/user-guide` | In-app documentation and adoption tracking |
49
+ | [User Guide](./features/user-guide.md) | `/user-guide` | In-app documentation and adoption tracking |
49
50
 
50
51
  ## Cross-Cutting Features
51
52
 
@@ -4,9 +4,9 @@ category: "user-journey"
4
4
  persona: "developer"
5
5
  difficulty: "advanced"
6
6
  estimatedTime: "30 minutes"
7
- sections: ["settings", "environment", "chat", "monitoring", "profiles", "workflows", "schedules", "delivery-channels"]
8
- tags: ["advanced", "developer", "settings", "environment", "cli", "api", "monitoring", "profiles", "ollama", "channels", "handoffs", "memory"]
9
- lastUpdated: "2026-03-31"
7
+ sections: ["settings", "environment", "chat", "monitoring", "profiles", "workflows", "tables", "schedules", "delivery-channels"]
8
+ tags: ["advanced", "developer", "settings", "environment", "cli", "api", "monitoring", "profiles", "ollama", "channels", "handoffs", "memory", "tables"]
9
+ lastUpdated: "2026-04-03"
10
10
  ---
11
11
 
12
12
  # Developer Guide
@@ -41,7 +41,7 @@ Riley starts at the Settings page. The first priority is getting authentication
41
41
 
42
42
  Riley sets up Ollama as the fifth runtime adapter for private, zero-cost execution.
43
43
 
44
- ![Ollama section with local models listed](../screengrabs/settings-ollama-connected.png)
44
+ ![Settings Providers and Runtimes section with authentication and runtime config](../screengrabs/settings-auth.png)
45
45
 
46
46
  1. Install Ollama from [ollama.com](https://ollama.com) and pull models: `ollama pull llama3 && ollama pull qwen3`
47
47
  2. Scroll to the **Ollama** section in Settings
@@ -55,21 +55,15 @@ Riley sets up Ollama as the fifth runtime adapter for private, zero-cost executi
55
55
 
56
56
  Riley sets up Slack and Telegram as delivery channels for schedule notifications and bidirectional chat.
57
57
 
58
- ![Delivery channels with Slack configuration form](../screengrabs/settings-channels-add-form.png)
58
+ ![Settings data management section](../screengrabs/settings-data.png)
59
59
 
60
60
  1. Scroll to **Delivery Channels** in Settings
61
61
  2. Click **+ Add Channel** and select **Slack**
62
62
  3. Enter the webhook URL, bot token (xoxb-), signing secret, and channel ID
63
63
  4. Click **Create Channel** then **Test** to verify delivery
64
64
  5. Toggle **Chat** on for bidirectional mode
65
-
66
- ![Telegram channel configuration](../screengrabs/settings-channels-telegram-form.png)
67
-
68
65
  6. Add a second channel for **Telegram** with bot token and chat ID
69
66
  7. Test and enable Chat mode
70
-
71
- ![Webhook channel configuration](../screengrabs/settings-channels-webhook-form.png)
72
-
73
67
  8. Add a **Webhook** channel for custom integrations (outbound only)
74
68
 
75
69
  > **Tip:** The channel gateway architecture is straightforward: for local development, Stagent includes a built-in poller that checks Slack (`conversations.history` API) and Telegram (`getUpdates` API) every 5 seconds. No public URL or webhook registration needed. The poller only polls channels with both Chat and Active toggles on. Channel conversations flow through the same chat engine as web conversations, including tool access and permission handling.
@@ -122,7 +116,7 @@ Riley switches to the Environment page to understand the control plane.
122
116
 
123
117
  Riley traces the request lifecycle from input to streamed response across both web and channel interfaces.
124
118
 
125
- ![Active chat conversation with streamed response](../screengrabs/chat-conversation.png)
119
+ ![Chat interface with conversation thread and streamed response](../screengrabs/chat-detail.png)
126
120
 
127
121
  1. Open **Chat** and start a conversation
128
122
  2. Trace the API flow: `POST /api/chat` (SSE stream), `GET/POST/DELETE /api/chat/conversations`, `GET /api/models`
@@ -172,9 +166,25 @@ Riley reviews the episodic memory system that gives agents persistent knowledge.
172
166
  3. Review total duration and aggregate token usage
173
167
  4. Note handoff steps where one agent delegated to another mid-workflow
174
168
 
175
- ### Step 12: Review Schedule Configuration
169
+ ### Step 12: Explore the Tables API and Agent Tools
170
+
171
+ Riley reviews the tables subsystem -- 12 agent tools that let AI agents create, query, and mutate structured data via chat or task execution.
172
+
173
+ 1. Review the tables API routes:
174
+ - `GET/POST /api/tables` -- list and create tables
175
+ - `GET/PATCH/DELETE /api/tables/[id]` -- single table CRUD
176
+ - `GET/POST /api/tables/[id]/charts` -- chart management per table
177
+ - `GET/POST /api/tables/[id]/triggers` -- workflow triggers attached to table events
178
+ 2. Inspect the 12 agent tools registered for tables: `create_table`, `list_tables`, `get_table`, `update_table`, `delete_table`, `add_row`, `update_row`, `delete_row`, `query_table`, `add_column`, `create_chart`, `create_trigger`
179
+ 3. Test from Chat: ask "Create a table called Deploy Log with columns: service, version, status, deployed_at" and verify the agent calls the `create_table` tool
180
+ 4. Verify that table mutations from agent tools appear in the web UI in real time
181
+ 5. Check that workflow triggers fire correctly when an agent adds or updates a row via tool call
182
+
183
+ > **Tip:** The tables agent tools enable a powerful pattern: agents can build and populate structured datasets during task execution, then other agents or workflows can query those tables for downstream decisions. This turns tables into a shared knowledge layer between agents.
184
+
185
+ ### Step 13: Review Schedule Configuration
176
186
 
177
- ![Schedule detail sheet showing configuration and firing history](../screengrabs/schedules-detail.png)
187
+ ![Schedules list showing active and configured schedules](../screengrabs/schedules-list.png)
178
188
 
179
189
  1. Select a schedule to open its detail sheet
180
190
  2. Review configuration: prompt, interval, heartbeat checklist, delivery channels
@@ -183,7 +193,7 @@ Riley reviews the episodic memory system that gives agents persistent knowledge.
183
193
 
184
194
  > **Tip:** The scheduler engine runs via the Next.js `instrumentation.ts` register hook. The interval parser supports both natural language and standard cron expressions.
185
195
 
186
- ### Step 13: Build and Test the CLI
196
+ ### Step 14: Build and Test the CLI
187
197
 
188
198
  Riley builds the CLI for scripted operations and CI/CD integration.
189
199
 
@@ -194,7 +204,7 @@ Riley builds the CLI for scripted operations and CI/CD integration.
194
204
  3. Test CRUD operations: `node dist/cli.js projects list`, `node dist/cli.js tasks create --title "CLI test"`
195
205
  4. Verify CLI-created entities appear in the web UI (shared SQLite database)
196
206
 
197
- ### Step 14: Verify Platform Health
207
+ ### Step 15: Verify Platform Health
198
208
 
199
209
  Riley performs a final platform health check.
200
210
 
@@ -4,9 +4,9 @@ category: "user-journey"
4
4
  persona: "personal"
5
5
  difficulty: "beginner"
6
6
  estimatedTime: "30 minutes"
7
- sections: ["home-workspace", "dashboard-kanban", "projects", "chat", "schedules", "user-guide"]
8
- tags: ["beginner", "solo", "tasks", "kanban", "chat", "schedules", "delivery-channels"]
9
- lastUpdated: "2026-03-31"
7
+ sections: ["home-workspace", "dashboard-kanban", "projects", "chat", "tables", "schedules", "user-guide"]
8
+ tags: ["beginner", "solo", "tasks", "kanban", "chat", "tables", "schedules", "delivery-channels"]
9
+ lastUpdated: "2026-04-03"
10
10
  ---
11
11
 
12
12
  # Personal Use Guide
@@ -141,14 +141,28 @@ Alex uses the quick-edit dialog for a fast priority change.
141
141
 
142
142
  Alex clicks on a task card to open the full detail sheet.
143
143
 
144
- ![Task detail sheet showing full task information](../screengrabs/dashboard-card-detail.png)
144
+ ![Task edit dialog opened from a kanban card](../screengrabs/dashboard-card-edit.png)
145
145
 
146
146
  1. Click on any **task card** in the kanban board (not the edit icon -- the card itself)
147
147
  2. The **detail sheet** slides in from the right side of the screen
148
148
  3. Review the full **Description**, **Priority**, **Status**, **Project** assignment, and timestamps
149
149
  4. Press **Escape** or click outside the sheet to close it
150
150
 
151
- ### Step 11: Set Up a Heartbeat Schedule
151
+ ### Step 11: Track Content in a Table
152
+
153
+ Alex wants to keep a structured list of portfolio pages, their status, and target launch dates. A table is perfect for this kind of lightweight tracking.
154
+
155
+ ![Tables list view showing structured data tables](../screengrabs/tables-list.png)
156
+
157
+ 1. Click **Tables** in the sidebar under the **Work** group
158
+ 2. Click **Create Table** and enter a name: "Portfolio Pages"
159
+ 3. Add columns: **Page Name** (text), **Status** (select: Draft / In Progress / Done), **Target Date** (date)
160
+ 4. Start adding rows directly in the inline spreadsheet editor -- type into cells just like a regular spreadsheet
161
+ 5. Use the table to track which pages are done and which still need work
162
+
163
+ > **Tip:** Tables are great for any structured tracking that does not need a full project board. Content calendars, feature lists, contact directories -- anything you would put in a spreadsheet fits naturally here.
164
+
165
+ ### Step 12: Set Up a Heartbeat Schedule
152
166
 
153
167
  Alex wants Stagent to proactively check on the portfolio project every morning. A heartbeat schedule evaluates conditions before deciding whether to act -- it only creates tasks when something meaningful needs attention.
154
168
 
@@ -163,11 +177,11 @@ Alex wants Stagent to proactively check on the portfolio project every morning.
163
177
 
164
178
  > **Tip:** Heartbeat schedules are smarter than clock-driven ones -- they suppress no-op runs. If your portfolio project has no stale tasks, the heartbeat stays quiet and costs nothing.
165
179
 
166
- ### Step 12: Connect Telegram for Notifications
180
+ ### Step 13: Connect Telegram for Notifications
167
181
 
168
182
  Alex wants to receive schedule results on the go. Setting up a Telegram delivery channel takes less than two minutes.
169
183
 
170
- ![Settings delivery channels section](../screengrabs/settings-channels.png)
184
+ ![Settings page showing provider and runtime configuration](../screengrabs/settings-auth.png)
171
185
 
172
186
  1. Open **Settings** from the sidebar under **Configure**
173
187
  2. Scroll to the **Delivery Channels** section
@@ -180,7 +194,7 @@ Alex wants to receive schedule results on the go. Setting up a Telegram delivery
180
194
 
181
195
  > **Tip:** With Chat mode enabled, you can ask Stagent questions directly from Telegram. "What's the status of my portfolio project?" works just like the web chat.
182
196
 
183
- ### Step 13: Browse the User Guide
197
+ ### Step 14: Browse the User Guide
184
198
 
185
199
  Alex discovers the built-in documentation hub.
186
200
 
@@ -191,7 +205,7 @@ Alex discovers the built-in documentation hub.
191
205
  3. Check the **guided journeys** for your current skill level
192
206
  4. Use the feature grid to discover areas you have not tried yet
193
207
 
194
- ### Step 14: What's Next
208
+ ### Step 15: What's Next
195
209
 
196
210
  Alex now has a solid foundation: a project, organized tasks on a kanban board, a heartbeat schedule for proactive monitoring, and Telegram notifications for staying connected on the go. Here is where to go from here:
197
211
 
@@ -4,9 +4,9 @@ category: "user-journey"
4
4
  persona: "power-user"
5
5
  difficulty: "advanced"
6
6
  estimatedTime: "30 minutes"
7
- sections: ["dashboard-kanban", "profiles", "chat", "workflows", "schedules", "monitoring", "settings"]
8
- tags: ["advanced", "automation", "workflows", "profiles", "schedules", "monitoring", "bulk-operations", "ollama", "episodic-memory", "nlp-scheduling"]
9
- lastUpdated: "2026-03-31"
7
+ sections: ["dashboard-kanban", "profiles", "chat", "workflows", "tables", "schedules", "monitoring", "settings"]
8
+ tags: ["advanced", "automation", "workflows", "profiles", "tables", "schedules", "monitoring", "bulk-operations", "ollama", "episodic-memory", "nlp-scheduling"]
9
+ lastUpdated: "2026-04-03"
10
10
  ---
11
11
 
12
12
  # Power User Guide
@@ -63,7 +63,7 @@ Before building any automation, Sam reviews the available agent profiles. The ca
63
63
 
64
64
  Sam wants to run privacy-sensitive tasks on local models with zero API cost.
65
65
 
66
- ![Ollama connected with local models](../screengrabs/settings-ollama-connected.png)
66
+ ![Settings Providers and Runtimes section with runtime configuration](../screengrabs/settings-auth.png)
67
67
 
68
68
  1. Install Ollama from [ollama.com](https://ollama.com) and pull a model: `ollama pull llama3`
69
69
  2. Open **Settings** and scroll to the **Ollama** section
@@ -74,7 +74,7 @@ Sam wants to run privacy-sensitive tasks on local models with zero API cost.
74
74
 
75
75
  ### Step 5: Optimize Chat with Model Selection
76
76
 
77
- ![Chat model selector dropdown showing available models with cost tier indicators](../screengrabs/chat-model-selector.png)
77
+ ![Chat interface showing model selection and conversation controls](../screengrabs/chat-list.png)
78
78
 
79
79
  1. Navigate to **Chat** and click the **model selector** in the input area
80
80
  2. Review models with cost tier indicators ($ to $$$)
@@ -120,7 +120,33 @@ Sam customizes a workflow for a "Deploy & Verify" pipeline with specialized prof
120
120
  4. Click completed steps to read their full output
121
121
  5. Use the **Run Workflow** button to trigger a new execution
122
122
 
123
- ### Step 9: Batch-Manage Tasks on the Kanban
123
+ ### Step 9: Add Formula Columns and Charts to Tables
124
+
125
+ Sam tracks deployment metrics in a table and wants computed columns and visual dashboards without leaving Stagent.
126
+
127
+ ![Tables detail view with charts tab showing data visualizations](../screengrabs/tables-detail-charts.png)
128
+
129
+ 1. Open a table from the **Tables** page
130
+ 2. Click **Add Column** and select **Formula** as the column type
131
+ 3. Write a formula referencing other columns (e.g., `duration_hours / deploy_count` for average deploy time)
132
+ 4. Switch to the **Charts** tab to add visualizations -- bar, line, or pie charts built from the table data
133
+ 5. Configure chart axes and filters to highlight the metrics that matter
134
+
135
+ > **Tip:** Formula columns recalculate automatically when source data changes. Combined with workflow triggers, a table can fire a workflow step whenever a metric crosses a threshold -- for example, triggering a rollback review when error rate exceeds 5%.
136
+
137
+ ### Step 10: Attach Workflow Triggers to Table Events
138
+
139
+ Sam connects a table to the workflow engine so that row changes automatically kick off automation.
140
+
141
+ 1. Open a table and navigate to the **Triggers** tab
142
+ 2. Click **Add Trigger** and select the event type: row created, row updated, or column value changed
143
+ 3. Map the trigger to an existing workflow
144
+ 4. Configure field mappings so the workflow receives the changed row data as context
145
+ 5. Save the trigger -- new rows or edits now fire the connected workflow automatically
146
+
147
+ > **Tip:** Table triggers turn spreadsheets into event-driven automation surfaces. Sam uses them to auto-run incident postmortems whenever an incident row status changes to "Resolved."
148
+
149
+ ### Step 11: Batch-Manage Tasks on the Kanban
124
150
 
125
151
  Sam cleans up the task board using bulk select mode.
126
152
 
@@ -134,9 +160,9 @@ Sam cleans up the task board using bulk select mode.
134
160
 
135
161
  > **Tip:** After a weekend of autonomous heartbeat runs, Sam's first Monday task is always a bulk cleanup.
136
162
 
137
- ### Step 10: Schedule Automated Prompt Loops
163
+ ### Step 12: Schedule Automated Prompt Loops
138
164
 
139
- ![Schedule detail sheet showing configuration and firing history](../screengrabs/schedules-detail.png)
165
+ ![Schedules list showing active schedules and firing status](../screengrabs/schedules-list.png)
140
166
 
141
167
  1. Click on a schedule to open its detail sheet
142
168
  2. Review the **firing history** with timestamps and outcomes (including suppressed heartbeat runs)
@@ -144,7 +170,7 @@ Sam cleans up the task board using bulk select mode.
144
170
  4. Verify stop conditions and delivery channels
145
171
  5. Toggle **Pause/Resume** as needed
146
172
 
147
- ### Step 11: Leverage Episodic Memory
173
+ ### Step 13: Leverage Episodic Memory
148
174
 
149
175
  Sam notices agents are re-researching the same topics. Episodic memory lets agents retain factual knowledge across executions.
150
176
 
@@ -158,7 +184,7 @@ Sam notices agents are re-researching the same topics. Episodic memory lets agen
158
184
 
159
185
  > **Tip:** Episodic memory means a Financial Analyst profile that researches a company once can recall that research in future tasks without re-doing the work. It builds institutional knowledge automatically.
160
186
 
161
- ### Step 12: Watch Agent Execution in Real-Time
187
+ ### Step 14: Watch Agent Execution in Real-Time
162
188
 
163
189
  ![Agent monitoring dashboard showing real-time execution logs](../screengrabs/monitor-list.png)
164
190
 
@@ -170,16 +196,16 @@ Sam notices agents are re-researching the same topics. Episodic memory lets agen
170
196
 
171
197
  > **Tip:** The Monitor is Sam's operational dashboard. When something goes wrong in an autonomous loop at 3am, the execution traces are the fastest path to diagnosis.
172
198
 
173
- ### Step 13: Use Chat Suggested Prompts
199
+ ### Step 15: Use Chat Suggested Prompts
174
200
 
175
- ![Chat suggested prompts with Create tab selected](../screengrabs/chat-create-tab.png)
201
+ ![Chat interface with suggested prompt categories](../screengrabs/chat-list.png)
176
202
 
177
203
  1. Navigate to **Chat** and notice the **suggested prompt tabs** (Explore, Create, Debug, Automate)
178
204
  2. Click the **Create** tab to see prompts for creating tasks, workflows, and schedules
179
205
  3. Click a suggested prompt to populate the input
180
206
  4. Edit and send -- these prompts are optimized for the best agent responses
181
207
 
182
- ### Step 14: Chain Everything Together
208
+ ### Step 16: Chain Everything Together
183
209
 
184
210
  Sam connects the dots: profiles define *how*, workflows define *what*, schedules define *when*, Ollama handles the *cheap stuff*, episodic memory provides the *knowledge*, and delivery channels deliver the *results*.
185
211
 
@@ -195,7 +221,7 @@ Sam connects the dots: profiles define *how*, workflows define *what*, schedules
195
221
 
196
222
  > **Tip:** Sam's automation philosophy: start small, observe, then expand. Run a workflow manually three times before scheduling it. Trust builds incrementally -- and so should autonomy.
197
223
 
198
- ### Step 15: What's Next
224
+ ### Step 17: What's Next
199
225
 
200
226
  Sam's workspace is a fully autonomous operations engine. The next step is going deeper into the platform layer.
201
227
 
@@ -4,9 +4,9 @@ category: "user-journey"
4
4
  persona: "work"
5
5
  difficulty: "intermediate"
6
6
  estimatedTime: "30 minutes"
7
- sections: ["projects", "chat", "documents", "workflows", "schedules", "cost-usage", "inbox-notifications", "delivery-channels"]
8
- tags: ["intermediate", "team", "documents", "workflows", "schedules", "costs", "inbox", "channels", "handoffs"]
9
- lastUpdated: "2026-03-31"
7
+ sections: ["projects", "chat", "documents", "tables", "workflows", "schedules", "cost-usage", "inbox-notifications", "delivery-channels"]
8
+ tags: ["intermediate", "team", "documents", "tables", "workflows", "schedules", "costs", "inbox", "channels", "handoffs"]
9
+ lastUpdated: "2026-04-03"
10
10
  ---
11
11
 
12
12
  # Work Use Guide
@@ -50,7 +50,7 @@ Jordan clicks into a project to check on task progress.
50
50
 
51
51
  Rather than clicking through every page, Jordan asks Chat for a quick status update.
52
52
 
53
- ![Active chat conversation with messages and Quick Access navigation pills](../screengrabs/chat-conversation.png)
53
+ ![Chat interface with conversation thread and Quick Access navigation](../screengrabs/chat-detail.png)
54
54
 
55
55
  1. Click **Chat** in the sidebar
56
56
  2. Type a question such as "What is the status of the Q2 planning project?"
@@ -82,7 +82,35 @@ Jordan switches to grid view for a visual overview.
82
82
  2. Browse document cards with file name, type icon, and project association
83
83
  3. Toggle back to **table view** when you need to sort or filter
84
84
 
85
- ### Step 6: Browse Workflow Blueprints
85
+ ### Step 6: Create a Table from a Template
86
+
87
+ Jordan needs a structured tracker for the team's quarterly OKRs. Instead of building one from scratch, the template gallery has a ready-made option.
88
+
89
+ ![Template gallery showing pre-built table templates](../screengrabs/tables-templates.png)
90
+
91
+ 1. Click **Tables** in the sidebar under the **Work** group
92
+ 2. Click **Create Table** and browse the **Template Gallery**
93
+ 3. Select a template that fits the use case (e.g., "OKR Tracker" or "Sprint Board")
94
+ 4. Review the pre-configured columns and customize as needed
95
+ 5. Click **Create** to generate the table with the template structure
96
+
97
+ > **Tip:** Templates include pre-set column types and formulas. They save setup time and ensure the team starts with a proven structure.
98
+
99
+ ### Step 7: Import Document Data into a Table
100
+
101
+ Jordan has a CSV export from the previous quarter's performance review. Importing it into a table takes seconds.
102
+
103
+ ![Create table dialog with fields filled in](../screengrabs/tables-create-form-filled.png)
104
+
105
+ 1. From the **Tables** page, click **Create Table**
106
+ 2. Choose **Import** and select the CSV or XLSX file
107
+ 3. Review the column mapping -- Stagent auto-detects column types from the data
108
+ 4. Assign the table to the relevant project
109
+ 5. Click **Create** to import the data into a fully editable spreadsheet view
110
+
111
+ > **Tip:** Imported tables retain all their data as editable rows. You can add formula columns, charts, and workflow triggers on top of imported data.
112
+
113
+ ### Step 8: Browse Workflow Blueprints
86
114
 
87
115
  Jordan wants to set up a structured review process. The blueprint gallery now includes business-function templates alongside technical ones.
88
116
 
@@ -95,7 +123,7 @@ Jordan wants to set up a structured review process. The blueprint gallery now in
95
123
 
96
124
  > **Tip:** Business-function blueprints pair naturally with the corresponding business profiles (Marketing Strategist, Sales Researcher, Financial Analyst, etc.).
97
125
 
98
- ### Step 7: Review Active Workflows
126
+ ### Step 9: Review Active Workflows
99
127
 
100
128
  ![Workflows list with tabs showing status and step progress](../screengrabs/workflows-list.png)
101
129
 
@@ -104,7 +132,7 @@ Jordan wants to set up a structured review process. The blueprint gallery now in
104
132
  3. Click on a running workflow for step-by-step details
105
133
  4. Check for steps in a "waiting" state that may need approval
106
134
 
107
- ### Step 8: Schedule with Natural Language
135
+ ### Step 10: Schedule with Natural Language
108
136
 
109
137
  Jordan schedules a weekly status summary using plain English instead of cron syntax.
110
138
 
@@ -120,7 +148,7 @@ Jordan schedules a weekly status summary using plain English instead of cron syn
120
148
 
121
149
  > **Tip:** The interval parser understands plain English. You do not need to write cron expressions.
122
150
 
123
- ### Step 9: Monitor Spending and Budgets
151
+ ### Step 11: Monitor Spending and Budgets
124
152
 
125
153
  ![Cost and Usage dashboard showing spend metrics and budget gauges](../screengrabs/cost-usage-list.png)
126
154
 
@@ -129,7 +157,7 @@ Jordan schedules a weekly status summary using plain English instead of cron syn
129
157
  3. Check the **budget gauge** for spend cap proximity
130
158
  4. Examine per-project and per-model breakdowns
131
159
 
132
- ### Step 10: Analyze Cost Breakdown
160
+ ### Step 12: Analyze Cost Breakdown
133
161
 
134
162
  ![Cost and Usage page scrolled to show detailed usage breakdown table](../screengrabs/cost-usage-below-fold.png)
135
163
 
@@ -139,7 +167,7 @@ Jordan schedules a weekly status summary using plain English instead of cron syn
139
167
 
140
168
  > **Tip:** The breakdown table is your audit trail. Trace every dollar back to a specific task.
141
169
 
142
- ### Step 11: Review Agent Notifications and Handoffs
170
+ ### Step 13: Review Agent Notifications and Handoffs
143
171
 
144
172
  Jordan's agents have been running in the background. Some have generated handoff requests where one agent wants to delegate work to another.
145
173
 
@@ -152,7 +180,7 @@ Jordan's agents have been running in the background. Some have generated handoff
152
180
 
153
181
  > **Tip:** Agent handoffs are governed -- chain depth limits prevent infinite loops, and self-handoffs are blocked automatically.
154
182
 
155
- ### Step 12: Inspect Notification Details
183
+ ### Step 14: Inspect Notification Details
156
184
 
157
185
  ![Inbox with expanded notification showing full content and approval options](../screengrabs/inbox-expanded.png)
158
186
 
@@ -161,11 +189,11 @@ Jordan's agents have been running in the background. Some have generated handoff
161
189
  3. Choose **Approve**, **Deny**, or **Always Allow**
162
190
  4. For handoffs, approve to let the receiving agent begin work
163
191
 
164
- ### Step 13: Configure Multi-Channel Notifications
192
+ ### Step 15: Configure Multi-Channel Notifications
165
193
 
166
194
  Jordan sets up Slack so the entire team receives schedule results and important alerts.
167
195
 
168
- ![Settings delivery channels with configured channels](../screengrabs/settings-channels.png)
196
+ ![Settings page showing provider and runtime configuration](../screengrabs/settings-auth.png)
169
197
 
170
198
  1. Open **Settings** and scroll to **Delivery Channels**
171
199
  2. Click **+ Add Channel** and select **Slack**
@@ -175,7 +203,7 @@ Jordan sets up Slack so the entire team receives schedule results and important
175
203
 
176
204
  > **Tip:** With Chat enabled on Slack, anyone in the channel can message Stagent and get workspace-aware responses. This turns Slack into a team-wide AI assistant interface.
177
205
 
178
- ### Step 14: Manage Schedules
206
+ ### Step 16: Manage Schedules
179
207
 
180
208
  ![Schedules list with status indicators and next run timestamps](../screengrabs/schedules-list.png)
181
209
 
@@ -185,7 +213,7 @@ Jordan sets up Slack so the entire team receives schedule results and important
185
213
  4. Click to review firing history and generated tasks
186
214
  5. Edit or pause as needed
187
215
 
188
- ### Step 15: What's Next
216
+ ### Step 17: What's Next
189
217
 
190
218
  Jordan's working session covered team projects, documents, business-function workflows, natural language scheduling, multi-channel notifications, agent handoff approvals, and cost governance. To go deeper:
191
219