stagent 0.6.3 → 0.8.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.
- package/README.md +21 -2
- package/dist/cli.js +226 -1
- package/docs/.coverage-gaps.json +66 -16
- package/docs/.last-generated +1 -1
- package/docs/features/dashboard-kanban.md +13 -7
- package/docs/features/settings.md +15 -3
- package/docs/features/tables.md +122 -0
- package/docs/index.md +3 -2
- package/docs/journeys/developer.md +26 -16
- package/docs/journeys/personal-use.md +23 -9
- package/docs/journeys/power-user.md +40 -14
- package/docs/journeys/work-use.md +43 -15
- package/docs/manifest.json +27 -17
- package/package.json +3 -1
- package/src/app/api/chat/entities/search/route.ts +12 -3
- package/src/app/api/projects/[id]/route.ts +37 -0
- package/src/app/api/projects/__tests__/delete-project.test.ts +12 -0
- package/src/app/api/snapshots/[id]/restore/route.ts +62 -0
- package/src/app/api/snapshots/[id]/route.ts +44 -0
- package/src/app/api/snapshots/route.ts +54 -0
- package/src/app/api/snapshots/settings/route.ts +67 -0
- package/src/app/api/tables/[id]/charts/[chartId]/route.ts +89 -0
- package/src/app/api/tables/[id]/charts/route.ts +72 -0
- package/src/app/api/tables/[id]/columns/route.ts +70 -0
- package/src/app/api/tables/[id]/export/route.ts +94 -0
- package/src/app/api/tables/[id]/history/route.ts +15 -0
- package/src/app/api/tables/[id]/import/route.ts +111 -0
- package/src/app/api/tables/[id]/route.ts +86 -0
- package/src/app/api/tables/[id]/rows/[rowId]/history/route.ts +32 -0
- package/src/app/api/tables/[id]/rows/[rowId]/route.ts +51 -0
- package/src/app/api/tables/[id]/rows/route.ts +101 -0
- package/src/app/api/tables/[id]/triggers/[triggerId]/route.ts +65 -0
- package/src/app/api/tables/[id]/triggers/route.ts +122 -0
- package/src/app/api/tables/route.ts +65 -0
- package/src/app/api/tables/templates/route.ts +92 -0
- package/src/app/globals.css +14 -0
- package/src/app/settings/page.tsx +2 -0
- package/src/app/tables/[id]/page.tsx +67 -0
- package/src/app/tables/page.tsx +21 -0
- package/src/app/tables/templates/page.tsx +19 -0
- package/src/components/book/book-reader.tsx +62 -9
- package/src/components/book/content-blocks.tsx +6 -1
- package/src/components/chat/chat-table-result.tsx +139 -0
- package/src/components/documents/document-browser.tsx +1 -1
- package/src/components/projects/project-form-sheet.tsx +3 -27
- package/src/components/schedules/schedule-form.tsx +5 -27
- package/src/components/settings/data-management-section.tsx +17 -12
- package/src/components/settings/database-snapshots-section.tsx +469 -0
- package/src/components/shared/app-sidebar.tsx +2 -0
- package/src/components/shared/document-picker-sheet.tsx +214 -11
- package/src/components/tables/table-browser.tsx +234 -0
- package/src/components/tables/table-cell-editor.tsx +226 -0
- package/src/components/tables/table-chart-builder.tsx +288 -0
- package/src/components/tables/table-chart-view.tsx +146 -0
- package/src/components/tables/table-column-header.tsx +103 -0
- package/src/components/tables/table-column-sheet.tsx +331 -0
- package/src/components/tables/table-create-sheet.tsx +240 -0
- package/src/components/tables/table-detail-sheet.tsx +144 -0
- package/src/components/tables/table-detail-tabs.tsx +278 -0
- package/src/components/tables/table-grid.tsx +61 -0
- package/src/components/tables/table-history-tab.tsx +148 -0
- package/src/components/tables/table-import-wizard.tsx +542 -0
- package/src/components/tables/table-list-table.tsx +95 -0
- package/src/components/tables/table-relation-combobox.tsx +217 -0
- package/src/components/tables/table-row-sheet.tsx +271 -0
- package/src/components/tables/table-spreadsheet.tsx +394 -0
- package/src/components/tables/table-template-gallery.tsx +162 -0
- package/src/components/tables/table-template-preview.tsx +219 -0
- package/src/components/tables/table-toolbar.tsx +79 -0
- package/src/components/tables/table-triggers-tab.tsx +446 -0
- package/src/components/tables/types.ts +6 -0
- package/src/components/tables/use-spreadsheet-keys.ts +171 -0
- package/src/components/tables/utils.ts +29 -0
- package/src/components/tasks/task-create-panel.tsx +5 -31
- package/src/components/tasks/task-edit-dialog.tsx +5 -27
- package/src/components/workflows/workflow-form-view.tsx +11 -35
- package/src/components/workflows/workflow-status-view.tsx +1 -1
- package/src/instrumentation.ts +3 -0
- package/src/lib/agents/__tests__/claude-agent.test.ts +5 -1
- package/src/lib/agents/claude-agent.ts +3 -1
- package/src/lib/agents/profiles/builtins/document-writer/SKILL.md +23 -0
- package/src/lib/agents/profiles/builtins/technical-writer/SKILL.md +10 -0
- package/src/lib/agents/profiles/builtins/technical-writer/profile.yaml +1 -1
- package/src/lib/agents/runtime/anthropic-direct.ts +29 -0
- package/src/lib/agents/runtime/openai-direct.ts +29 -0
- package/src/lib/book/chapter-generator.ts +81 -5
- package/src/lib/book/chapter-mapping.ts +58 -24
- package/src/lib/book/content.ts +83 -47
- package/src/lib/book/markdown-parser.ts +1 -1
- package/src/lib/book/reading-paths.ts +8 -8
- package/src/lib/book/types.ts +1 -1
- package/src/lib/book/update-detector.ts +4 -1
- package/src/lib/chat/stagent-tools.ts +2 -0
- package/src/lib/chat/tool-catalog.ts +34 -0
- package/src/lib/chat/tools/table-tools.ts +955 -0
- package/src/lib/chat/tools/workflow-tools.ts +9 -1
- package/src/lib/constants/table-status.ts +68 -0
- package/src/lib/data/__tests__/clear.test.ts +1 -1
- package/src/lib/data/clear.ts +45 -0
- package/src/lib/data/seed-data/__tests__/profiles.test.ts +28 -23
- package/src/lib/data/seed-data/conversations.ts +350 -42
- package/src/lib/data/seed-data/documents.ts +564 -591
- package/src/lib/data/seed-data/learned-context.ts +101 -22
- package/src/lib/data/seed-data/notifications.ts +344 -70
- package/src/lib/data/seed-data/profile-test-results.ts +92 -11
- package/src/lib/data/seed-data/profiles.ts +144 -46
- package/src/lib/data/seed-data/projects.ts +50 -18
- package/src/lib/data/seed-data/repo-imports.ts +28 -13
- package/src/lib/data/seed-data/schedules.ts +208 -41
- package/src/lib/data/seed-data/table-templates.ts +234 -0
- package/src/lib/data/seed-data/tasks.ts +614 -116
- package/src/lib/data/seed-data/usage-ledger.ts +182 -103
- package/src/lib/data/seed-data/user-tables.ts +203 -0
- package/src/lib/data/seed-data/views.ts +52 -7
- package/src/lib/data/seed-data/workflows.ts +231 -84
- package/src/lib/data/seed.ts +55 -14
- package/src/lib/data/tables.ts +417 -0
- package/src/lib/db/bootstrap.ts +227 -0
- package/src/lib/db/index.ts +9 -0
- package/src/lib/db/migrations/0019_add_tables_feature.sql +160 -0
- package/src/lib/db/migrations/0020_add_table_triggers.sql +19 -0
- package/src/lib/db/migrations/0021_add_row_history.sql +15 -0
- package/src/lib/db/schema.ts +368 -0
- package/src/lib/snapshots/auto-backup.ts +132 -0
- package/src/lib/snapshots/retention.ts +64 -0
- package/src/lib/snapshots/snapshot-manager.ts +429 -0
- package/src/lib/tables/computed.ts +61 -0
- package/src/lib/tables/context-builder.ts +139 -0
- package/src/lib/tables/formula-engine.ts +415 -0
- package/src/lib/tables/history.ts +115 -0
- package/src/lib/tables/import.ts +343 -0
- package/src/lib/tables/query-builder.ts +152 -0
- package/src/lib/tables/trigger-evaluator.ts +146 -0
- package/src/lib/tables/types.ts +141 -0
- package/src/lib/tables/validation.ts +119 -0
- package/src/lib/utils/stagent-paths.ts +20 -0
- package/src/lib/workflows/types.ts +1 -1
- package/tsconfig.json +3 -1
- /package/docs/features/{playbook.md → user-guide.md} +0 -0
|
@@ -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
|
|
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
|
-

