stagent 0.4.0 → 0.6.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 +67 -31
- package/dist/cli.js +151 -2
- package/docs/.coverage-gaps.json +21 -0
- package/docs/.last-generated +1 -1
- package/docs/features/agent-intelligence.md +36 -14
- package/docs/features/chat.md +53 -71
- package/docs/features/cost-usage.md +14 -10
- package/docs/features/dashboard-kanban.md +30 -13
- package/docs/features/delivery-channels.md +198 -0
- package/docs/features/design-system.md +10 -10
- package/docs/features/documents.md +8 -8
- package/docs/features/home-workspace.md +20 -15
- package/docs/features/inbox-notifications.md +22 -10
- package/docs/features/keyboard-navigation.md +11 -11
- package/docs/features/monitoring.md +1 -1
- package/docs/features/playbook.md +30 -32
- package/docs/features/profiles.md +33 -11
- package/docs/features/projects.md +2 -2
- package/docs/features/provider-runtimes.md +58 -14
- package/docs/features/schedules.md +77 -41
- package/docs/features/settings.md +134 -51
- package/docs/features/shared-components.md +7 -15
- package/docs/features/tool-permissions.md +9 -9
- package/docs/features/workflows.md +32 -21
- package/docs/getting-started.md +33 -9
- package/docs/index.md +25 -16
- package/docs/journeys/developer.md +124 -207
- package/docs/journeys/personal-use.md +70 -79
- package/docs/journeys/power-user.md +107 -151
- package/docs/journeys/work-use.md +81 -113
- package/docs/manifest.json +79 -47
- package/docs/superpowers/plans/2026-03-30-finish-in-progress-features.md +547 -0
- package/docs/superpowers/specs/2026-03-27-chat-screenshot-display-design.md +303 -0
- package/docs/use-cases/agency-operator.md +84 -0
- package/docs/use-cases/solo-founder.md +75 -0
- package/docs/why-stagent.md +59 -0
- package/package.json +12 -3
- package/src/app/api/channels/[id]/route.ts +103 -0
- package/src/app/api/channels/[id]/test/route.ts +52 -0
- package/src/app/api/channels/inbound/slack/route.ts +109 -0
- package/src/app/api/channels/inbound/telegram/poll/route.ts +128 -0
- package/src/app/api/channels/inbound/telegram/route.ts +76 -0
- package/src/app/api/channels/route.ts +71 -0
- package/src/app/api/chat/conversations/[id]/messages/route.ts +3 -2
- package/src/app/api/chat/conversations/route.ts +15 -0
- package/src/app/api/chat/entities/search/route.ts +112 -0
- package/src/app/api/documents/[id]/file/route.ts +4 -1
- package/src/app/api/environment/profiles/suggest/route.ts +19 -3
- package/src/app/api/environment/scan/route.ts +8 -1
- package/src/app/api/handoffs/[id]/route.ts +76 -0
- package/src/app/api/handoffs/route.ts +89 -0
- package/src/app/api/memory/route.ts +181 -0
- package/src/app/api/profiles/[id]/route.ts +16 -1
- package/src/app/api/profiles/[id]/test/route.ts +4 -0
- package/src/app/api/profiles/[id]/test-results/route.ts +22 -0
- package/src/app/api/profiles/[id]/test-single/route.ts +64 -0
- package/src/app/api/profiles/assist/route.ts +35 -0
- package/src/app/api/profiles/import-repo/apply-updates/route.ts +123 -0
- package/src/app/api/profiles/import-repo/check-updates/route.ts +163 -0
- package/src/app/api/profiles/import-repo/confirm/route.ts +118 -0
- package/src/app/api/profiles/import-repo/preview/route.ts +107 -0
- package/src/app/api/profiles/import-repo/route.ts +29 -0
- package/src/app/api/profiles/import-repo/scan/route.ts +25 -0
- package/src/app/api/profiles/route.ts +73 -22
- package/src/app/api/projects/[id]/route.ts +119 -9
- package/src/app/api/projects/__tests__/delete-project.test.ts +170 -0
- package/src/app/api/runtimes/ollama/route.ts +86 -0
- package/src/app/api/runtimes/suggest/route.ts +29 -0
- package/src/app/api/schedules/[id]/heartbeat-history/route.ts +77 -0
- package/src/app/api/schedules/[id]/route.ts +41 -3
- package/src/app/api/schedules/parse/route.ts +66 -0
- package/src/app/api/schedules/route.ts +71 -12
- package/src/app/api/settings/author-default/route.ts +7 -0
- package/src/app/api/settings/browser-tools/route.ts +68 -0
- package/src/app/api/settings/learning/route.ts +41 -0
- package/src/app/api/settings/ollama/route.ts +34 -0
- package/src/app/api/settings/providers/route.ts +57 -0
- package/src/app/api/settings/routing/route.ts +24 -0
- package/src/app/api/settings/web-search/route.ts +28 -0
- package/src/app/api/tasks/[id]/execute/route.ts +13 -1
- package/src/app/documents/page.tsx +3 -0
- package/src/app/environment/page.tsx +8 -1
- package/src/app/settings/page.tsx +12 -4
- package/src/app/workflows/[id]/edit/page.tsx +2 -0
- package/src/app/workflows/new/page.tsx +2 -0
- package/src/components/chat/chat-command-popover.tsx +280 -0
- package/src/components/chat/chat-input.tsx +90 -10
- package/src/components/chat/chat-message.tsx +9 -3
- package/src/components/chat/chat-model-selector.tsx +42 -1
- package/src/components/chat/chat-shell.tsx +31 -5
- package/src/components/chat/screenshot-gallery.tsx +96 -0
- package/src/components/dashboard/welcome-landing.tsx +9 -9
- package/src/components/environment/artifact-card.tsx +27 -1
- package/src/components/environment/environment-dashboard.tsx +50 -2
- package/src/components/environment/environment-summary-card.tsx +5 -2
- package/src/components/environment/suggested-profiles.tsx +117 -52
- package/src/components/handoffs/handoff-approval-card.tsx +159 -0
- package/src/components/memory/memory-browser.tsx +315 -0
- package/src/components/monitoring/log-entry.tsx +61 -27
- package/src/components/profiles/learned-context-panel.tsx +4 -4
- package/src/components/profiles/profile-assist-panel.tsx +512 -0
- package/src/components/profiles/profile-browser.tsx +109 -8
- package/src/components/profiles/profile-card.tsx +29 -1
- package/src/components/profiles/profile-detail-view.tsx +200 -28
- package/src/components/profiles/profile-form-view.tsx +220 -82
- package/src/components/profiles/repo-import-wizard.tsx +648 -0
- package/src/components/profiles/smoke-test-editor.tsx +106 -0
- package/src/components/projects/project-detail.tsx +15 -2
- package/src/components/schedules/schedule-create-sheet.tsx +32 -330
- package/src/components/schedules/schedule-detail-sheet.tsx +37 -21
- package/src/components/schedules/schedule-edit-sheet.tsx +159 -0
- package/src/components/schedules/schedule-form.tsx +749 -0
- package/src/components/schedules/schedule-list.tsx +31 -2
- package/src/components/settings/auth-method-selector.tsx +7 -1
- package/src/components/settings/browser-tools-section.tsx +247 -0
- package/src/components/settings/budget-guardrails-section.tsx +111 -48
- package/src/components/settings/channels-section.tsx +526 -0
- package/src/components/settings/chat-settings-section.tsx +27 -1
- package/src/components/settings/data-management-section.tsx +8 -6
- package/src/components/settings/learning-context-section.tsx +124 -0
- package/src/components/settings/ollama-section.tsx +270 -0
- package/src/components/settings/providers-runtimes-section.tsx +499 -0
- package/src/components/settings/runtime-timeout-section.tsx +4 -4
- package/src/components/settings/web-search-section.tsx +101 -0
- package/src/components/shared/command-palette.tsx +1 -30
- package/src/components/shared/screenshot-lightbox.tsx +151 -0
- package/src/components/shared/tag-input.tsx +156 -0
- package/src/components/tasks/kanban-board.tsx +32 -0
- package/src/components/tasks/kanban-column.tsx +4 -2
- package/src/components/tasks/task-card.tsx +1 -0
- package/src/components/tasks/task-chip-bar.tsx +6 -1
- package/src/components/tasks/task-create-panel.tsx +55 -5
- package/src/components/workflows/workflow-form-view.tsx +38 -3
- package/src/hooks/use-caret-position.ts +104 -0
- package/src/hooks/use-chat-autocomplete.ts +288 -0
- package/src/hooks/use-project-skills.ts +66 -0
- package/src/hooks/use-tag-suggestions.ts +31 -0
- package/src/instrumentation.ts +4 -1
- package/src/lib/agents/__tests__/browser-mcp.test.ts +175 -0
- package/src/lib/agents/__tests__/claude-agent.test.ts +6 -0
- package/src/lib/agents/__tests__/learned-context.test.ts +10 -0
- package/src/lib/agents/agentic-loop.ts +235 -0
- package/src/lib/agents/browser-mcp.ts +174 -0
- package/src/lib/agents/claude-agent.ts +83 -198
- package/src/lib/agents/handoff/bus.ts +164 -0
- package/src/lib/agents/handoff/governance.ts +47 -0
- package/src/lib/agents/handoff/types.ts +16 -0
- package/src/lib/agents/learned-context.ts +27 -7
- package/src/lib/agents/memory/decay.ts +61 -0
- package/src/lib/agents/memory/extractor.ts +181 -0
- package/src/lib/agents/memory/retrieval.ts +96 -0
- package/src/lib/agents/memory/types.ts +6 -0
- package/src/lib/agents/profiles/__tests__/project-profiles.test.ts +119 -0
- package/src/lib/agents/profiles/__tests__/registry.test.ts +11 -3
- package/src/lib/agents/profiles/builtins/code-reviewer/profile.yaml +2 -2
- package/src/lib/agents/profiles/builtins/content-creator/SKILL.md +19 -0
- package/src/lib/agents/profiles/builtins/content-creator/profile.yaml +27 -0
- package/src/lib/agents/profiles/builtins/customer-support-agent/SKILL.md +19 -0
- package/src/lib/agents/profiles/builtins/customer-support-agent/profile.yaml +26 -0
- package/src/lib/agents/profiles/builtins/data-analyst/profile.yaml +2 -2
- package/src/lib/agents/profiles/builtins/devops-engineer/profile.yaml +2 -2
- package/src/lib/agents/profiles/builtins/document-writer/profile.yaml +2 -2
- package/src/lib/agents/profiles/builtins/financial-analyst/SKILL.md +19 -0
- package/src/lib/agents/profiles/builtins/financial-analyst/profile.yaml +24 -0
- package/src/lib/agents/profiles/builtins/general/profile.yaml +2 -2
- package/src/lib/agents/profiles/builtins/health-fitness-coach/profile.yaml +2 -2
- package/src/lib/agents/profiles/builtins/learning-coach/profile.yaml +2 -2
- package/src/lib/agents/profiles/builtins/marketing-strategist/SKILL.md +19 -0
- package/src/lib/agents/profiles/builtins/marketing-strategist/profile.yaml +27 -0
- package/src/lib/agents/profiles/builtins/operations-coordinator/SKILL.md +19 -0
- package/src/lib/agents/profiles/builtins/operations-coordinator/profile.yaml +26 -0
- package/src/lib/agents/profiles/builtins/project-manager/profile.yaml +2 -2
- package/src/lib/agents/profiles/builtins/researcher/SKILL.md +1 -0
- package/src/lib/agents/profiles/builtins/researcher/profile.yaml +2 -2
- package/src/lib/agents/profiles/builtins/sales-researcher/SKILL.md +19 -0
- package/src/lib/agents/profiles/builtins/sales-researcher/profile.yaml +26 -0
- package/src/lib/agents/profiles/builtins/shopping-assistant/SKILL.md +1 -0
- package/src/lib/agents/profiles/builtins/shopping-assistant/profile.yaml +2 -2
- package/src/lib/agents/profiles/builtins/sweep/profile.yaml +1 -1
- package/src/lib/agents/profiles/builtins/technical-writer/profile.yaml +2 -2
- package/src/lib/agents/profiles/builtins/travel-planner/SKILL.md +2 -0
- package/src/lib/agents/profiles/builtins/travel-planner/profile.yaml +2 -2
- package/src/lib/agents/profiles/builtins/wealth-manager/SKILL.md +2 -0
- package/src/lib/agents/profiles/builtins/wealth-manager/profile.yaml +2 -2
- package/src/lib/agents/profiles/project-profiles.ts +193 -0
- package/src/lib/agents/profiles/registry.ts +130 -6
- package/src/lib/agents/profiles/types.ts +28 -0
- package/src/lib/agents/router.ts +174 -2
- package/src/lib/agents/runtime/__tests__/catalog.test.ts +15 -4
- package/src/lib/agents/runtime/anthropic-direct.ts +644 -0
- package/src/lib/agents/runtime/catalog.ts +57 -2
- package/src/lib/agents/runtime/claude.ts +205 -1
- package/src/lib/agents/runtime/index.ts +22 -0
- package/src/lib/agents/runtime/ollama-adapter.ts +409 -0
- package/src/lib/agents/runtime/openai-direct.ts +514 -0
- package/src/lib/agents/runtime/profile-assist-types.ts +30 -0
- package/src/lib/agents/runtime/types.ts +2 -0
- package/src/lib/agents/tool-permissions.ts +203 -0
- package/src/lib/channels/gateway.ts +321 -0
- package/src/lib/channels/poller.ts +268 -0
- package/src/lib/channels/registry.ts +90 -0
- package/src/lib/channels/slack-adapter.ts +188 -0
- package/src/lib/channels/telegram-adapter.ts +218 -0
- package/src/lib/channels/types.ts +43 -0
- package/src/lib/channels/webhook-adapter.ts +74 -0
- package/src/lib/chat/command-data.ts +50 -0
- package/src/lib/chat/context-builder.ts +147 -3
- package/src/lib/chat/engine.ts +182 -19
- package/src/lib/chat/ollama-engine.ts +198 -0
- package/src/lib/chat/slash-commands.ts +191 -0
- package/src/lib/chat/stagent-tools.ts +106 -20
- package/src/lib/chat/tool-catalog.ts +209 -0
- package/src/lib/chat/tool-registry.ts +90 -0
- package/src/lib/chat/tools/chat-history-tools.ts +4 -4
- package/src/lib/chat/tools/document-tools.ts +43 -6
- package/src/lib/chat/tools/handoff-tools.ts +70 -0
- package/src/lib/chat/tools/notification-tools.ts +4 -4
- package/src/lib/chat/tools/profile-tools.ts +3 -3
- package/src/lib/chat/tools/project-tools.ts +3 -3
- package/src/lib/chat/tools/schedule-tools.ts +29 -13
- package/src/lib/chat/tools/settings-tools.ts +2 -2
- package/src/lib/chat/tools/task-tools.ts +66 -11
- package/src/lib/chat/tools/usage-tools.ts +2 -2
- package/src/lib/chat/tools/workflow-tools.ts +8 -8
- package/src/lib/chat/types.ts +22 -6
- package/src/lib/constants/known-tools.ts +19 -0
- package/src/lib/constants/prose-styles.ts +1 -1
- package/src/lib/constants/settings.ts +11 -0
- package/src/lib/data/channel-bindings.ts +85 -0
- package/src/lib/data/clear.ts +38 -4
- package/src/lib/data/profile-test-results.ts +48 -0
- package/src/lib/data/seed-data/conversations.ts +196 -0
- package/src/lib/data/seed-data/learned-context.ts +99 -0
- package/src/lib/data/seed-data/notifications.ts +54 -1
- package/src/lib/data/seed-data/profile-test-results.ts +96 -0
- package/src/lib/data/seed-data/repo-imports.ts +51 -0
- package/src/lib/data/seed-data/views.ts +60 -0
- package/src/lib/data/seed.ts +51 -0
- package/src/lib/db/bootstrap.ts +167 -0
- package/src/lib/db/migrations/0012_add_screenshot_columns.sql +5 -0
- package/src/lib/db/migrations/0013_add_repo_imports.sql +15 -0
- package/src/lib/db/migrations/0014_add_linked_profile_id.sql +3 -0
- package/src/lib/db/migrations/0015_add_channel_bindings.sql +23 -0
- package/src/lib/db/schema.ts +192 -1
- package/src/lib/environment/__tests__/auto-scan.test.ts +86 -0
- package/src/lib/environment/__tests__/profile-linker.test.ts +187 -0
- package/src/lib/environment/auto-scan.ts +48 -0
- package/src/lib/environment/data.ts +25 -0
- package/src/lib/environment/profile-generator.ts +40 -10
- package/src/lib/environment/profile-linker.ts +143 -0
- package/src/lib/environment/profile-rules.ts +96 -0
- package/src/lib/import/dedup.ts +149 -0
- package/src/lib/import/format-adapter.ts +631 -0
- package/src/lib/import/github-api.ts +219 -0
- package/src/lib/import/repo-scanner.ts +251 -0
- package/src/lib/schedules/__tests__/nlp-parser.test.ts +330 -0
- package/src/lib/schedules/active-hours.ts +120 -0
- package/src/lib/schedules/heartbeat-parser.ts +224 -0
- package/src/lib/schedules/heartbeat-prompt.ts +153 -0
- package/src/lib/schedules/nlp-parser.ts +357 -0
- package/src/lib/schedules/scheduler.ts +218 -3
- package/src/lib/screenshots/__tests__/persist.test.ts +104 -0
- package/src/lib/screenshots/persist.ts +114 -0
- package/src/lib/settings/__tests__/budget-guardrails.test.ts +39 -1
- package/src/lib/settings/helpers.ts +6 -0
- package/src/lib/settings/routing.ts +24 -0
- package/src/lib/settings/runtime-setup.ts +28 -1
- package/src/lib/usage/ledger.ts +2 -1
- package/src/lib/utils/stagent-paths.ts +4 -0
- package/src/lib/validators/__tests__/settings.test.ts +9 -0
- package/src/lib/validators/profile.ts +39 -0
- package/src/lib/workflows/blueprints/builtins/business-daily-briefing.yaml +102 -0
- package/src/lib/workflows/blueprints/builtins/content-marketing-pipeline.yaml +90 -0
- package/src/lib/workflows/blueprints/builtins/customer-support-triage.yaml +107 -0
- package/src/lib/workflows/blueprints/builtins/financial-reporting.yaml +104 -0
- package/src/lib/workflows/blueprints/builtins/lead-research-pipeline.yaml +82 -0
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Stagent
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> AI Business Operating System — Run your business with AI agents. Local-first, multi-provider, governed.
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/stagent) [](https://nextjs.org/) [](https://react.dev/) [](https://www.typescriptlang.org/) [](https://docs.anthropic.com/) [](https://developers.openai.com/codex/app-server) [](LICENSE)
|
|
5
|
+
[](https://stagent.io) [](https://www.npmjs.com/package/stagent) [](https://nextjs.org/) [](https://react.dev/) [](https://www.typescriptlang.org/) [](https://docs.anthropic.com/) [](https://developers.openai.com/codex/app-server) [](LICENSE)
|
|
6
6
|
|
|
7
7
|
**[stagent.io](https://stagent.io)** · **[GitHub](https://github.com/navam-io/stagent)**
|
|
8
8
|
|
|
@@ -28,20 +28,20 @@ Open [localhost:3000](http://localhost:3000). That's it — zero config, local S
|
|
|
28
28
|
|
|
29
29
|
## Why Stagent
|
|
30
30
|
|
|
31
|
-
AI
|
|
31
|
+
The AI agent stack is broken for business operators. You can spin up an agent in minutes — but running it reliably for real work means stitching together orchestration, governance, cost controls, and team coordination yourself. Stagent closes that gap with a single local-first platform where agents do the work and you stay in control.
|
|
32
32
|
|
|
33
33
|
- **Local-first** — SQLite database, no cloud dependency, `npx stagent` and go
|
|
34
34
|
- **Multi-provider** — Claude Code + OpenAI Codex App Server behind one runtime registry
|
|
35
|
-
- **
|
|
36
|
-
- **
|
|
37
|
-
- **
|
|
38
|
-
- **
|
|
35
|
+
- **Your rules, enforced** — Tool permissions, inbox approvals, and audit trails for every agent action
|
|
36
|
+
- **Your AI team** — 21 specialist profiles ready to deploy, each with instructions, tool policies, and runtime tuning
|
|
37
|
+
- **Business processes, automated** — 6 workflow patterns (sequence, planner-executor, checkpoint, parallel, loop, swarm)
|
|
38
|
+
- **Know what you spend** — Usage metering, budgets, and spend visibility per provider and model
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
42
42
|
## Runtime Bridge
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
Run the same business process on different AI providers without changing a line of configuration. Stagent's shared runtime registry routes tasks, schedules, and workflow steps through **Claude Code** (Anthropic Claude Agent SDK) and **OpenAI Codex App Server**, landing everything in the same inbox, monitoring, and cost surfaces. Switching providers is a settings change, not a rewrite.
|
|
45
45
|
|
|
46
46
|
---
|
|
47
47
|
|
|
@@ -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)** |
|
|
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 |
|
|
@@ -74,6 +74,8 @@ Stagent ships a shared runtime registry that routes tasks, schedules, and workfl
|
|
|
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
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 |
|
|
77
79
|
|
|
78
80
|
---
|
|
79
81
|
|
|
@@ -218,6 +220,28 @@ AI-native book reader at `/book` with 9 chapters across 3 parts (Foundation, Int
|
|
|
218
220
|
- **Try It Now** — each chapter links to related Playbook feature docs and user journeys
|
|
219
221
|
- **Author's Notes** — collapsible callout blocks with behind-the-scenes commentary
|
|
220
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
|
+
|
|
221
245
|
### Platform
|
|
222
246
|
|
|
223
247
|
#### Tool Permission Persistence
|
|
@@ -254,13 +278,13 @@ When an agent needs approval or input, a notification appears in your inbox. Rev
|
|
|
254
278
|
| <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/inbox-expanded.png" alt="Inbox notification expanded" width="580" /> |
|
|
255
279
|
|
|
256
280
|
#### Chat
|
|
257
|
-
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
|
|
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.
|
|
258
282
|
|
|
259
|
-
<img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/chat-conversation.png" alt="Stagent chat conversation with
|
|
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" />
|
|
260
284
|
|
|
261
|
-
|
|
|
285
|
+
| Tool Catalog | Model Selector | Create Tab |
|
|
262
286
|
|:-:|:-:|:-:|
|
|
263
|
-
| <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/chat-list.png" alt="Chat
|
|
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" /> |
|
|
264
288
|
|
|
265
289
|
#### Monitoring
|
|
266
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).
|
|
@@ -271,19 +295,19 @@ Real-time agent log streaming via Server-Sent Events. Filter by task or event ty
|
|
|
271
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.
|
|
272
296
|
|
|
273
297
|
#### Settings
|
|
274
|
-
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
|
|
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.
|
|
275
299
|
|
|
276
300
|
<img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/settings-list.png" alt="Stagent settings" width="1200" />
|
|
277
301
|
|
|
278
|
-
| Permission Presets | Budget Configuration |
|
|
302
|
+
| Browser Tools | Permission Presets | Budget Configuration |
|
|
279
303
|
|:-:|:-:|:-:|
|
|
280
|
-
| <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/settings-
|
|
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" /> |
|
|
281
305
|
|
|
282
306
|
#### CLI
|
|
283
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.
|
|
284
308
|
|
|
285
309
|
#### Database
|
|
286
|
-
SQLite with WAL mode via better-sqlite3 + Drizzle ORM.
|
|
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.
|
|
287
311
|
|
|
288
312
|
#### Command Palette
|
|
289
313
|
Global `⌘K` command palette for fast navigation and search across tasks, projects, workflows, and settings. Recent items, fuzzy search, and keyboard-driven navigation.
|
|
@@ -293,7 +317,7 @@ Global `⌘K` command palette for fast navigation and search across tasks, proje
|
|
|
293
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" /> |
|
|
294
318
|
|
|
295
319
|
#### App Shell
|
|
296
|
-
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,
|
|
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.
|
|
297
321
|
|
|
298
322
|
#### E2E Test Automation
|
|
299
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`.
|
|
@@ -343,7 +367,9 @@ src/
|
|
|
343
367
|
│ ├── schedules/ # Schedule management
|
|
344
368
|
│ ├── costs/ # Cost & usage dashboard
|
|
345
369
|
│ ├── playbook/ # Documentation & learning journeys
|
|
346
|
-
│ ├── chat/ # Conversational AI
|
|
370
|
+
│ ├── chat/ # Conversational AI (tool catalog)
|
|
371
|
+
│ ├── book/ # AI Native Book reader
|
|
372
|
+
│ ├── environment/ # Environment control plane
|
|
347
373
|
│ ├── inbox/ # Notifications
|
|
348
374
|
│ ├── monitor/ # Log streaming
|
|
349
375
|
│ └── settings/ # Configuration
|
|
@@ -357,9 +383,11 @@ src/
|
|
|
357
383
|
│ ├── playbook/ # Playbook docs + journeys + adoption
|
|
358
384
|
│ ├── schedules/ # Schedule management
|
|
359
385
|
│ ├── monitoring/ # Log viewer
|
|
360
|
-
│ ├── 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
|
|
361
389
|
│ ├── notifications/ # Inbox + permission actions
|
|
362
|
-
│ ├── settings/ # Auth, permissions, budgets, data mgmt
|
|
390
|
+
│ ├── settings/ # Auth, permissions, budgets, browser tools, data mgmt
|
|
363
391
|
│ ├── shared/ # App shell, sidebar
|
|
364
392
|
│ └── ui/ # shadcn/ui primitives
|
|
365
393
|
└── lib/
|
|
@@ -454,24 +482,32 @@ All 14 features shipped across three layers:
|
|
|
454
482
|
| **Core** | Project management, task board, agent integration, inbox notifications, monitoring dashboard |
|
|
455
483
|
| **Polish** | Homepage dashboard, UX fixes, workflow engine, AI task assist, content handling, session management |
|
|
456
484
|
|
|
457
|
-
### Post-MVP —
|
|
485
|
+
### Post-MVP — 52 features shipped
|
|
458
486
|
|
|
459
487
|
| Category | Features |
|
|
460
488
|
|----------|---------|
|
|
461
489
|
| **Documents** (5) | File attachments, preprocessing (5 formats), agent context injection, document browser, output generation |
|
|
462
490
|
| **Agent Intelligence** (6) | Multi-agent routing, autonomous loops, multi-agent swarm, AI assist→workflows, agent self-improvement, workflow context batching |
|
|
463
|
-
| **Agent Profiles** (2) | Agent profile catalog (
|
|
464
|
-
| **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
|
|
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 |
|
|
465
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) |
|
|
466
494
|
| **Runtime Quality** (2) | SDK runtime hardening, E2E test automation |
|
|
467
495
|
| **Governance** (3) | Usage metering ledger, spend budget guardrails, cost & usage dashboard |
|
|
468
|
-
| **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 (
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
|
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 |
|
|
475
511
|
|
|
476
512
|
---
|
|
477
513
|
|
package/dist/cli.js
CHANGED
|
@@ -106,7 +106,13 @@ var STAGENT_TABLES = [
|
|
|
106
106
|
"conversations",
|
|
107
107
|
"chat_messages",
|
|
108
108
|
"reading_progress",
|
|
109
|
-
"bookmarks"
|
|
109
|
+
"bookmarks",
|
|
110
|
+
"profile_test_results",
|
|
111
|
+
"repo_imports",
|
|
112
|
+
"agent_memory",
|
|
113
|
+
"channel_configs",
|
|
114
|
+
"channel_bindings",
|
|
115
|
+
"agent_messages"
|
|
110
116
|
];
|
|
111
117
|
function bootstrapStagentDatabase(sqlite2) {
|
|
112
118
|
sqlite2.exec(`
|
|
@@ -224,6 +230,16 @@ function bootstrapStagentDatabase(sqlite2) {
|
|
|
224
230
|
expires_at INTEGER,
|
|
225
231
|
last_fired_at INTEGER,
|
|
226
232
|
next_fire_at INTEGER,
|
|
233
|
+
type TEXT DEFAULT 'scheduled' NOT NULL,
|
|
234
|
+
heartbeat_checklist TEXT,
|
|
235
|
+
active_hours_start INTEGER,
|
|
236
|
+
active_hours_end INTEGER,
|
|
237
|
+
active_timezone TEXT DEFAULT 'UTC',
|
|
238
|
+
suppression_count INTEGER DEFAULT 0 NOT NULL,
|
|
239
|
+
last_action_at INTEGER,
|
|
240
|
+
heartbeat_budget_per_day INTEGER,
|
|
241
|
+
heartbeat_spent_today INTEGER DEFAULT 0 NOT NULL,
|
|
242
|
+
heartbeat_budget_reset_at INTEGER,
|
|
227
243
|
created_at INTEGER NOT NULL,
|
|
228
244
|
updated_at INTEGER NOT NULL,
|
|
229
245
|
FOREIGN KEY (project_id) REFERENCES projects(id) ON UPDATE NO ACTION ON DELETE NO ACTION
|
|
@@ -320,7 +336,23 @@ function bootstrapStagentDatabase(sqlite2) {
|
|
|
320
336
|
sqlite2.exec(`CREATE INDEX IF NOT EXISTS idx_tasks_schedule_id ON tasks(schedule_id);`);
|
|
321
337
|
addColumnIfMissing(`ALTER TABLE projects ADD COLUMN working_directory TEXT;`);
|
|
322
338
|
addColumnIfMissing(`ALTER TABLE schedules ADD COLUMN assigned_agent TEXT;`);
|
|
339
|
+
addColumnIfMissing(`ALTER TABLE schedules ADD COLUMN type TEXT DEFAULT 'scheduled' NOT NULL;`);
|
|
340
|
+
addColumnIfMissing(`ALTER TABLE schedules ADD COLUMN heartbeat_checklist TEXT;`);
|
|
341
|
+
addColumnIfMissing(`ALTER TABLE schedules ADD COLUMN active_hours_start INTEGER;`);
|
|
342
|
+
addColumnIfMissing(`ALTER TABLE schedules ADD COLUMN active_hours_end INTEGER;`);
|
|
343
|
+
addColumnIfMissing(`ALTER TABLE schedules ADD COLUMN active_timezone TEXT DEFAULT 'UTC';`);
|
|
344
|
+
addColumnIfMissing(`ALTER TABLE schedules ADD COLUMN suppression_count INTEGER DEFAULT 0 NOT NULL;`);
|
|
345
|
+
addColumnIfMissing(`ALTER TABLE schedules ADD COLUMN last_action_at INTEGER;`);
|
|
346
|
+
addColumnIfMissing(`ALTER TABLE schedules ADD COLUMN heartbeat_budget_per_day INTEGER;`);
|
|
347
|
+
addColumnIfMissing(`ALTER TABLE schedules ADD COLUMN heartbeat_spent_today INTEGER DEFAULT 0 NOT NULL;`);
|
|
348
|
+
addColumnIfMissing(`ALTER TABLE schedules ADD COLUMN heartbeat_budget_reset_at INTEGER;`);
|
|
349
|
+
addColumnIfMissing(`ALTER TABLE tasks ADD COLUMN source_type TEXT;`);
|
|
323
350
|
addColumnIfMissing(`ALTER TABLE documents ADD COLUMN version INTEGER NOT NULL DEFAULT 1;`);
|
|
351
|
+
addColumnIfMissing(`ALTER TABLE documents ADD COLUMN source TEXT DEFAULT 'upload';`);
|
|
352
|
+
addColumnIfMissing(`ALTER TABLE documents ADD COLUMN conversation_id TEXT REFERENCES conversations(id);`);
|
|
353
|
+
addColumnIfMissing(`ALTER TABLE documents ADD COLUMN message_id TEXT;`);
|
|
354
|
+
sqlite2.exec(`CREATE INDEX IF NOT EXISTS idx_documents_source ON documents(source);`);
|
|
355
|
+
sqlite2.exec(`CREATE INDEX IF NOT EXISTS idx_documents_conversation_id ON documents(conversation_id);`);
|
|
324
356
|
sqlite2.exec(`
|
|
325
357
|
CREATE TABLE IF NOT EXISTS environment_scans (
|
|
326
358
|
id TEXT PRIMARY KEY NOT NULL,
|
|
@@ -353,6 +385,7 @@ function bootstrapStagentDatabase(sqlite2) {
|
|
|
353
385
|
metadata TEXT,
|
|
354
386
|
size_bytes INTEGER DEFAULT 0 NOT NULL,
|
|
355
387
|
modified_at INTEGER NOT NULL,
|
|
388
|
+
linked_profile_id TEXT,
|
|
356
389
|
created_at INTEGER NOT NULL,
|
|
357
390
|
FOREIGN KEY (scan_id) REFERENCES environment_scans(id) ON UPDATE NO ACTION ON DELETE NO ACTION
|
|
358
391
|
);
|
|
@@ -410,6 +443,8 @@ function bootstrapStagentDatabase(sqlite2) {
|
|
|
410
443
|
|
|
411
444
|
CREATE INDEX IF NOT EXISTS idx_env_templates_scope ON environment_templates(scope);
|
|
412
445
|
`);
|
|
446
|
+
addColumnIfMissing(`ALTER TABLE environment_artifacts ADD COLUMN linked_profile_id TEXT;`);
|
|
447
|
+
sqlite2.exec(`CREATE INDEX IF NOT EXISTS idx_env_artifacts_linked_profile ON environment_artifacts(linked_profile_id);`);
|
|
413
448
|
const legacyConv = sqlite2.prepare(
|
|
414
449
|
`SELECT sql FROM sqlite_master WHERE type='table' AND name='conversations'`
|
|
415
450
|
).get();
|
|
@@ -470,6 +505,120 @@ function bootstrapStagentDatabase(sqlite2) {
|
|
|
470
505
|
|
|
471
506
|
CREATE INDEX IF NOT EXISTS idx_bookmarks_chapter_id ON bookmarks(chapter_id);
|
|
472
507
|
`);
|
|
508
|
+
sqlite2.exec(`
|
|
509
|
+
CREATE TABLE IF NOT EXISTS repo_imports (
|
|
510
|
+
id TEXT PRIMARY KEY NOT NULL,
|
|
511
|
+
repo_url TEXT NOT NULL,
|
|
512
|
+
repo_owner TEXT NOT NULL,
|
|
513
|
+
repo_name TEXT NOT NULL,
|
|
514
|
+
branch TEXT NOT NULL,
|
|
515
|
+
commit_sha TEXT NOT NULL,
|
|
516
|
+
profile_ids TEXT NOT NULL,
|
|
517
|
+
skill_count INTEGER NOT NULL,
|
|
518
|
+
last_checked_at INTEGER,
|
|
519
|
+
created_at INTEGER NOT NULL
|
|
520
|
+
);
|
|
521
|
+
|
|
522
|
+
CREATE INDEX IF NOT EXISTS idx_repo_imports_repo_url ON repo_imports(repo_url);
|
|
523
|
+
CREATE INDEX IF NOT EXISTS idx_repo_imports_owner_name ON repo_imports(repo_owner, repo_name);
|
|
524
|
+
`);
|
|
525
|
+
sqlite2.exec(`
|
|
526
|
+
CREATE TABLE IF NOT EXISTS agent_memory (
|
|
527
|
+
id TEXT PRIMARY KEY NOT NULL,
|
|
528
|
+
profile_id TEXT NOT NULL,
|
|
529
|
+
category TEXT NOT NULL,
|
|
530
|
+
content TEXT NOT NULL,
|
|
531
|
+
confidence INTEGER DEFAULT 700 NOT NULL,
|
|
532
|
+
source_task_id TEXT,
|
|
533
|
+
tags TEXT,
|
|
534
|
+
last_accessed_at INTEGER,
|
|
535
|
+
access_count INTEGER DEFAULT 0 NOT NULL,
|
|
536
|
+
decay_rate INTEGER DEFAULT 10 NOT NULL,
|
|
537
|
+
status TEXT DEFAULT 'active' NOT NULL,
|
|
538
|
+
created_at INTEGER NOT NULL,
|
|
539
|
+
updated_at INTEGER NOT NULL,
|
|
540
|
+
FOREIGN KEY (source_task_id) REFERENCES tasks(id) ON UPDATE NO ACTION ON DELETE NO ACTION
|
|
541
|
+
);
|
|
542
|
+
|
|
543
|
+
CREATE INDEX IF NOT EXISTS idx_agent_memory_profile_status ON agent_memory(profile_id, status);
|
|
544
|
+
CREATE INDEX IF NOT EXISTS idx_agent_memory_confidence ON agent_memory(confidence);
|
|
545
|
+
`);
|
|
546
|
+
sqlite2.exec(`
|
|
547
|
+
CREATE TABLE IF NOT EXISTS profile_test_results (
|
|
548
|
+
id TEXT PRIMARY KEY NOT NULL,
|
|
549
|
+
profile_id TEXT NOT NULL,
|
|
550
|
+
runtime_id TEXT NOT NULL,
|
|
551
|
+
report_json TEXT NOT NULL,
|
|
552
|
+
total_passed INTEGER DEFAULT 0 NOT NULL,
|
|
553
|
+
total_failed INTEGER DEFAULT 0 NOT NULL,
|
|
554
|
+
created_at INTEGER NOT NULL
|
|
555
|
+
);
|
|
556
|
+
|
|
557
|
+
CREATE INDEX IF NOT EXISTS idx_profile_test_results_profile_runtime ON profile_test_results(profile_id, runtime_id);
|
|
558
|
+
`);
|
|
559
|
+
sqlite2.exec(`
|
|
560
|
+
CREATE TABLE IF NOT EXISTS channel_configs (
|
|
561
|
+
id TEXT PRIMARY KEY NOT NULL,
|
|
562
|
+
channel_type TEXT NOT NULL,
|
|
563
|
+
name TEXT NOT NULL,
|
|
564
|
+
config TEXT NOT NULL,
|
|
565
|
+
status TEXT DEFAULT 'active' NOT NULL,
|
|
566
|
+
test_status TEXT DEFAULT 'untested' NOT NULL,
|
|
567
|
+
created_at INTEGER NOT NULL,
|
|
568
|
+
updated_at INTEGER NOT NULL
|
|
569
|
+
);
|
|
570
|
+
|
|
571
|
+
CREATE INDEX IF NOT EXISTS idx_channel_configs_type ON channel_configs(channel_type);
|
|
572
|
+
`);
|
|
573
|
+
addColumnIfMissing(`ALTER TABLE schedules ADD COLUMN delivery_channels TEXT;`);
|
|
574
|
+
addColumnIfMissing(`ALTER TABLE channel_configs ADD COLUMN direction TEXT DEFAULT 'outbound' NOT NULL;`);
|
|
575
|
+
sqlite2.exec(`
|
|
576
|
+
CREATE TABLE IF NOT EXISTS channel_bindings (
|
|
577
|
+
id TEXT PRIMARY KEY NOT NULL,
|
|
578
|
+
channel_config_id TEXT NOT NULL,
|
|
579
|
+
conversation_id TEXT NOT NULL,
|
|
580
|
+
external_thread_id TEXT,
|
|
581
|
+
runtime_id TEXT NOT NULL,
|
|
582
|
+
model_id TEXT,
|
|
583
|
+
profile_id TEXT,
|
|
584
|
+
status TEXT DEFAULT 'active' NOT NULL,
|
|
585
|
+
pending_request_id TEXT,
|
|
586
|
+
created_at INTEGER NOT NULL,
|
|
587
|
+
updated_at INTEGER NOT NULL,
|
|
588
|
+
FOREIGN KEY (channel_config_id) REFERENCES channel_configs(id) ON UPDATE NO ACTION ON DELETE NO ACTION,
|
|
589
|
+
FOREIGN KEY (conversation_id) REFERENCES conversations(id) ON UPDATE NO ACTION ON DELETE NO ACTION
|
|
590
|
+
);
|
|
591
|
+
|
|
592
|
+
CREATE INDEX IF NOT EXISTS idx_channel_bindings_config ON channel_bindings(channel_config_id);
|
|
593
|
+
CREATE INDEX IF NOT EXISTS idx_channel_bindings_conversation ON channel_bindings(conversation_id);
|
|
594
|
+
CREATE UNIQUE INDEX IF NOT EXISTS idx_channel_bindings_config_thread ON channel_bindings(channel_config_id, external_thread_id);
|
|
595
|
+
`);
|
|
596
|
+
sqlite2.exec(`
|
|
597
|
+
CREATE TABLE IF NOT EXISTS agent_messages (
|
|
598
|
+
id TEXT PRIMARY KEY NOT NULL,
|
|
599
|
+
from_profile_id TEXT NOT NULL,
|
|
600
|
+
to_profile_id TEXT NOT NULL,
|
|
601
|
+
task_id TEXT,
|
|
602
|
+
target_task_id TEXT,
|
|
603
|
+
subject TEXT NOT NULL,
|
|
604
|
+
body TEXT NOT NULL,
|
|
605
|
+
attachments TEXT,
|
|
606
|
+
priority INTEGER DEFAULT 2 NOT NULL,
|
|
607
|
+
status TEXT DEFAULT 'pending' NOT NULL,
|
|
608
|
+
requires_approval INTEGER DEFAULT 0 NOT NULL,
|
|
609
|
+
approved_by TEXT,
|
|
610
|
+
parent_message_id TEXT,
|
|
611
|
+
chain_depth INTEGER DEFAULT 0 NOT NULL,
|
|
612
|
+
created_at INTEGER NOT NULL,
|
|
613
|
+
responded_at INTEGER,
|
|
614
|
+
expires_at INTEGER,
|
|
615
|
+
FOREIGN KEY (task_id) REFERENCES tasks(id) ON UPDATE NO ACTION ON DELETE NO ACTION,
|
|
616
|
+
FOREIGN KEY (target_task_id) REFERENCES tasks(id) ON UPDATE NO ACTION ON DELETE NO ACTION
|
|
617
|
+
);
|
|
618
|
+
|
|
619
|
+
CREATE INDEX IF NOT EXISTS idx_agent_messages_to_status ON agent_messages(to_profile_id, status);
|
|
620
|
+
CREATE INDEX IF NOT EXISTS idx_agent_messages_task ON agent_messages(task_id);
|
|
621
|
+
`);
|
|
473
622
|
}
|
|
474
623
|
function hasLegacyStagentTables(sqlite2) {
|
|
475
624
|
const placeholders = STAGENT_TABLES.map(() => "?").join(", ");
|
|
@@ -539,7 +688,7 @@ Examples:
|
|
|
539
688
|
node dist/cli.js --data-dir ~/.stagent-dogfood --port 3100
|
|
540
689
|
`;
|
|
541
690
|
}
|
|
542
|
-
program.name("stagent").description("
|
|
691
|
+
program.name("stagent").description("AI Business Operating System").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();
|
|
543
692
|
var opts = program.opts();
|
|
544
693
|
if (opts.dataDir) {
|
|
545
694
|
process.env.STAGENT_DATA_DIR = opts.dataDir;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"generated": "2026-03-31T21:00:00Z",
|
|
3
|
+
"totalFeatures": 31,
|
|
4
|
+
"coveredFeatures": 28,
|
|
5
|
+
"uncoveredFeatures": 3,
|
|
6
|
+
"coveragePercent": 90.3,
|
|
7
|
+
"gaps": {
|
|
8
|
+
"book-content-merge": {
|
|
9
|
+
"availableScreenshots": ["book-reader.png"],
|
|
10
|
+
"note": "Book reader screenshot exists but not referenced in any journey doc"
|
|
11
|
+
},
|
|
12
|
+
"book-reading-paths": {
|
|
13
|
+
"availableScreenshots": ["book-reader.png", "book-chapter-nav.png"],
|
|
14
|
+
"note": "Book navigation screenshots exist but not referenced in any journey doc"
|
|
15
|
+
},
|
|
16
|
+
"browser-tool-orchestration": {
|
|
17
|
+
"availableScreenshots": ["settings-browser-tools.png"],
|
|
18
|
+
"note": "Browser tools settings screenshot exists but not referenced in any journey doc"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
package/docs/.last-generated
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2026-
|
|
1
|
+
2026-04-01T05:15:01Z
|
|
@@ -3,38 +3,36 @@ title: "Agent Intelligence"
|
|
|
3
3
|
category: "feature-reference"
|
|
4
4
|
section: "agent-intelligence"
|
|
5
5
|
route: "cross-cutting"
|
|
6
|
-
tags: [ai-assist, routing, autonomous, swarm, self-improvement, context, parallel]
|
|
7
|
-
features: ["task-definition-ai", "multi-agent-routing", "autonomous-loop-execution", "multi-agent-swarm", "agent-self-improvement", "workflow-context-batching", "parallel-research-fork-join"]
|
|
6
|
+
tags: [ai-assist, routing, autonomous, swarm, self-improvement, context, parallel, episodic-memory, handoffs]
|
|
7
|
+
features: ["task-definition-ai", "multi-agent-routing", "autonomous-loop-execution", "multi-agent-swarm", "agent-self-improvement", "workflow-context-batching", "parallel-research-fork-join", "agent-episodic-memory", "agent-async-handoffs"]
|
|
8
8
|
screengrabCount: 0
|
|
9
|
-
lastUpdated: "2026-03-
|
|
9
|
+
lastUpdated: "2026-03-31"
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
# Agent Intelligence
|
|
13
13
|
|
|
14
|
-
Stagent layers several AI-powered capabilities on top of basic task execution. From one-click description improvement to multi-agent coordination, these features reduce manual effort and improve output quality across the workspace.
|
|
15
|
-
|
|
16
|
-
## Screenshots
|
|
14
|
+
Stagent layers several AI-powered capabilities on top of basic task execution. From one-click description improvement to multi-agent coordination, episodic memory, and async handoffs, these features reduce manual effort and improve output quality across the workspace.
|
|
17
15
|
|
|
18
16
|
## Key Features
|
|
19
17
|
|
|
20
18
|
### Task Definition AI Assist
|
|
21
19
|
|
|
22
|
-
A single-click "AI Assist" button on the task creation form takes the current title and generates a richer, more actionable description. The improved text is previewed before applying, so
|
|
20
|
+
A single-click "AI Assist" button on the task creation form takes the current title and generates a richer, more actionable description. The improved text is previewed before applying, so you retain full control.
|
|
23
21
|
|
|
24
22
|
### Multi-Agent Routing
|
|
25
23
|
|
|
26
|
-
When a task is created, the task classifier analyzes its content and automatically selects the best-fit agent profile from the registry
|
|
24
|
+
When a task is created, the task classifier analyzes its content and automatically selects the best-fit agent profile from the registry. The selected profile can be overridden manually via the profile dropdown. The router considers task content, project context, profile capabilities, and runtime availability.
|
|
27
25
|
|
|
28
26
|
### Autonomous Loop Execution
|
|
29
27
|
|
|
30
28
|
Tasks can run in autonomous loops with configurable stop conditions:
|
|
31
29
|
|
|
32
|
-
- **Iteration limit**
|
|
33
|
-
- **Time limit**
|
|
34
|
-
- **Success criteria**
|
|
35
|
-
- **Error threshold**
|
|
30
|
+
- **Iteration limit** -- stop after N iterations.
|
|
31
|
+
- **Time limit** -- stop after a duration elapses.
|
|
32
|
+
- **Success criteria** -- stop when the agent reports completion.
|
|
33
|
+
- **Error threshold** -- stop after repeated failures.
|
|
36
34
|
|
|
37
|
-
Loops support pause and resume. The
|
|
35
|
+
Loops support pause and resume. The loop status view provides real-time progress and control.
|
|
38
36
|
|
|
39
37
|
### Multi-Agent Swarm
|
|
40
38
|
|
|
@@ -42,7 +40,30 @@ For complex tasks that benefit from multiple perspectives, the swarm feature coo
|
|
|
42
40
|
|
|
43
41
|
### Agent Self-Improvement
|
|
44
42
|
|
|
45
|
-
Agents accumulate learned context across iterations, stored in the
|
|
43
|
+
Agents accumulate learned context across iterations, stored in the database. This behavioral context feeds back into subsequent runs, allowing agents to refine their approach over time without manual prompt tuning. Context proposals require human approval before being applied.
|
|
44
|
+
|
|
45
|
+
### Agent Episodic Memory
|
|
46
|
+
|
|
47
|
+
Distinct from behavioral learned context, episodic memory captures factual knowledge the agent discovers during task execution. Key characteristics:
|
|
48
|
+
|
|
49
|
+
- **Memory extraction** -- agents identify and store important facts, decisions, and discoveries as discrete memory entries
|
|
50
|
+
- **Confidence scoring** -- each memory has a confidence level based on source reliability
|
|
51
|
+
- **Time-based decay** -- older memories gradually lose relevance weight, keeping the context window focused on current knowledge
|
|
52
|
+
- **Relevance-filtered retrieval** -- when executing a new task, the agent retrieves only memories relevant to the current context
|
|
53
|
+
- **Operator review** -- a memory browser UI lets you inspect, edit, and delete stored memories
|
|
54
|
+
|
|
55
|
+
Episodic memory means agents build institutional knowledge over time. A financial analyst profile that researches a company once can recall that research in future tasks without re-doing the work.
|
|
56
|
+
|
|
57
|
+
### Agent Async Handoffs
|
|
58
|
+
|
|
59
|
+
Agents can hand off work to other agents asynchronously through a message bus:
|
|
60
|
+
|
|
61
|
+
- **send_handoff tool** -- agents use this tool to delegate work to another profile
|
|
62
|
+
- **Governance gates** -- chain depth limits prevent infinite handoff loops, and self-handoff is blocked
|
|
63
|
+
- **Inbox approvals** -- handoff requests surface in the inbox for human approval before the receiving agent begins work
|
|
64
|
+
- **Handoff policies** -- configure which profiles can hand off to which, and under what conditions
|
|
65
|
+
|
|
66
|
+
This enables multi-agent workflows where a researcher discovers a code issue and hands it off to the code reviewer without requiring a pre-built workflow definition.
|
|
46
67
|
|
|
47
68
|
### Workflow Context Batching
|
|
48
69
|
|
|
@@ -58,3 +79,4 @@ Research tasks can be forked into concurrent sub-tasks that investigate differen
|
|
|
58
79
|
- [Profiles](./profiles.md)
|
|
59
80
|
- [Workflows](./workflows.md)
|
|
60
81
|
- [Schedules](./schedules.md)
|
|
82
|
+
- [Inbox & Notifications](./inbox-notifications.md)
|