stagent 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/cli.js +2 -0
  2. package/docs/.last-generated +1 -0
  3. package/docs/features/agent-intelligence.md +60 -0
  4. package/docs/features/chat.md +119 -0
  5. package/docs/features/cost-usage.md +61 -0
  6. package/docs/features/dashboard-kanban.md +73 -0
  7. package/docs/features/design-system.md +73 -0
  8. package/docs/features/documents.md +76 -0
  9. package/docs/features/home-workspace.md +66 -0
  10. package/docs/features/inbox-notifications.md +67 -0
  11. package/docs/features/keyboard-navigation.md +62 -0
  12. package/docs/features/monitoring.md +59 -0
  13. package/docs/features/playbook.md +57 -0
  14. package/docs/features/profiles.md +57 -0
  15. package/docs/features/projects.md +67 -0
  16. package/docs/features/provider-runtimes.md +49 -0
  17. package/docs/features/schedules.md +68 -0
  18. package/docs/features/settings.md +85 -0
  19. package/docs/features/shared-components.md +78 -0
  20. package/docs/features/tool-permissions.md +57 -0
  21. package/docs/features/workflows.md +81 -0
  22. package/docs/getting-started.md +141 -0
  23. package/docs/index.md +50 -0
  24. package/docs/journeys/developer.md +303 -0
  25. package/docs/journeys/personal-use.md +209 -0
  26. package/docs/journeys/power-user.md +248 -0
  27. package/docs/journeys/work-use.md +226 -0
  28. package/docs/manifest.json +240 -0
  29. package/package.json +2 -1
  30. package/src/app/api/environment/checkpoints/[id]/route.ts +3 -2
  31. package/src/app/api/environment/checkpoints/route.ts +2 -1
  32. package/src/app/api/environment/scan/route.ts +2 -1
  33. package/src/lib/agents/claude-agent.ts +3 -2
  34. package/src/lib/agents/runtime/claude.ts +4 -3
  35. package/src/lib/agents/runtime/openai-codex.ts +4 -3
  36. package/src/lib/chat/engine.ts +2 -1
  37. package/src/lib/chat/model-discovery.ts +2 -1
  38. package/src/lib/docs/reader.ts +11 -1
  39. package/src/lib/environment/scanner.ts +2 -1
  40. package/src/lib/environment/sync/mcp-sync.ts +2 -1
  41. package/src/lib/environment/sync-engine.ts +2 -1
  42. package/src/lib/environment/workspace-context.ts +6 -1
package/dist/cli.js CHANGED
@@ -495,6 +495,7 @@ function markAllMigrationsApplied(sqlite2, migrationsFolder, migrationsTable = "
495
495
  // bin/cli.ts
496
496
  var __dirname = dirname2(fileURLToPath(import.meta.url));
497
497
  var appDir = join3(__dirname, "..");
498
+ var launchCwd = process.cwd();
498
499
  var DATA_DIR = getStagentDataDir();
499
500
  var dbPath = getStagentDbPath();
500
501
  var pkg = JSON.parse(readFileSync(join3(appDir, "package.json"), "utf-8"));
@@ -621,6 +622,7 @@ async function main() {
621
622
  env: {
622
623
  ...process.env,
623
624
  STAGENT_DATA_DIR: DATA_DIR,
625
+ STAGENT_LAUNCH_CWD: launchCwd,
624
626
  PORT: String(actualPort)
625
627
  }
626
628
  });
