Tech Stack
This document outlines the comprehensive technology stack for the Meta Agent Platform. It serves as a reference for developers and contributors to understand the technologies, frameworks, and tools used in the project.
Overview
The Meta Agent Platform uses a modern, scalable tech stack designed to support AI agent orchestration with capabilities for multi-modal agents, edge computing, federated collaboration, and a marketplace ecosystem.
Frontend
| Component | Technology | Version | Justification |
|---|---|---|---|
| Framework | Svelte | 5+ | Fine-grained reactivity, better performance, less boilerplate |
| Application Framework | SvelteKit | 2+ | Routing, SSR, API routes, deployment adapters, progressive enhancement |
| Build Tool | Vite | 4+ | Fast development server, optimized builds, excellent Svelte support |
| Language | TypeScript | 5+ | Type safety, better IDE support, fewer runtime errors |
| Visual Builder | Svelte Flow | 1+ | Specialized for node-based visual workflows, Svelte-native implementation |
| UI Library | shadcn-svelte | - | Beautiful, accessible components with full code ownership and customization |
| Styling | Tailwind CSS | 3+ | Required for shadcn-svelte, utility-first CSS framework |
| State Management | Svelte Runes | - | Built-in reactive primitives ($state, $derived, $effect) for efficient state management |
| API Client | svelte-query + Axios | 2+ / 1+ | Efficient data fetching, caching, and state synchronization |
| Form Handling | SvelteKit Forms + Superforms | 1+ | Type-safe, progressive enhancement form handling |
| Visualization | D3.js | 7+ | For advanced data visualization needs |
| Testing | Vitest + @testing-library/svelte | 0.34+ / 4+ | Fast testing framework compatible with Vite |
| Icons | Lucide Svelte | 0.294+ | Modern icon set with Svelte components |
Backend
| Component | Technology | Version | Justification |
|---|---|---|---|
| Language | Python | 3.11+ | Excellent for AI/ML, large ecosystem of libraries |
| Framework | FastAPI | 0.100+ | High performance, automatic OpenAPI docs, modern Python features |
| API Documentation | OpenAPI | 3.1+ | Industry standard, auto-generated by FastAPI |
| Database ORM | SQLAlchemy | 2.0+ | Mature, powerful ORM with async support |
| REST API Generator | PostgREST | 11+ | Automatically creates RESTful APIs from PostgreSQL schema |
| Migrations | Alembic | 1.11+ | Works seamlessly with SQLAlchemy |
| Validation | Pydantic | 2.0+ | Type validation, seamless integration with FastAPI |
| Authentication | Keycloak | 23+ | Open source identity and access management with enterprise-grade security |
| HTTP Client | httpx | 0.24+ | Modern async HTTP client for Python |
| Testing | pytest | 7.4+ | Comprehensive testing framework for Python |
| Task Queue | Celery | 5.3+ | For background processing tasks |
Orchestration
| Component | Technology | Version | Justification |
|---|---|---|---|
| Workflow Engine | Temporal.io | - | Reliable workflow orchestration with retry logic |
| Container Runtime | Docker | 24+ | Industry standard for containerization |
| Agent Protocol | A2A Protocol | - | Emerging standard for agent interoperability |
Database & Storage
| Component | Technology | Version | Justification |
|---|---|---|---|
| Primary Database | PostgreSQL | 15+ | Robust, feature-rich relational database |
| Vector Extension | pgvector | - | Vector similarity search for AI embeddings |
| Encryption Extension | pgsodium | - | Advanced encryption features for PostgreSQL |
| Caching | Redis | 7+ | In-memory data store for caching |
| Object Storage | MinIO (local) / S3 (prod) | - | For storing agent artifacts and large files |
Observability & Monitoring
| Component | Technology | Version | Justification |
|---|---|---|---|
| Metrics | Prometheus | 2.45+ | Industry standard for metrics collection |
| Visualization | Grafana | 10+ | Powerful dashboards for metrics visualization |
| Logging | Loki | 2.9+ | Log aggregation that works well with Grafana |
| Tracing | OpenTelemetry | 1.19+ | Distributed tracing for complex workflows |
| LLM Monitoring | Langfuse | - | Specialized for LLM observability |
DevOps & Infrastructure
| Component | Technology | Version | Justification |
|---|---|---|---|
| Containerization | Docker | 24+ | Standard for application packaging |
| Orchestration | Docker Compose (dev) | 2.21+ | Simple multi-container orchestration for development |
| CI/CD | GitHub Actions | - | Integrated with GitHub, flexible workflows |
| Infrastructure as Code | Terraform | 1.6+ | For cloud resource provisioning |
| Secrets Management | HashiCorp Vault | 1.15+ | Secure secrets storage and management |
Documentation
| Component | Technology | Version | Justification |
|---|---|---|---|
| Documentation Generator | MkDocs | 1.5+ | Already set up, easy to use |
| Theme | Material for MkDocs | 9.4+ | Beautiful, responsive documentation theme |
| Hosting | Cloudflare Pages | - | Fast, reliable documentation hosting |
Development Tools
| Component | Technology | Version | Justification |
|---|---|---|---|
| JS Package Manager | pnpm | 8+ | Fast, disk-efficient package management with excellent monorepo support |
| Python Package Manager | uv | 0.1+ | Fast, reliable Python package manager |
| Linting | Ruff | 0.1+ | Fast, comprehensive Python linter |
| JS/TS Linting | ESLint | 8+ | Configurable JavaScript/TypeScript linter with Svelte support |
| Formatting | Black | 23.10+ | Standard Python code formatter |
| JS/TS Formatting | Prettier | 3+ | Consistent code formatting for JavaScript, TypeScript, and Svelte |
| Import Sorting | isort | 5.12+ | Consistent import ordering |
| Pre-commit | pre-commit | 3.5+ | Automated code quality checks |
| Editor Config | EditorConfig | - | Consistent coding styles across editors |
AI/ML Components (For Future Phases)
| Component | Technology | Version | Justification |
|---|---|---|---|
| ML Framework | PyTorch | 2.1+ | Flexible deep learning framework |
| Vision Processing | OpenCV | 4.8+ | Computer vision library for image processing |
| Audio Processing | Whisper | - | State-of-the-art speech recognition |
| NLP | Transformers (HuggingFace) | 4.35+ | Access to state-of-the-art NLP models |
Implementation Strategy
The tech stack will be implemented in phases:
Phase 1: Core Platform
- Set up PostgreSQL with pgvector extension
- Implement FastAPI backend with SQLAlchemy
- Configure Keycloak for authentication
- Create basic Svelte 5 frontend with SvelteKit and shadcn-svelte
- Establish CI/CD pipeline with GitHub Actions
- Set up pnpm for package management
Phase 2: Advanced Features
- Integrate PostgREST for automatic API generation
- Implement Temporal.io for workflow orchestration
- Add Svelte Flow for visual workflow builder
- Set up observability stack (Prometheus, Grafana, Loki)
Phase 3: AI Capabilities
- Implement vector similarity search using pgvector
- Add multi-modal agent support
- Integrate LLM monitoring with Langfuse
- Develop marketplace foundation
Phase 4: Desktop Integration (Future)
- Integrate Tauri for desktop application packaging
- Implement offline capabilities
- Add local system integration features
Key Technology Decisions
Frontend Framework: Svelte 5 with SvelteKit
We chose Svelte 5 with SvelteKit over alternatives like React or Vue because: - Fine-grained reactivity system provides better performance - Runes ($state, $derived, $effect) offer intuitive state management - Less boilerplate code leads to better maintainability - Compiler-based approach results in smaller bundle sizes - Excellent support for our visual workflow builder needs - SvelteKit provides a complete application framework with routing, SSR, and API routes - Progressive enhancement approach aligns with our accessibility goals - Built-in adapters simplify deployment to various platforms including Cloudflare - Form actions enable server-side processing with client-side enhancement
UI Library: shadcn-svelte
We chose shadcn-svelte over alternatives like Material UI or Chakra UI because: - It provides full ownership of component code - Built on accessible primitives - Highly customizable with no version lock-in - Beautiful default design with Tailwind CSS
Package Manager: pnpm
We chose pnpm over alternatives like npm or Yarn because: - Significantly faster installation times - Disk space efficiency through content-addressable storage - Built-in monorepo support with workspaces - Strict dependency resolution preventing phantom dependencies - Better security through non-flat node_modules structure
Authentication: Keycloak
We selected Keycloak over alternatives like SuperTokens or Ory because: - Enterprise-grade security with comprehensive identity and access management - Robust user federation capabilities - Support for standard protocols (OAuth 2.0, OpenID Connect, SAML) - Extensive customization options - Active community and commercial support options - Open source with self-hosting option
Database: PostgreSQL with Extensions
We're using PostgreSQL with specific extensions (pgvector, PostgREST) instead of a full Supabase implementation: - Provides AI-focused database features without requiring the full stack - Flexibility to integrate with our chosen auth solution - Full control over the database - Ability to use vector embeddings for AI features
Last updated: 2025-04-16