Skip to content

Commit 56a4ede

Browse files
committed
feat: enhance AI tools and agents with new functionalities
- Added `LinkExtractorTool` and `SiteMapExtractorTool` to the tools index, exporting types for better type management. - Updated `LinkExtractorTool` to import types from local `types.ts` file and improved class properties for better styling. - Refactored `SiteMapExtractorTool` to use nullish coalescing operator for default values and imported types from local `types.ts`. - Modified `WebScraperTool` to import types from local `types.ts` for consistency. - Expanded `a2aCoordinatorAgent` to include new agents for knowledge indexing, coding tasks, and project management, enhancing multi-agent orchestration capabilities. - Introduced new workflows for research synthesis, repo ingestion, and specification generation. - Updated `codingA2ACoordinator` to support safe refactoring and sandbox execution for coding tasks. - Enhanced MCP server to expose new coding coordination prompts for feature development, refactoring, and knowledge indexing. - Added E2B tools for sandbox execution in coding agents, ensuring safe testing and verification of code changes. - Updated `codingTeamNetwork` to utilize the latest Google model for improved performance. - Refactored tools index to include a comprehensive list of available tools and their types for better organization and accessibility. - Created a new `types.ts` file for defining UI tool types, improving type safety across the application.
1 parent a497bf4 commit 56a4ede

24 files changed

Lines changed: 728 additions & 355 deletions

.blackboxrules