|
|
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
|
-

|
|
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
|
-

|
|
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
|
-

|
|
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
|
-

|
|
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:
|
|
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
|
-

|
|
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
|
|
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
|
|
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
|
|
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
|
-

|
|
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:
|
|
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
|
+

|
|
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
|
|
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
|
-

|
|
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
|
|
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
|
|
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
|
|
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
|
-

|
|
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
|
-

|
|
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:
|
|
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
|
+

|
|
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
|
|
163
|
+
### Step 12: Schedule Automated Prompt Loops
|
|
138
164
|
|
|
139
|
-

|
|
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
|
|
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
|
|
187
|
+
### Step 14: Watch Agent Execution in Real-Time
|
|
162
188
|
|
|
163
189
|

|
|
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
|
|
199
|
+
### Step 15: Use Chat Suggested Prompts
|
|
174
200
|
|
|
175
|
-

|
|
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
|
|
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
|
|
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
|
|
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
|
-

|
|
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:
|
|
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
|
+

|
|
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
|
+

|
|
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
|
|
126
|
+
### Step 9: Review Active Workflows
|
|
99
127
|
|
|
100
128
|

|
|
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
|
|
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
|
|
151
|
+
### Step 11: Monitor Spending and Budgets
|
|
124
152
|
|
|
125
153
|