@@ -0,0 +1 @@
1
+ 2026-03-22T20:46:49Z
@@ -0,0 +1,60 @@
1
+ ---
2
+ title: "Agent Intelligence"
3
+ category: "feature-reference"
4
+ section: "agent-intelligence"
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"]
8
+ screengrabCount: 0
9
+ lastUpdated: "2026-03-21"
10
+ ---
11
+
12
+ # Agent Intelligence
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
17
+
18
+ ## Key Features
19
+
20
+ ### Task Definition AI Assist
21
+
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 the user retains full control.
23
+
24
+ ### Multi-Agent Routing
25
+
26
+ When a task is created, the task classifier analyzes its content and automatically selects the best-fit agent profile from the registry (General, Code Reviewer, Researcher, Document Writer). The selected profile can be overridden manually via the profile dropdown. Routing logic lives in `src/lib/agents/profiles/`.
27
+
28
+ ### Autonomous Loop Execution
29
+
30
+ Tasks can run in autonomous loops with configurable stop conditions:
31
+
32
+ - **Iteration limit** — stop after N iterations.
33
+ - **Time limit** — stop after a duration elapses.
34
+ - **Success criteria** — stop when the agent reports completion.
35
+ - **Error threshold** — stop after repeated failures.
36
+
37
+ Loops support pause and resume. The `LoopStatusView` component provides real-time progress and control.
38
+
39
+ ### Multi-Agent Swarm
40
+
41
+ For complex tasks that benefit from multiple perspectives, the swarm feature coordinates several agents working concurrently. Each agent operates within its assigned profile, and results are aggregated upon completion.
42
+
43
+ ### Agent Self-Improvement
44
+
45
+ Agents accumulate learned context across iterations, stored in the `learned_context` table. This context feeds back into subsequent runs, allowing agents to refine their approach over time without manual prompt tuning.
46
+
47
+ ### Workflow Context Batching
48
+
49
+ In multi-step workflows, context from earlier steps is batched and forwarded to downstream steps. This prevents information loss across the workflow and ensures each step has the full picture of prior results.
50
+
51
+ ### Parallel Research Fork-Join
52
+
53
+ Research tasks can be forked into concurrent sub-tasks that investigate different angles simultaneously. Results are joined when all branches complete, producing a consolidated output that covers more ground than sequential execution.
54
+
55
+ ## Related
56
+
57
+ - [Provider Runtimes](./provider-runtimes.md)
58
+ - [Profiles](./profiles.md)
59
+ - [Workflows](./workflows.md)
60
+ - [Schedules](./schedules.md)
@@ -0,0 +1,119 @@
1
+ ---
2
+ title: "Chat"
3
+ category: "feature-reference"
4
+ section: "chat"
5
+ route: "/chat"
6
+ tags: ["chat", "conversations", "ai", "model-selection", "suggested-prompts", "quick-access", "streaming"]
7
+ features: ["chat-data-layer", "chat-engine", "chat-api-routes", "chat-ui-shell", "chat-message-rendering", "chat-input-composer"]
8
+ screengrabCount: 5
9
+ lastUpdated: "2026-03-22"
10
+ ---
11
+
12
+ # Chat
13
+
14
+ The Chat page is your conversational AI interface for managing and exploring your Stagent workspace. Ask questions about your projects, tasks, workflows, and documents — the assistant understands your setup and responds with context-aware answers, complete with direct links to the entities it mentions.
15
+
16
+ ## Screenshots
17
+
18
+ ![Chat empty state](../screengrabs/chat-list.png)
19
+ *Empty state with hero heading, suggested prompt categories, and conversation sidebar*
20
+
21
+ ![Active conversation](../screengrabs/chat-conversation.png)
22
+ *Active conversation showing streamed responses with Quick Access navigation pills*
23
+
24
+ ![Model selector](../screengrabs/chat-model-selector.png)
25
+ *Model selector dropdown showing available models grouped by provider with cost tiers*
26
+
27
+ ![Suggested prompts — Create tab](../screengrabs/chat-create-tab.png)
28
+ *Suggested prompts with the Create tab selected, showing context-aware prompt suggestions*
29
+
30
+ ![Quick Access pills](../screengrabs/chat-quick-access.png)
31
+ *Quick Access navigation pill linking directly to a mentioned task*
32
+
33
+ ## Key Features
34
+
35
+ ### Conversations
36
+
37
+ Every chat starts a new conversation that is saved automatically. Your conversation history appears in the left sidebar, sorted by most recent. Click any past conversation to pick up where you left off. You can rename, archive, or delete conversations from the context menu.
38
+
39
+ On mobile and tablet, the conversation list is tucked behind a menu icon and slides in as an overlay so the message area gets full screen space.
40
+
41
+ ### Model Selection
42
+
43
+ Choose which AI model powers your conversation using the model selector at the bottom of the input area. Models are grouped by provider with clear cost and capability labels:
44
+
45
+ - **Haiku 4.5** — Fast responses at the lowest cost ($). The default choice for everyday questions.
46
+ - **Sonnet 4.6** — A balance of speed and depth ($$). Good for nuanced analysis.
47
+ - **Opus 4.6** — The most capable model ($$$). Best for complex reasoning and detailed answers.
48
+ - **GPT-4o-mini** — Fast alternative ($). Available when the Codex runtime is connected.
49
+ - **GPT-4o** — Balanced alternative ($$). Available when the Codex runtime is connected.
50
+
51
+ Your preferred default model can be set in the Settings page under "Chat default model." The selection persists per conversation, so switching models mid-conversation is seamless.
52
+
53
+ ### Suggested Prompts
54
+
55
+ When you open Chat with no active conversation, the hero area displays a grid of suggested prompts organized into tabbed categories. These prompts are generated from your actual workspace data:
56
+
57
+ - **Project-aware** — "What's the status of [your project name]?"
58
+ - **Task-aware** — "Why did [a recently failed task] fail?"
59
+ - **Document-aware** — "Summarize [a recent document]"
60
+ - **System** — "What can you help me with?"
61
+
62
+ Click any suggestion to insert it into the input and start a conversation instantly.
63
+
64
+ ### Quick Access Navigation Pills
65
+
66
+ When the assistant mentions a project, task, workflow, document, or schedule in its response, navigation pills appear at the bottom of the message bubble after streaming completes. Each pill shows an icon and label — click it to jump directly to that entity's page. This turns the chat into a workspace control plane: ask a question, then navigate to the relevant item in one click.
67
+
68
+ ### Entity Management via Chat
69
+
70
+ The assistant understands your Stagent workspace — your projects, tasks, workflows, documents, and schedules. You can ask about statuses, request summaries, or get recommendations, and the assistant draws from your actual data to answer. The progressive context system loads relevant workspace information automatically so you don't need to explain your setup.
71
+
72
+ ### Streaming Responses
73
+
74
+ Responses stream in token by token with a blinking cursor, so you see the answer forming in real time. A "Thinking..." indicator appears before the first token arrives. Markdown formatting — headings, lists, code blocks with syntax highlighting, tables, and links — renders as the text streams in. Code blocks include a copy button and language label for easy reference.
75
+
76
+ ## How To
77
+
78
+ ### Start a Conversation
79
+
80
+ 1. Click **Chat** in the sidebar (under the Work section).
81
+ 2. Type your question in the input area at the bottom, or click a suggested prompt.
82
+ 3. Press **Enter** to send. The assistant's response streams in immediately.
83
+
84
+ ### Switch Models
85
+
86
+ 1. Click the model selector to the left of the input area (it shows the current model name).
87
+ 2. Choose a different model from the dropdown. Models are labeled with cost tiers ($, $$, $$$).
88
+ 3. Your next message will use the selected model. The choice is saved for this conversation.
89
+
90
+ ### Use Suggested Prompts
91
+
92
+ 1. On the Chat page with no active conversation, browse the suggested prompt categories.
93
+ 2. Click a prompt to insert it into the input area.
94
+ 3. Edit the prompt text if needed, then press **Enter** to send.
95
+
96
+ ### Navigate to Entities from Chat
97
+
98
+ 1. Ask the assistant about a project, task, or other workspace item.
99
+ 2. After the response finishes streaming, look for the Quick Access pills at the bottom of the message.
100
+ 3. Click a pill to navigate directly to that entity's detail page.
101
+
102
+ ### Manage Conversations
103
+
104
+ 1. Right-click (or long-press on mobile) a conversation in the sidebar to rename, archive, or delete it.
105
+ 2. Click "New Chat" at the top of the conversation list to start a fresh conversation.
106
+ 3. Archived conversations can be restored from the conversation list filters.
107
+
108
+ ### Stop a Response
109
+
110
+ 1. While a response is streaming, the Send button changes to a Stop button (square icon).
111
+ 2. Click Stop to cancel the response. The partial text is preserved in the conversation.
112
+
113
+ ## Related
114
+
115
+ - [Dashboard Kanban](./dashboard-kanban.md) — manage the tasks your chat assistant references
116
+ - [Profiles](./profiles.md) — agent profiles that shape task execution behavior
117
+ - [Projects](./projects.md) — the projects that provide context to your chat conversations
118
+ - [Documents](./documents.md) — documents the assistant can summarize and reference
119
+ - [Settings](./settings.md) — configure your default chat model and other preferences
@@ -0,0 +1,61 @@
1
+ ---
2
+ title: "Cost & Usage"
3
+ category: "feature-reference"
4
+ section: "cost-usage"
5
+ route: "/costs"
6
+ tags: [costs, usage, budget, metering, tokens, spend, guardrails]
7
+ features: ["cost-and-usage-dashboard", "usage-metering-ledger", "spend-budget-guardrails"]
8
+ screengrabCount: 1
9
+ lastUpdated: "2026-03-21"
10
+ ---
11
+
12
+ # Cost & Usage
13
+
14
+ Track spend across providers and monitor token consumption with the cost and usage dashboard. The usage metering ledger records every token used by task, project, and provider, while budget guardrails enforce configurable spend caps to prevent runaway costs. Visual meters give you an at-a-glance view of current spend versus your configured budget.
15
+
16
+ ## Screenshots
17
+
18
+ ![Cost and usage dashboard with spend breakdown](../screengrabs/cost-usage-list.png)
19
+ *The cost and usage dashboard showing spend metrics, provider breakdown, and budget pacing indicators.*
20
+
21
+ ## Key Features
22
+
23
+ ### Spend Dashboard
24
+ The cost dashboard provides an overview of total spend across all provider runtimes. Key metrics include total spend to date, current period spend, and trend indicators showing whether costs are increasing or decreasing relative to prior periods.
25
+
26
+ ### Usage Metering Ledger
27
+ Every agent execution records token consumption in the usage ledger. The ledger tracks input tokens, output tokens, and total tokens broken down by individual task, parent project, and provider runtime. This granular data enables precise cost attribution and optimization.
28
+
29
+ ### Provider Breakdown
30
+ Spend is segmented by provider runtime, showing separate cost totals for Claude (Agent SDK) and Codex (App Server). The breakdown helps you understand which provider is driving costs and make informed decisions about runtime selection.
31
+
32
+ ### Budget Guardrails
33
+ Configure spend caps to prevent unexpected cost overruns. Set an overall budget limit and monthly allocation splits. When spend approaches the cap, alerts notify you before the limit is reached. Once the cap is hit, guardrails can pause new executions to prevent further charges.
34
+
35
+ ### Visual Budget Meters
36
+ Progress bars and visual meters display current spend relative to your configured budget. Color-coded indicators shift from green to yellow to red as spend approaches the cap, providing immediate visual feedback on budget health.
37
+
38
+ ## How To
39
+
40
+ ### Review Current Spend
41
+ 1. Navigate to `/costs` from the sidebar under the **Configure** group.
42
+ 2. View the total spend summary at the top of the dashboard.
43
+ 3. Check the provider breakdown to see Claude vs. Codex spend.
44
+ 4. Review the visual meters for budget pacing.
45
+
46
+ ### Set a Budget Cap
47
+ 1. Navigate to `/settings` and open the **Budget** section.
48
+ 2. Enter an overall spend cap amount.
49
+ 3. Configure the monthly split to distribute the budget across the billing period.
50
+ 4. Save the settings. The budget meters on the cost dashboard will reflect the new cap.
51
+
52
+ ### Investigate High Spend
53
+ 1. Open the cost dashboard at `/costs`.
54
+ 2. Identify which provider or project is contributing the most spend.
55
+ 3. Drill into the usage ledger to find high-token-count tasks.
56
+ 4. Consider switching to a different provider runtime or adjusting task prompts to reduce token usage.
57
+
58
+ ## Related
59
+ - [Settings](./settings.md)
60
+ - [Monitoring](./monitoring.md)
61
+ - [Schedules](./schedules.md)
@@ -0,0 +1,73 @@
1
+ ---
2
+ title: "Dashboard Kanban"
3
+ category: "feature-reference"
4
+ section: "dashboard-kanban"
5
+ route: "/dashboard"
6
+ tags: [tasks, kanban, board, table, filter, create, ai-assist, drag-and-drop]
7
+ features: ["task-board", "kanban-board-operations", "micro-visualizations", "task-definition-ai", "detail-view-redesign", "ui-density-refinement"]
8
+ screengrabCount: 2
9
+ lastUpdated: "2026-03-21"
10
+ ---
11
+
12
+ # Dashboard Kanban
13
+
14
+ The Dashboard is your primary task management surface. It presents all tasks as a Kanban board with drag-and-drop columns, or as a sortable table — whichever fits your workflow. A powerful filter bar, AI-assisted task creation, and inline editing let you manage agent work without switching context.
15
+
16
+ ## Screenshots
17
+
18
+ ![Dashboard board view](../screengrabs/dashboard-list.png)
19
+ *Kanban board with columns for Planned, Queued, Running, Completed, and Failed tasks*
20
+
21
+ ![Dashboard table view](../screengrabs/dashboard-table.png)
22
+ *Table view with sortable columns for title, status, priority, project, and timestamps*
23
+
24
+ ## Key Features
25
+
26
+ ### Kanban Board
27
+ Tasks are organized into five columns — Planned, Queued, Running, Completed, and Failed. Each column shows a count of its tasks. Cards display the task title, priority badge, and quick-action buttons for editing and deleting.
28
+
29
+ ### Drag-and-Drop Reordering
30
+ Drag task cards between columns to change their status, or within a column to reorder priority. The board updates the database in real time as you drop cards.
31
+
32
+ ### Board and Table Toggle
33
+ Switch between the visual Kanban board and a dense table view using the toggle in the toolbar. The table view provides sortable columns for title, status, priority, project, and timestamps — ideal for bulk review.
34
+
35
+ ### Filter Bar
36
+ Combobox filters for project, status, and priority let you narrow the board or table to exactly the tasks you care about. Filters persist across view toggles.
37
+
38
+ ### AI-Assisted Task Creation
39
+ The task creation form at `/tasks/new` includes fields for title, description, project, priority, runtime, and agent profile. The AI Assist button analyzes your title and description, then enhances them with structured context, acceptance criteria, and suggested parameters.
40
+
41
+ ### Task Detail View
42
+ Click any task card to open a detail panel with the full description, execution logs, status history, and action buttons. Edit the task inline or trigger execution directly from the detail view.
43
+
44
+ ## How To
45
+
46
+ ### Create a New Task
47
+ 1. Click the "New Task" button in the dashboard toolbar, or navigate to `/tasks/new`.
48
+ 2. Enter a title and description for the task.
49
+ 3. Optionally select a project, priority level, runtime, and agent profile.
50
+ 4. Click the "AI Assist" button to enhance your description with structured context.
51
+ 5. Click "Create Task" to add it to the Planned column.
52
+
53
+ ### Move a Task Between Statuses
54
+ 1. In the board view, click and hold a task card.
55
+ 2. Drag it to the target column (e.g., from Planned to Queued).
56
+ 3. Release to drop — the status updates immediately.
57
+
58
+ ### Filter Tasks
59
+ 1. Use the filter bar at the top of the dashboard.
60
+ 2. Select a project, status, or priority from the combobox dropdowns.
61
+ 3. The board or table updates instantly to show matching tasks.
62
+ 4. Clear filters by clicking the reset button.
63
+
64
+ ### Edit a Task
65
+ 1. Click the edit icon on any task card, or open the task detail view.
66
+ 2. Modify the title, description, priority, or other fields.
67
+ 3. Save changes — the card updates across all views.
68
+
69
+ ## Related
70
+ - [Home Workspace](./home-workspace.md)
71
+ - [Projects](./projects.md)
72
+ - [Workflows](./workflows.md)
73
+ - [Profiles](./profiles.md)
@@ -0,0 +1,73 @@
1
+ ---
2
+ title: "Design System — Calm Ops"
3
+ category: "feature-reference"
4
+ section: "design-system"
5
+ route: "cross-cutting"
6
+ tags: [design, tokens, oklch, typography, elevation, components, calm-ops]
7
+ features: ["calm-ops-design-system", "oklch-color-tokens", "shared-component-library"]
8
+ screengrabCount: 0
9
+ lastUpdated: "2026-03-21"
10
+ ---
11
+
12
+ # Design System — Calm Ops
13
+
14
+ Stagent follows the "Calm Ops" design philosophy: opaque surfaces, border-centric elevation, and zero glass morphism. The system is defined in `design-system/MASTER.md` and implemented through CSS custom properties in `src/app/globals.css`.
15
+
16
+ ## Key Features
17
+
18
+ ### Color System
19
+
20
+ OKLCH color space with an accent hue of ~250 (indigo/blue-violet). Light-first theme with dark mode support. All color tokens are defined as OKLCH values, ensuring perceptual uniformity across the palette. Forbidden patterns: `rgba()`, `backdrop-filter`, `glass-*`, `gradient-*`.
21
+
22
+ ### Elevation Model
23
+
24
+ Four elevation levels replace shadow-heavy or glass-based depth cues:
25
+
26
+ | Level | Usage | Treatment |
27
+ |-------|-------|-----------|
28
+ | `.elevation-0` | Flat / inset content | No shadow, subtle border |
29
+ | `.elevation-1` | Cards, panels | Light border + minimal shadow |
30
+ | `.elevation-2` | Popovers, dropdowns | Medium border + soft shadow |
31
+ | `.elevation-3` | Modals, command palette | Prominent border + deeper shadow |
32
+
33
+ ### Surface Hierarchy
34
+
35
+ Three surface tiers create visual nesting without transparency:
36
+
37
+ - **surface-1** — white / raised (cards, panels)
38
+ - **surface-2** — muted (page backgrounds, secondary areas)
39
+ - **surface-3** — inset (code blocks, input fields)
40
+
41
+ ### Typography
42
+
43
+ - **Body text**: Inter — clean, highly legible at 14px base size.
44
+ - **Monospace**: JetBrains Mono — code blocks, terminal output, status values.
45
+
46
+ ### Spacing
47
+
48
+ 8pt spacing scale via `--space-*` CSS custom properties. All padding, margin, and gap values derive from this scale to maintain consistent rhythm across layouts.
49
+
50
+ ### Border Radius
51
+
52
+ Maximum radius is `rounded-xl` (12px). Components use `rounded-lg` for interactive cards and `rounded-md` for inputs and buttons.
53
+
54
+ ### Badge Variants
55
+
56
+ Five status-driven badge variants map to task and workflow states:
57
+
58
+ | Variant | Status | Color |
59
+ |---------|--------|-------|
60
+ | `default` | Running | Indigo |
61
+ | `success` | Completed | Green |
62
+ | `secondary` | Queued | Gray |
63
+ | `destructive` | Failed | Red |
64
+ | `outline` | Planned | Border only |
65
+
66
+ ### Interactive Cards
67
+
68
+ All interactive cards implement focus-visible rings for keyboard navigation, `rounded-lg` corners, and keyboard event handlers (Enter/Space to activate).
69
+
70
+ ## Related
71
+
72
+ - [Shared Components](./shared-components.md)
73
+ - [Keyboard Navigation](./keyboard-navigation.md)
@@ -0,0 +1,76 @@
1
+ ---
2
+ title: "Documents"
3
+ category: "feature-reference"
4
+ section: "documents"
5
+ route: "/documents"
6
+ tags: [documents, upload, preprocessing, pdf, office, text-extraction, agent-context]
7
+ features: ["document-manager", "file-attachment-data-layer", "document-preprocessing", "agent-document-context", "document-output-generation"]
8
+ screengrabCount: 2
9
+ lastUpdated: "2026-03-21"
10
+ ---
11
+
12
+ # Documents
13
+
14
+ The Document Library is where you upload, manage, and organize files that agents can reference during task execution. Stagent automatically preprocesses uploaded files to extract text, making their content available as context for agents without manual copy-pasting.
15
+
16
+ ## Screenshots
17
+
18
+ ![Documents table view](../screengrabs/documents-list.png)
19
+ *Document library in table view showing file name, type, size, and processing status*
20
+
21
+ ![Documents grid view](../screengrabs/documents-grid.png)
22
+ *Grid view displaying document thumbnails and metadata cards*
23
+
24
+ ## Key Features
25
+
26
+ ### Table and Grid Views
27
+ Toggle between a table view for dense scanning (file name, type, size, processing status, timestamps) and a grid view with visual cards. Both views support selection for bulk operations.
28
+
29
+ ### Upload Dialog with Drag-and-Drop
30
+ The upload dialog accepts files via drag-and-drop or file picker. A visual indicator shows supported file types. Multiple files can be uploaded in a single batch.
31
+
32
+ ### Supported File Types
33
+ Stagent processes a range of document formats:
34
+ - **PDF** — Text extraction via pdf-parse.
35
+ - **Text** — Plain text, Markdown, code files.
36
+ - **Images** — Metadata extraction (dimensions, format) via image-size.
37
+ - **Office Documents** — Word documents via mammoth, presentations and archives via jszip.
38
+ - **Spreadsheets** — Excel and CSV files via xlsx parser.
39
+
40
+ ### Automatic Preprocessing
41
+ After upload, Stagent automatically extracts text content from supported file types. The extracted text is stored alongside the original file, ready to be injected into agent context. Processing status is visible on each document card.
42
+
43
+ ### Agent Document Context
44
+ Documents can be attached to tasks. When an agent executes a task with attached documents, the extracted text is included in the agent's context window, giving it direct access to the document content without needing file-system access.
45
+
46
+ ### Document Output Generation
47
+ Agents can generate documents as output during task execution. Generated files are added to the document library automatically, linked back to the originating task.
48
+
49
+ ## How To
50
+
51
+ ### Upload Documents
52
+ 1. Navigate to `/documents` and click "Upload."
53
+ 2. Drag and drop files into the upload zone, or click to browse.
54
+ 3. Select one or more files — supported types are shown in the dialog.
55
+ 4. Click "Upload" to start the process.
56
+ 5. Preprocessing begins automatically — watch the status indicator on each document.
57
+
58
+ ### Attach Documents to a Task
59
+ 1. When creating or editing a task, look for the document attachment field.
60
+ 2. Select one or more documents from the library.
61
+ 3. The agent will receive the extracted text as part of its context when executing the task.
62
+
63
+ ### Switch Between Views
64
+ 1. Use the view toggle at the top of the documents page.
65
+ 2. Table view is best for scanning many documents by metadata.
66
+ 3. Grid view is best for visual browsing when file types include images.
67
+
68
+ ### Delete Documents
69
+ 1. Select one or more documents using the checkboxes.
70
+ 2. Click "Delete" to remove them from the library.
71
+ 3. Bulk delete is supported for cleaning up multiple files at once.
72
+
73
+ ## Related
74
+ - [Projects](./projects.md)
75
+ - [Dashboard Kanban](./dashboard-kanban.md)
76
+ - [Workflows](./workflows.md)
@@ -0,0 +1,66 @@
1
+ ---
2
+ title: "Home Workspace"
3
+ category: "feature-reference"
4
+ section: "home-workspace"
5
+ route: "/"
6
+ tags: [dashboard, home, workspace, navigation, sidebar, trust-tier]
7
+ features: ["homepage-dashboard", "app-shell"]
8
+ screengrabCount: 2
9
+ lastUpdated: "2026-03-21"
10
+ ---
11
+
12
+ # Home Workspace
13
+
14
+ The Home Workspace is your landing page when you open Stagent. It provides a real-time overview of agent activity, task status, and items that need your attention. The persistent sidebar organizes all workspace areas into three logical groups for quick navigation.
15
+
16
+ ## Screenshots
17
+
18
+ ![Home workspace list view](../screengrabs/home-list.png)
19
+ *Home workspace showing greeting, stat cards, needs attention section, and recent activity*
20
+
21
+ ![Home workspace below the fold](../screengrabs/home-below-fold.png)
22
+ *Scrolled view showing additional recent activity and workspace context*
23
+
24
+ ## Key Features
25
+
26
+ ### At-a-Glance Stat Cards
27
+ Five stat cards at the top of the home page give you an instant pulse on your workspace: tasks currently running, tasks completed today, tasks awaiting your review, active projects, and active workflows. Each card updates in real time as agents execute work.
28
+
29
+ ### Needs Attention Section
30
+ Items requiring human action — such as permission requests, failed tasks, or stalled workflows — surface here automatically. This ensures nothing slips through the cracks when agents need your input.
31
+
32
+ ### Recent Activity Feed
33
+ A chronological feed of the latest events across your workspace: task completions, agent messages, workflow transitions, and document uploads. Gives you context on what happened while you were away.
34
+
35
+ ### Sidebar Navigation
36
+ The sidebar organizes Stagent into three groups:
37
+ - **Work** — Dashboard, Inbox, Projects, Workflows, Documents
38
+ - **Manage** — Monitor, Profiles, Schedules, Cost & Usage
39
+ - **Configure** — Playbook, Settings
40
+
41
+ ### Trust Tier Badge
42
+ A badge in the sidebar footer displays your current trust tier (e.g., Supervised, Semi-Autonomous, Autonomous). This controls the default permission level for agent tool usage across the workspace.
43
+
44
+ ## How To
45
+
46
+ ### Check What Needs Your Attention
47
+ 1. Open Stagent — the home workspace loads by default at `/`.
48
+ 2. Scan the stat cards for any tasks awaiting review.
49
+ 3. Scroll to the "Needs Attention" section for actionable items.
50
+ 4. Click any item to navigate directly to the relevant detail view.
51
+
52
+ ### Navigate to a Workspace Area
53
+ 1. Use the sidebar on the left to find the area you need.
54
+ 2. Work items (Dashboard, Inbox, Projects, Workflows, Documents) are in the top group.
55
+ 3. Management tools (Monitor, Profiles, Schedules, Cost & Usage) are in the middle group.
56
+ 4. Configuration (Playbook, Settings) is at the bottom.
57
+
58
+ ### Check Your Trust Tier
59
+ 1. Look at the sidebar footer for the trust tier badge.
60
+ 2. Click the badge to see a popover with details about your current permission level.
61
+ 3. To change the trust tier, navigate to Settings.
62
+
63
+ ## Related
64
+ - [Dashboard Kanban](./dashboard-kanban.md)
65
+ - [Inbox Notifications](./inbox-notifications.md)
66
+ - [Settings](./settings.md)
@@ -0,0 +1,67 @@
1
+ ---
2
+ title: "Inbox & Notifications"
3
+ category: "feature-reference"
4
+ section: "inbox-notifications"
5
+ route: "/inbox"
6
+ tags: [inbox, notifications, permissions, approval, human-in-the-loop, toast]
7
+ features: ["inbox-notifications", "ambient-approval-toast", "content-handling"]
8
+ screengrabCount: 2
9
+ lastUpdated: "2026-03-21"
10
+ ---
11
+
12
+ # Inbox & Notifications
13
+
14
+ The Inbox is your notification center for all agent activity that needs awareness or action. Notifications range from informational (task completed, agent message) to actionable (permission required). Rich content rendering and progressive disclosure keep the inbox scannable without hiding important details.
15
+
16
+ ## Screenshots
17
+
18
+ ![Inbox list view](../screengrabs/inbox-list.png)
19
+ *Inbox showing notifications grouped by category with unread badges*
20
+
21
+ ![Inbox expanded notification](../screengrabs/inbox-expanded.png)
22
+ *Expanded notification revealing additional context via Show More*
23
+
24
+ ## Key Features
25
+
26
+ ### Notification Categories
27
+ Notifications are categorized by type: task completed, agent message, and permission required. Each category has a distinct visual indicator so you can scan the inbox quickly and focus on what matters.
28
+
29
+ ### Unread Badges
30
+ Unread notifications display a badge count in both the inbox and the sidebar navigation item. Notifications are marked as read when you expand them or take action.
31
+
32
+ ### Progressive Disclosure
33
+ Long notifications start collapsed with a summary. Click "Show More" to expand the full content. This keeps the inbox compact while ensuring no detail is lost.
34
+
35
+ ### Rich Content Rendering
36
+ Notification bodies render Markdown content using ReactMarkdown with GitHub Flavored Markdown (GFM) support. Agent messages can include code blocks, tables, lists, and links — all rendered inline.
37
+
38
+ ### Human-in-the-Loop Approvals
39
+ When an agent requests permission to use a tool, a "Permission Required" notification appears with Approve and Deny buttons. This is the core human-in-the-loop mechanism — you stay in control of what agents can do.
40
+
41
+ ### Ambient Approval Toasts
42
+ For quick permission grants, ambient toasts appear at the edge of the screen. You can approve or deny without navigating to the inbox, keeping your workflow uninterrupted.
43
+
44
+ ## How To
45
+
46
+ ### Review Notifications
47
+ 1. Navigate to `/inbox` or click the Inbox item in the sidebar.
48
+ 2. Scan the notification list — unread items are visually distinct.
49
+ 3. Click a notification to expand its details.
50
+ 4. Click "Show More" for long notifications to see the full content.
51
+
52
+ ### Approve or Deny a Permission Request
53
+ 1. Look for notifications with the "Permission Required" category.
54
+ 2. Expand the notification to see what tool the agent wants to use and why.
55
+ 3. Click "Approve" to grant the permission, or "Deny" to reject it.
56
+ 4. The agent resumes or halts based on your decision.
57
+
58
+ ### Handle Ambient Toasts
59
+ 1. When a toast appears at the screen edge, review the permission request summary.
60
+ 2. Click "Approve" or "Deny" directly on the toast.
61
+ 3. The toast dismisses automatically after action or timeout.
62
+
63
+ ## Related
64
+ - [Home Workspace](./home-workspace.md)
65
+ - [Dashboard Kanban](./dashboard-kanban.md)
66
+ - [Tool Permissions](./tool-permissions.md)
67
+ - [Settings](./settings.md)