Whitespace-only changes.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ coverage/
99
# Next.js
1010
.next/
1111
out/
12+
assets/
13+
assets/*png
14+
assets/*jpg
1215

16+
.vercel/_build_output/
17+
.vercel/output/
1318
# Production
1419
build/
1520
dist/

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
# 🚀 AgentStack
66

7-
![Networks v1.0.0](networksv1.png)
7+
<img src="assets/logo.png" width="128" height="128" alt="AgentStack Logo" />
8+
9+
![Home](assets/image-1767685860512.png)
810
![Networks Custom Tool v1.0.0](networksCustomToolv1.png)
911

1012
<!-- Core Project Badges -->

app/chat/components/agent-tools.tsx

Lines changed: 57 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@ import { useMemo } from "react"
1414
import type { AgentToolsProps } from "./chat.types"
1515

1616
// Import custom tool components
17-
//import {
18-
// WebScraperTool,
19-
// BatchWebScraperTool,
20-
// SiteMapExtractorTool,
21-
// LinkExtractorTool,
22-
//} from "@/src/components/ai-elements/tools"
17+
import {
18+
WebScraperTool,
19+
BatchWebScraperTool,
20+
SiteMapExtractorTool,
21+
LinkExtractorTool,
22+
type WebScraperUITool,
23+
type BatchWebScraperUITool,
24+
type SiteMapExtractorUITool,
25+
type LinkExtractorUITool
26+
} from "@/src/components/ai-elements/tools"
2327

2428
function getProgressMessage(tool: ToolInvocationState | DynamicToolUIPart): string | null {
2529
const { input } = tool
@@ -91,53 +95,53 @@ export function AgentTools({ tools, className }: AgentToolsProps) {
9195
.filter((m): m is string => typeof m === "string" && m.length > 0)
9296

9397
// Check if this is a web scraper tool and render custom component
94-
// if (toolName === "web:scraper" && hasOutput) {
95-
// return (
96-
// <WebScraperTool
97-
// key={`${id}-${toolName}-${toolState}-${groupIdx}`}
98-
// toolCallId={id}
99-
// input={latest.input as WebScraperUITool["input"]}
100-
// output={latest.output as WebScraperUITool["output"]}
101-
// errorText={errorText}
102-
// />
103-
// )
104-
// }
105-
106-
// if (toolName === "batch-web-scraper" && hasOutput) {
107-
// return (
108-
// <BatchWebScraperTool
109-
// key={`${id}-${toolName}-${toolState}-${groupIdx}`}
110-
// toolCallId={id}
111-
// input={latest.input as BatchWebScraperUITool["input"]}
112-
// output={latest.output as BatchWebScraperUITool["output"]}
113-
// errorText={errorText}
114-
// />
115-
// )
116-
// }
117-
118-
// if (toolName === "site-map-extractor" && hasOutput) {
119-
// return (
120-
// <SiteMapExtractorTool
121-
// key={`${id}-${toolName}-${toolState}-${groupIdx}`}
122-
// toolCallId={id}
123-
// input={latest.input as SiteMapExtractorUITool["input"]}
124-
// output={latest.output as SiteMapExtractorUITool["output"]}
125-
// errorText={errorText}
126-
// />
127-
// )
128-
// }
129-
130-
//if (toolName === "link-extractor" && hasOutput) {
131-
// return (
132-
// <LinkExtractorTool
133-
// key={`${id}-${toolName}-${toolState}-${groupIdx}`}
134-
// toolCallId={id}
135-
// input={latest.input as LinkExtractorUITool["input"]}
136-
// output={latest.output as LinkExtractorUITool["output"]}
137-
// errorText={errorText}
138-
// />
139-
// )
140-
// }
98+
if (toolName === "web:scraper" && hasOutput) {
99+
return (
100+
<WebScraperTool
101+
key={`${id}-${toolName}-${toolState}-${groupIdx}`}
102+
toolCallId={id}
103+
input={latest.input as WebScraperUITool["input"]}
104+
output={latest.output as WebScraperUITool["output"]}
105+
errorText={errorText}
106+
/>
107+
)
108+
}
109+
110+
if (toolName === "batch-web-scraper" && hasOutput) {
111+
return (
112+
<BatchWebScraperTool
113+
key={`${id}-${toolName}-${toolState}-${groupIdx}`}
114+
toolCallId={id}
115+
input={latest.input as BatchWebScraperUITool["input"]}
116+
output={latest.output as BatchWebScraperUITool["output"]}
117+
errorText={errorText}
118+
/>
119+
)
120+
}
121+
122+
if (toolName === "site-map-extractor" && hasOutput) {
123+
return (
124+
<SiteMapExtractorTool
125+
key={`${id}-${toolName}-${toolState}-${groupIdx}`}
126+
toolCallId={id}
127+
input={latest.input as SiteMapExtractorUITool["input"]}
128+
output={latest.output as SiteMapExtractorUITool["output"]}
129+
errorText={errorText}
130+
/>
131+
)
132+
}
133+
134+
if (toolName === "link-extractor" && hasOutput) {
135+
return (
136+
<LinkExtractorTool
137+
key={`${id}-${toolName}-${toolState}-${groupIdx}`}
138+
toolCallId={id}
139+
input={latest.input as LinkExtractorUITool["input"]}
140+
output={latest.output as LinkExtractorUITool["output"]}
141+
errorText={errorText}
142+
/>
143+
)
144+
}
141145

142146
// Default rendering for other tools
143147
return (

app/chat/components/chat-messages.tsx

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ import type {
6969
WorkflowDataPart,
7070
NetworkDataPart,
7171
} from "@mastra/ai-sdk"
72+
import { AgentTool } from "@/ui/agent-tool"
7273
import { cn } from "@/lib/utils"
7374

7475
type MastraDataPart = AgentDataPart | WorkflowDataPart | NetworkDataPart | { type: `data-${string}`; id?: string; data: unknown }
@@ -516,37 +517,14 @@ function MessageItem({
516517
}
517518

518519
if (partType === "data-tool-agent" || partType === "data-tool-workflow" || partType === "data-tool-network") {
519-
const nestedPart = part as MastraDataPart
520-
const label =
521-
partType === "data-tool-agent"
522-
? "Tool Nested Agent Stream"
523-
: partType === "data-tool-workflow"
524-
? "Tool Nested Workflow Stream"
525-
: "Tool Nested Network Stream"
526-
520+
const nestedPart = part as any;
527521
return (
528-
<Collapsible
522+
<AgentTool
529523
key={`${message.id}-${partType}-${index}`}
530-
className="rounded-lg border bg-muted/40"
531-
defaultOpen={false}
532-
>
533-
<CollapsibleTrigger className="group flex w-full items-center justify-between px-4 py-2 text-xs font-semibold uppercase text-muted-foreground hover:text-foreground">
534-
<span>{label}</span>
535-
<div className="flex items-center gap-2">
536-
<Badge variant="secondary">Data Part</Badge>
537-
<ChevronDownIcon className="size-4 transition-transform group-data-[state=open]:rotate-180" />
538-
</div>
539-
</CollapsibleTrigger>
540-
<CollapsibleContent className="px-4 pb-4 pt-2">
541-
<CodeBlock
542-
code={JSON.stringify((nestedPart as { data?: unknown }).data ?? {}, null, 2)}
543-
language={"json" as BundledLanguage}
544-
className="my-2"
545-
>
546-
<CodeBlockCopyButton />
547-
</CodeBlock>
548-
</CollapsibleContent>
549-
</Collapsible>
524+
id={nestedPart.id ?? partType}
525+
type={partType as any}
526+
data={nestedPart.data}
527+
/>
550528
)
551529
}
552530

memory-bank/activeContext.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Active Context
22

3-
## Current Focus (Dec 2025)
3+
## Current Focus (Jan 2026)
44

5+
- **[NEW]** Enhanced Task Manager and Spec Generator skills with persona-driven logic and automation scripts.
56
- **[Synced Dec 8, 2025]** Chat Components Production Grade - 11 components improved with enhanced UX.
67
- **[Synced Dec 8, 2025]** Workflow System Audit complete - 12 workflows verified, 2 added to frontend config.
78
- **[Synced Dec 5, 2025]** AI Elements Integration 92% complete (12/13 tasks). Chat interface fully functional.
89
- **[NEW]** Models Configuration System: 150+ models from 6 providers, shared between `/chat` and `/networks`.
910
- **[COMPLETED]** Workflows UI 100% complete - 12 workflows with Canvas visualization, input panels, streaming output.
11+
- **[COMPLETED]** Unified Tool Exports: Consolidated 40+ tools into `src/mastra/tools/index.ts` and updated `src/components/ai-elements/tools/types.ts` with all tool types.
1012
- **[v1 - 50%]** Mastra Admin Dashboard v1 - MastraClient-based dashboard for observability, memory, logs, telemetry.
1113
- **[v2 - PLANNED]** Dashboard v2 feature spec created - 33 tasks, modular components, React Query, auth prep.
1214
- `/memory-bank` fully aligned with codebase: 22+ agents; 30+ tools; 12 workflows; 4 networks; config/pg-storage active.
@@ -19,6 +21,16 @@
1921
**Status:** ✅ Complete
2022
**Session:** Production-grade improvements to 11 chat components
2123

24+
**Recent Changes:**
25+
26+
- 2026-01-06: Upgraded `generative-ui-architect`, `multi-agent-orchestrator`, and `webapp-testing` with automation scripts (`scaffold_genui.py`, `visualize_network.py`, `generate_test_plan.py`).
27+
- 2026-01-06: Added Multi-Perspective Review and Quality Scorecards to `spec-generator`.
28+
- 2026-01-06: Added Dependency Mapping and Complexity Estimation into `task-manager`.
29+
- 2026-01-06: Enhanced `task-manager` and `spec-generator` skills with persona-driven logic and automation scripts (`persona_engine.py`, `task_generator.py`).
30+
- 2026-01-06: Created `skills/task-manager/` with `SKILL.md` and `TASK-TEMPLATE.md`.
31+
- 2026-01-06: Created `skills/spec-generator/` with `SKILL.md`, `PRD-TEMPLATE.md`, and `DESIGN-TEMPLATE.md`.
32+
- 2025-12-08: Improved 11 chat components with production-grade enhancements and fixed input background noise.
33+
2234
**Components Improved:**
2335

2436
| Component | Changes |

memory-bank/progress.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
| Agents | 22+ files | a2aCoordinatorAgent.ts, researchAgent.ts, stockAnalysisAgent.ts, copywriterAgent.ts, editorAgent.ts, reportAgent.ts, scriptWriterAgent.ts, contentStrategistAgent.ts, learningExtractionAgent.ts, evaluationAgent.ts, weather-agent.ts, excalidraw_validator.ts, csv_to_excalidraw.ts, image_to_csv.ts, dataExportAgent.ts, dataIngestionAgent.ts, dataTransformationAgent.ts, researchPaperAgent.ts, documentProcessingAgent.ts, knowledgeIndexingAgent.ts, dane.ts, sql.ts |
99
| Networks | 4 files | agentNetwork, dataPipelineNetwork, reportGenerationNetwork, researchPipelineNetwork |
1010
| Workflows | 12 files | weather-workflow.ts, content-studio-workflow.ts, content-review-workflow.ts, document-processing-workflow.ts, financial-report-workflow.ts, learning-extraction-workflow.ts, research-synthesis-workflow.ts, stock-analysis-workflow.ts, changelog.ts, telephone-game.ts, **repo-ingestion-workflow.ts (NEW)**, **spec-generation-workflow.ts (NEW)** |
11-
| Tools | 30+ | Financial: polygon-tools.ts(10+), finnhub-tools.ts(6+), alpha-vantage.tool.ts; Research: serpapi-*.tool.ts(5+), arxiv.tool.ts; Data: csv-to-json.tool.ts, json-to-csv.tool.ts, data-validator.tool.ts; RAG: document-chunking.tool.ts, pdf-data-conversion.tool.ts; Web: browser-tool.ts, web-scraper-tool.ts; Other: jwt-auth.tool.ts, execa-tool.ts, github.ts, fs.ts. |
11+
| Tools | | Unified all 40+ tools in `src/mastra/tools/index.ts`. All `UITool` types consolidated in `src/components/ai-elements/tools/types.ts`. Includes Financial, Research, Data, RAG, Code, Browser, Sandbox/Exec, Calendar, GitHub, and PNPM tools. |
1212
| MCP || `mcp/index.ts`: a2aCoordinatorMcpServer; tools: coordinate_a2a_task etc. |
1313
| Scorers || weather-scorer.ts, custom-scorers.ts. |
1414
| Observability || Arize/Phoenix exporters; always-on sampling. |
@@ -23,7 +23,8 @@
2323
| **Networks UI** || **app/networks/**: Full network interface with model selector, routing visualization, agent coordination. Shares model config with chat. |
2424
| **Workflows UI** | ✅ 100% | **app/workflows/**: Full Canvas visualization with 8 components, AI SDK streaming, input panels. **12 workflows** (added repoIngestion, specGeneration). Fixed pending/skipped status bug. **Fixed node blurriness.** |
2525
| **UI Clarity Fix** | ✅ 2026-01 | Added `ui-crisp` scoped overrides to disable backdrop-blur/noise/3D transforms on `/chat` + `/workflows` to prevent Windows text softening. |
26-
| **Mastra Admin Dashboard** | 🔄 70% | **app/dashboard/**: TanStack Query v5 installed, shared components created, loading/error files for all routes. Agents page modularized. See `/memory-bank/dashboard-v2/` for detailed tracking. |
26+
| **Mastra Admin Dashboard** | 🔄 70% | **app/dashboard/**: TanStack Query v5 installed, shared components created, loading/error files for all routes. See `/memory-bank/dashboard-v2/` for detailed tracking. |
27+
| **Custom Skills** | ✅ 2026-01 | **skills/**: Enhanced 5 core skills (`generative-ui`, `multi-agent-orch`, `webapp-testing`, etc.) with automation scripts and 2026 best practices. |
2728

2829
## Tooling Hardening **[Synced Dec 12]**
2930

networksv1.png

-167 KB
Binary file not shown.

skills/webapp-testing/SKILL.md

Lines changed: 0 additions & 116 deletions
This file was deleted.

0 commit comments

Comments
 (0)