|
|
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
|
|
160
|
+
### Step 12: Analyze Cost Breakdown
|
|
133
161
|
|
|
134
162
|

|
|
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
|
|
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
|
|
183
|
+
### Step 14: Inspect Notification Details
|
|
156
184
|
|
|
157
185
|

|
|
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
|
|
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
|
-

|
|
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
|
|
206
|
+
### Step 16: Manage Schedules
|
|
179
207
|
|
|
180
208
|

|
|
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
|
|
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
|
|
package/docs/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generated": "2026-
|
|
3
|
-
"version":
|
|
2
|
+
"generated": "2026-04-03T22:00:00Z",
|
|
3
|
+
"version": 3,
|
|
4
4
|
"sections": [
|
|
5
5
|
{
|
|
6
6
|
"slug": "home-workspace",
|
|
@@ -72,6 +72,16 @@
|
|
|
72
72
|
"features": ["document-manager", "file-attachment-data-layer", "document-preprocessing", "agent-document-context", "document-output-generation"],
|
|
73
73
|
"screengrabCount": 2
|
|
74
74
|
},
|
|
75
|
+
{
|
|
76
|
+
"slug": "tables",
|
|
77
|
+
"title": "Tables",
|
|
78
|
+
"category": "feature-reference",
|
|
79
|
+
"path": "features/tables.md",
|
|
80
|
+
"route": "/tables",
|
|
81
|
+
"tags": ["tables", "structured-data", "spreadsheet", "charts", "triggers", "templates", "import", "export", "formulas"],
|
|
82
|
+
"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"],
|
|
83
|
+
"screengrabCount": 8
|
|
84
|
+
},
|
|
75
85
|
{
|
|
76
86
|
"slug": "monitoring",
|
|
77
87
|
"title": "Monitor",
|
|
@@ -118,8 +128,8 @@
|
|
|
118
128
|
"category": "feature-reference",
|
|
119
129
|
"path": "features/settings.md",
|
|
120
130
|
"route": "/settings",
|
|
121
|
-
"tags": ["settings", "authentication", "permissions", "presets", "budgets", "browser-tools", "ollama", "channels"],
|
|
122
|
-
"features": ["session-management", "tool-permission-persistence", "tool-permission-presets", "browser-use", "spend-budget-guardrails", "ollama-runtime-provider", "multi-channel-delivery", "bidirectional-channel-chat"],
|
|
131
|
+
"tags": ["settings", "authentication", "permissions", "presets", "budgets", "browser-tools", "ollama", "channels", "snapshots"],
|
|
132
|
+
"features": ["session-management", "tool-permission-persistence", "tool-permission-presets", "browser-use", "spend-budget-guardrails", "ollama-runtime-provider", "multi-channel-delivery", "bidirectional-channel-chat", "database-snapshot-backup"],
|
|
123
133
|
"screengrabCount": 9
|
|
124
134
|
},
|
|
125
135
|
{
|
|
@@ -136,7 +146,7 @@
|
|
|
136
146
|
"slug": "playbook",
|
|
137
147
|
"title": "User Guide",
|
|
138
148
|
"category": "feature-reference",
|
|
139
|
-
"path": "features/
|
|
149
|
+
"path": "features/user-guide.md",
|
|
140
150
|
"route": "/user-guide",
|
|
141
151
|
"tags": ["user-guide", "documentation", "adoption-tracking"],
|
|
142
152
|
"features": ["playbook-documentation", "documentation-adoption-tracking"],
|
|
@@ -232,8 +242,8 @@
|
|
|
232
242
|
"persona": "personal",
|
|
233
243
|
"difficulty": "beginner",
|
|
234
244
|
"path": "journeys/personal-use.md",
|
|
235
|
-
"sections": ["home-workspace", "chat", "dashboard-kanban", "projects", "schedules", "delivery-channels", "user-guide"],
|
|
236
|
-
"stepCount":
|
|
245
|
+
"sections": ["home-workspace", "chat", "dashboard-kanban", "projects", "tables", "schedules", "delivery-channels", "user-guide"],
|
|
246
|
+
"stepCount": 15
|
|
237
247
|
},
|
|
238
248
|
{
|
|
239
249
|
"slug": "work-use",
|
|
@@ -241,8 +251,8 @@
|
|
|
241
251
|
"persona": "work",
|
|
242
252
|
"difficulty": "intermediate",
|
|
243
253
|
"path": "journeys/work-use.md",
|
|
244
|
-
"sections": ["projects", "chat", "documents", "workflows", "schedules", "cost-usage", "inbox-notifications", "delivery-channels"],
|
|
245
|
-
"stepCount":
|
|
254
|
+
"sections": ["projects", "chat", "documents", "tables", "workflows", "schedules", "cost-usage", "inbox-notifications", "delivery-channels"],
|
|
255
|
+
"stepCount": 16
|
|
246
256
|
},
|
|
247
257
|
{
|
|
248
258
|
"slug": "power-user",
|
|
@@ -250,8 +260,8 @@
|
|
|
250
260
|
"persona": "power-user",
|
|
251
261
|
"difficulty": "advanced",
|
|
252
262
|
"path": "journeys/power-user.md",
|
|
253
|
-
"sections": ["dashboard-kanban", "profiles", "chat", "workflows", "schedules", "monitoring", "settings"],
|
|
254
|
-
"stepCount":
|
|
263
|
+
"sections": ["dashboard-kanban", "profiles", "chat", "workflows", "tables", "schedules", "monitoring", "settings"],
|
|
264
|
+
"stepCount": 16
|
|
255
265
|
},
|
|
256
266
|
{
|
|
257
267
|
"slug": "developer",
|
|
@@ -259,14 +269,14 @@
|
|
|
259
269
|
"persona": "developer",
|
|
260
270
|
"difficulty": "advanced",
|
|
261
271
|
"path": "journeys/developer.md",
|
|
262
|
-
"sections": ["settings", "environment", "chat", "monitoring", "profiles", "workflows", "schedules", "delivery-channels"],
|
|
263
|
-
"stepCount":
|
|
272
|
+
"sections": ["settings", "environment", "chat", "monitoring", "profiles", "tables", "workflows", "schedules", "delivery-channels"],
|
|
273
|
+
"stepCount": 15
|
|
264
274
|
}
|
|
265
275
|
],
|
|
266
276
|
"metadata": {
|
|
267
|
-
"totalDocs":
|
|
268
|
-
"totalScreengrabs":
|
|
269
|
-
"featuresCovered":
|
|
270
|
-
"appSections":
|
|
277
|
+
"totalDocs": 30,
|
|
278
|
+
"totalScreengrabs": 48,
|
|
279
|
+
"featuresCovered": 82,
|
|
280
|
+
"appSections": 16
|
|
271
281
|
}
|
|
272
282
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stagent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "AI Business Operating System — run your business with AI agents. Local-first, multi-provider, governed.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
"react-dom": "^19",
|
|
95
95
|
"react-hook-form": "^7.71.2",
|
|
96
96
|
"react-markdown": "^10.1.0",
|
|
97
|
+
"recharts": "^3.8.1",
|
|
97
98
|
"remark-gfm": "^4.0.1",
|
|
98
99
|
"sharp": "^0.34.5",
|
|
99
100
|
"smol-toml": "^1.6.1",
|
|
@@ -101,6 +102,7 @@
|
|
|
101
102
|
"sugar-high": "^1.0.0",
|
|
102
103
|
"tailwind-merge": "^3",
|
|
103
104
|
"tailwindcss": "^4",
|
|
105
|
+
"tar": "^7.5.13",
|
|
104
106
|
"tw-animate-css": "^1",
|
|
105
107
|
"typescript": "^5",
|
|
106
108
|
"zod": "^4.3.6"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NextResponse } from "next/server";
|
|
2
2
|
import { db } from "@/lib/db";
|
|
3
|
-
import { projects, tasks, workflows, documents, schedules } from "@/lib/db/schema";
|
|
3
|
+
import { projects, tasks, workflows, documents, schedules, userTables } from "@/lib/db/schema";
|
|
4
4
|
import { like, desc } from "drizzle-orm";
|
|
5
5
|
import { listProfiles } from "@/lib/agents/profiles/registry";
|
|
6
6
|
|
|
@@ -25,7 +25,7 @@ export async function GET(request: Request) {
|
|
|
25
25
|
|
|
26
26
|
const hasQuery = query.trim().length > 0;
|
|
27
27
|
const pattern = hasQuery ? `%${query}%` : "";
|
|
28
|
-
const perType = Math.max(2, Math.floor(limit /
|
|
28
|
+
const perType = Math.max(2, Math.floor(limit / 7));
|
|
29
29
|
|
|
30
30
|
const results: EntityResult[] = [];
|
|
31
31
|
|
|
@@ -45,9 +45,12 @@ export async function GET(request: Request) {
|
|
|
45
45
|
const scheduleQuery = db
|
|
46
46
|
.select({ id: schedules.id, name: schedules.name, status: schedules.status })
|
|
47
47
|
.from(schedules);
|
|
48
|
+
const tableQuery = db
|
|
49
|
+
.select({ id: userTables.id, name: userTables.name, rowCount: userTables.rowCount, source: userTables.source })
|
|
50
|
+
.from(userTables);
|
|
48
51
|
|
|
49
52
|
// Search in parallel across all entity types
|
|
50
|
-
const [projectRows, taskRows, workflowRows, documentRows, scheduleRows] =
|
|
53
|
+
const [projectRows, taskRows, workflowRows, documentRows, scheduleRows, tableRows] =
|
|
51
54
|
await Promise.all([
|
|
52
55
|
(hasQuery ? projectQuery.where(like(projects.name, pattern)) : projectQuery)
|
|
53
56
|
.orderBy(desc(projects.updatedAt))
|
|
@@ -64,6 +67,9 @@ export async function GET(request: Request) {
|
|
|
64
67
|
(hasQuery ? scheduleQuery.where(like(schedules.name, pattern)) : scheduleQuery)
|
|
65
68
|
.orderBy(desc(schedules.updatedAt))
|
|
66
69
|
.limit(perType),
|
|
70
|
+
(hasQuery ? tableQuery.where(like(userTables.name, pattern)) : tableQuery)
|
|
71
|
+
.orderBy(desc(userTables.updatedAt))
|
|
72
|
+
.limit(perType),
|
|
67
73
|
]);
|
|
68
74
|
|
|
69
75
|
for (const p of projectRows) {
|
|
@@ -81,6 +87,9 @@ export async function GET(request: Request) {
|
|
|
81
87
|
for (const s of scheduleRows) {
|
|
82
88
|
results.push({ entityType: "schedule", entityId: s.id, label: s.name, status: s.status });
|
|
83
89
|
}
|
|
90
|
+
for (const t of tableRows) {
|
|
91
|
+
results.push({ entityType: "table", entityId: t.id, label: t.name, description: `${t.rowCount ?? 0} rows · ${t.source}` });
|
|
92
|
+
}
|
|
84
93
|
|
|
85
94
|
// Search profiles in-memory (file-based registry)
|
|
86
95
|
const allProfiles = listProfiles();
|