|
1 | 1 | # AgentStack |
2 | 2 |
|
3 | | -> A production-grade multi-agent framework built on Mastra, delivering enterprise tools, specialized agents, and A2A/MCP orchestration for scalable AI systems. |
| 3 | +> Production-grade multi-agent framework (Mastra) with a Next.js frontend. This repository contains the Mastra core (agents, tools, workflows, networks, MCP/A2A servers), frontend UI (Next.js app + shadcn/ui components), documentation, examples, and tests. Use the sections below to quickly find core docs, specs, examples, and configuration. |
4 | 4 |
|
5 | 5 | ## Documentation |
6 | 6 |
|
7 | | -- [Main README](README.md): Primary project documentation, architecture overview, and getting started guide |
8 | | -- [Agents Documentation](src/mastra/agents/AGENTS.md): Detailed documentation for the agent framework, including development workflows and best practices |
9 | | -- [Tools Documentation](src/mastra/tools/AGENTS.md): Comprehensive guide to available tools, including financial, search, and document processing capabilities |
10 | | -- [Product Context](memory-bank/productContext.md): Detailed product goals, user problems, and core capabilities |
11 | | -- [Technical Context](memory-bank/techContext.md): Technical constraints, dependencies, and development environment setup |
12 | | -- [System Patterns](memory-bank/systemPatterns.md): Architecture patterns, key technical decisions, and design principles |
13 | | -- [ADR: PgVector and Gemini Embeddings](docs/adr/0001-why-pgvector-and-gemini-embeddings.md): Architecture decision record for vector storage and embedding model choices |
| 7 | +- [Main README](README.md): Primary project documentation, architecture overview, running & development instructions |
| 8 | +- [Root AGENTS](AGENTS.md): Project-level overview and links to subdirectory AGENTS.md files |
| 9 | +- [Frontend (App) Docs](app/AGENTS.md): Next.js App Router layout, pages, and UX patterns for the frontend |
| 10 | +- [Mastra Core Docs](src/mastra/AGENTS.md): Top-level Mastra library overview (agents/tools/workflows/networks) |
| 11 | +- [Agents Documentation](src/mastra/agents/AGENTS.md): Agent development patterns, list of agents and change log |
| 12 | +- [Tools Documentation](src/mastra/tools/AGENTS.md): Tool catalogue (financial, RAG, scraping, PDF, utilities) |
| 13 | +- [Workflows Docs](src/mastra/workflows/AGENTS.md): Multi-step workflow patterns and examples |
| 14 | +- [Config & Provider Docs](src/mastra/config/AGENTS.md): Model provider, storage, and environment configuration guidance |
| 15 | +- [MCP Docs](src/mastra/mcp/AGENTS.md): Model Context Protocol server and client docs |
| 16 | +- [Data Directory Docs](src/mastra/data/AGENTS.md): Static data, examples and test-data descriptions |
| 17 | +- [A2A Coordination](src/mastra/a2a/AGENTS.md): Agent-to-Agent coordination and routing |
| 18 | +- [Scorers Documentation](src/mastra/scorers/AGENTS.md): Custom evaluation metrics and scoring guides |
| 19 | +- [Policy Documentation](src/mastra/policy/AGENTS.md): RBAC policies and access control definitions |
| 20 | +- [Vector Store Docs](src/mastra/config/vector/AGENTS.md): Vector store choices, configuration, and integration |
| 21 | +- [UI Components](ui/): shadcn/ui-based primitives and frontend components (see `ui/` folder) |
| 22 | + - [AI Elements (components)](src/components/ai-elements/): 30+ specialized UI components (artifact, chain-of-thought, reasoning, message, model-selector, canvas) used by chat/AI pages |
| 23 | + - [UI Primitives (shadcn)](ui/): shadcn/ui-based primitives and frontend components (see `ui/` folder) |
| 24 | +- [Memory Bank & Project Context](memory-bank/activeContext.md): active context, productContext.md, techContext.md, and usage notes |
| 25 | +- [Copilot & Project Rules](memory-bank/copilot-rules.md): Internal guidance for CI/automation/coding assistant usage |
| 26 | +- [API Reference & Developer Guides](docs/api.md, docs/api-small.md): API and developer-facing documentation |
| 27 | +- [Dashboard AGENTS](app/dashboard/AGENTS.md): Admin dashboard for monitoring and management |
| 28 | +- [Networks AGENTS](app/networks/AGENTS.md): Agent network management and visualization |
| 29 | +- [Chat AGENTS](app/chat/AGENTS.md): Client-side and streaming chat demos using @mastra/client-js |
| 30 | +- [Test AGENTS](app/test/AGENTS.md): Server action and runtime demos |
| 31 | +- [Workflows AGENTS](app/workflows/AGENTS.md): Workflow documentation and execution |
| 32 | +- [Tools AGENTS](app/tools/AGENTS.md): Tool documentation and execution |
14 | 33 |
|
15 | 34 | ## Agents |
16 | 35 |
|
|
55 | 74 |
|
56 | 75 | ## Configuration |
57 | 76 |
|
58 | | -- [Configuration Guide](src/mastra/config/AGENTS.md): Guidelines for configuration, storage, and environment variables |
| 77 | +- [Configuration Guide](src/mastra/config/AGENTS.md): Guidelines for configuration, storage, providers and environment variables |
59 | 78 | - [Config README](src/mastra/config/README.md): Model registry system and provider configuration overview |
60 | | -- [Config Index](src/mastra/config/index.ts): Central export for project configuration |
61 | | -- [OpenAI Config](src/mastra/config/openai.ts): OpenAI model provider client setup |
62 | | -- [Google Config](src/mastra/config/google.ts): Google AI model provider client setup |
63 | | -- [Anthropic Config](src/mastra/config/anthropic.ts): Anthropic model provider client setup |
64 | | -- [OpenRouter Config](src/mastra/config/openrouter.ts): OpenRouter model provider client setup |
65 | | -- [Vertex Config](src/mastra/config/vertex.ts): Google Vertex AI model provider setup |
66 | | -- [Gemini CLI Config](src/mastra/config/gemini-cli.ts): Gemini CLI provider setup |
67 | | -- [Postgres Storage](src/mastra/config/pg-storage.ts): PostgreSQL storage & vector client config with PgVector |
68 | | -- [Logger Config](src/mastra/config/logger.ts): Structured logging (Pino) configuration |
69 | | -- [Role Hierarchy](src/mastra/config/role-hierarchy.ts): RBAC inheritance model |
70 | | -- [Upstash Memory](src/mastra/config/upstashMemory.ts): Upstash memory configuration |
71 | | -- [Processors](src/mastra/config/processors.ts): Data processors configuration |
72 | | -- [Vector Stores](src/mastra/config/vector/AGENTS.md): Vector store choices and configuration guide |
| 79 | +- [Example Provider Setup](src/mastra/config/google.ts, src/mastra/config/openai.ts, src/mastra/config/vertex.ts): Provider client examples and notes |
| 80 | +- [Postgres Vector Storage](src/mastra/config/pg-storage.ts): PostgreSQL + PgVector storage client and usage notes |
| 81 | +- [Logging & RBAC](src/mastra/config/logger.ts, src/mastra/config/role-hierarchy.ts): Observability and role model docs |
73 | 82 |
|
74 | 83 | ## Workflows & MCP |
75 | 84 |
|
|
82 | 91 |
|
83 | 92 | ## Networks & Data |
84 | 93 |
|
85 | | -- [Networks Documentation](src/mastra/networks/AGENTS.md): Documentation for agent networks |
86 | | -- [Data Directory](src/mastra/data/AGENTS.md): Documentation for data files and examples |
| 94 | +- [Networks Documentation](src/mastra/networks/AGENTS.md): Documentation for agent networks and routing |
| 95 | +- [Data Directory](src/mastra/data/AGENTS.md): Documentation for data files and example datasets |
| 96 | + |
| 97 | +## Frontend (Next.js) |
| 98 | + |
| 99 | +- [App Router (pages)](app/AGENTS.md): Next.js 16 App Router pages, layouts and examples |
| 100 | +- [Docs Pages](app/docs/): Developer-facing docs rendered in the Next.js app (getting-started, core-concepts, ai-sdk) |
| 101 | +- [Chat AGENTS](app/chat/AGENTS.md): Client-side and streaming chat demos using @mastra/client-js |
| 102 | +- [Example Pages](app/examples/page.tsx, app/blog/hello-world-agentstack/page.mdx): UI examples and tutorials |
| 103 | +- [Frontend shared components](app/components/): Reusable page components (navbar, footer, docs-layout, examples-list, chat components) |
| 104 | +- [Important API routes](app/api/): server routes used by the frontend and demos |
| 105 | + - [chat API routes](app/api/chat/route.ts, app/api/chat/r.ts): chat streaming and helper endpoints |
| 106 | + - [completion API](app/api/completion/route.ts): server-side completion demo |
| 107 | + - [contact API](app/api/contact/route.ts): contact form API route |
| 108 | +- [API Reference](app/api-reference/): API documentation pages (agents, tools, workflows) |
| 109 | +- [Blog](app/blog/): Blog posts and tutorials (e.g., hello-world-agentstack) |
| 110 | +- [Careers](app/careers/): Careers page and job listings |
| 111 | +- [Changelog](app/changelog/): Release notes and updates |
| 112 | +- [Dashboard AGENTS](app/dashboard/AGENTS.md): Admin dashboard for monitoring and management |
| 113 | +- [Login](app/login/): Authentication and login pages |
| 114 | +- [Networks AGENTS](app/networks/AGENTS.md): Agent network management and visualization |
| 115 | +- [Pricing](app/pricing/): Pricing tiers and subscription information |
| 116 | +- [Privacy](app/privacy/): Privacy policy and terms |
| 117 | +- [Test AGENTS](app/test/AGENTS.md): Server action and runtime demos |
| 118 | +- [Tools AGENTS](app/tools/AGENTS.md): Tool documentation and execution |
| 119 | +- [Workflows AGENTS](app/workflows/AGENTS.md): Workflow documentation and execution |
| 120 | + |
| 121 | +## Configuration & Tooling (root) |
| 122 | + |
| 123 | +- [package.json](package.json): Scripts, dependencies, and quick-start commands |
| 124 | +- [next.config.ts](next.config.ts): Next.js configuration including MDX and experimental features |
| 125 | +- [tsconfig.json](tsconfig.json): TypeScript config and path aliases |
| 126 | +- [vitest.config.ts](vitest.config.ts): Test runner configuration and test results output |
| 127 | +- [eslint.config.cjs](eslint.config.cjs): Linting configuration |
| 128 | +- [prettier.config.js](prettier.config.js): Formatting rules |
| 129 | + |
| 130 | +## Tests & CI |
| 131 | + |
| 132 | +- [Vitest config](vitest.config.ts): Local test runner and CI configuration |
| 133 | +- [tests/](tests/): Unit and integration test files |
| 134 | +- [test-results/](tests/test-results/): Test artifacts and coverage reports |
| 135 | +- [globalSetup.ts](globalSetup.ts), [testSetup.ts](testSetup.ts): Test initialization helpers |
| 136 | + |
| 137 | +## Examples & Developer Guides |
| 138 | + |
| 139 | +- [lib/mastra-client.ts](lib/mastra-client.ts): Example usage of the Mastra client SDK |
| 140 | +- [lib/utils.ts](lib/utils.ts): Shared utility functions used across frontend and SDK |
| 141 | +- [lib/client-stream-to-ai-sdk.ts](lib/client-stream-to-ai-sdk.ts): Streaming client integration with AI SDK |
| 142 | +- [lib/hooks/use-mastra.ts](lib/hooks/use-mastra.ts): Core hook for Mastra client integration |
| 143 | +- [lib/hooks/use-dashboard-queries.ts](lib/hooks/use-dashboard-queries.ts): Data-fetching hooks for dashboard |
| 144 | +- [app/chat/](app/chat/): Example streaming chat and client SDK patterns |
| 145 | +- [app/test/](app/test/): Example server action & runtime demos |
| 146 | +- [src/components/ai-elements/message.tsx](src/components/ai-elements/message.tsx): Chat message rendering with markdown/support |
| 147 | +- [src/components/ai-elements/plan.tsx](src/components/ai-elements/plan.tsx): Plan/strategy visualization component |
| 148 | +- [src/components/ai-elements/chain-of-thought.tsx](src/components/ai-elements/chain-of-thought.tsx): Reasoning step visualization |
| 149 | +- [src/components/ai-elements/model-selector.tsx](src/components/ai-elements/model-selector.tsx): Model/provider selection UI |
| 150 | +- [src/components/ai-elements/canvas.tsx](src/components/ai-elements/canvas.tsx): Visual canvas for Excalidraw integration |
| 151 | +- [src/components/ai-elements/artifact.tsx](src/components/ai-elements/artifact.tsx): Artifact display component |
| 152 | +- [src/components/ai-elements/code-block.tsx](src/components/ai-elements/code-block.tsx): Code display with syntax highlighting |
| 153 | +- [src/components/ai-elements/controls.tsx](src/components/ai-elements/controls.tsx): Conversation control buttons |
| 154 | +- [src/components/ai-elements/inline-citation.tsx](src/components/ai-elements/inline-citation.tsx): Inline citation rendering |
| 155 | +- [src/components/ai-elements/loader.tsx](src/components/ai-elements/loader.tsx): Loading state indicator |
| 156 | +- [src/components/ai-elements/node.tsx](src/components/ai-elements/node.tsx): Graph node visualization |
| 157 | +- [src/components/ai-elements/panel.tsx](src/components/ai-elements/panel.tsx): Collapsible panel container |
| 158 | +- [src/components/ai-elements/prompt-input.tsx](src/components/ai-elements/prompt-input.tsx): Prompt input field with enhancements |
| 159 | +- [src/components/ai-elements/queue.tsx](src/components/ai-elements/queue.tsx): Task queue visualization |
| 160 | +- [src/components/ai-elements/reasoning.tsx](src/components/ai-elements/reasoning.tsx): Reasoning step breakdown |
| 161 | +- [src/components/ai-elements/shimmer.tsx](src/components/ai-elements/shimmer.tsx): Shimmer loading animation |
| 162 | +- [src/components/ai-elements/sources.tsx](src/components/ai-elements/sources.tsx): Source citation display |
| 163 | +- [src/components/ai-elements/suggestion.tsx](src/components/ai-elements/suggestion.tsx): Suggestion rendering |
| 164 | +- [src/components/ai-elements/task.tsx](src/components/ai-elements/task.tsx): Task item display |
| 165 | +- [src/components/ai-elements/toolbar.tsx](src/components/ai-elements/toolbar.tsx): Conversation toolbar |
| 166 | +- [src/components/ai-elements/web-preview.tsx](src/components/ai-elements/web-preview.tsx): Web content preview |
| 167 | +- [ui/button.tsx](ui/button.tsx): Core button component with variants |
| 168 | +- [ui/input.tsx](ui/input.tsx): Form input component |
| 169 | +- [ui/card.tsx](ui/card.tsx): Card layout primitive |
| 170 | +- [ui/dialog.tsx](ui/dialog.tsx): Modal dialog component |
| 171 | +- [ui/popover.tsx](ui/popover.tsx): Context menu/popover primitive |
| 172 | +- [ui/tooltip.tsx](ui/tooltip.tsx): Hover tooltip component |
| 173 | +- [ui/layout.tsx](ui/layout.tsx): Page layout wrapper |
| 174 | + |
| 175 | +## Memory Bank & Project Context (developer tooling) |
| 176 | + |
| 177 | +- [memory-bank/activeContext.md](memory-bank/activeContext.md): Active context and project memory |
| 178 | +- [memory-bank/productContext.md](memory-bank/productContext.md): Product brief and goals |
| 179 | +- [memory-bank/techContext.md](memory-bank/techContext.md): Technical constraints and choices |
| 180 | +- [memory-bank/memory-bank-instructions.md](memory-bank/memory-bank-instructions.md): How the memory-bank is used in this repo |
| 181 | + |
| 182 | +## Optional / Misc |
| 183 | + |
| 184 | +- [docs/adr/0001-why-pgvector-and-gemini-embeddings.md](docs/adr/0001-why-pgvector-and-gemini-embeddings.md): ADR for vector/embedding choices |
| 185 | +- [.github/prompts/update-llms.prompt.md](.github/prompts/update-llms.prompt.md): Prompt used to guide updates to this file |
| 186 | +- [docs/runtimeContext.md](docs/runtimeContext.md): Runtime conventions and context documentation |
| 187 | +- [llms.txt](llms.txt): This file — machine-friendly navigation for LLMs and contributors |
0 commit comments