This document provides a high-level introduction to the AStack framework, its architecture, and core capabilities. It covers the monorepo structure, package organization, and fundamental design principles that underpin the framework.
For detailed information about specific subsystems, see:
AStack is a composable framework for building AI applications in TypeScript. It implements a component-based architecture where every element—from simple data transformations to complex AI agents—is represented as a component. The framework enables developers to construct sophisticated AI workflows by connecting these components through a type-safe port system, without requiring intermediate adaptation layers.
The framework is built on top of @hlang-org/runtime, which provides Flow-Based Programming (FBP) capabilities for graph execution, backpressure handling, and event-driven processing. This foundation enables AStack to support reactive data flows and complex orchestration patterns.
Current Status: Beta version 0.1.x, actively developed and production-ready for building AI applications.
Sources: README.md1-26 package.json1-10
The AStack codebase is organized as a pnpm monorepo containing four core framework packages and multiple example applications.
Sources: README.md450-458 package.json9-11
| Package | Purpose | Key Exports | Dependencies |
|---|---|---|---|
@astack-tech/core | Foundation layer providing pipeline orchestration and component abstractions | Pipeline, Component, Port | @hlang-org/runtime |
@astack-tech/components | Pre-built components for common AI tasks | Agent, StreamingAgent, Memory, TextSplitter, ToolInvoker | @astack-tech/core, @astack-tech/tools |
@astack-tech/tools | Tool creation and management utilities | createTool(), ComponentTool, ToolSet | None |
@astack-tech/integrations | AI model provider integrations | Deepseek, ModelProvider interface | @astack-tech/core, openai |
Sources: README.md450-458 High-level diagrams (Diagram 1)
Sources: High-level diagrams (Diagram 2)
AStack implements a zero-adaptation layer architecture where components communicate directly through type-safe ports without intermediate adapters or middleware. The Port.I() and Port.O() system defined in the Component base class enables direct data flow between components.
Key characteristics:
Sources: README.md45-48 High-level diagrams (Diagram 2)
AStack supports four composable computation patterns:
| Pattern | Description | Primary Use Case |
|---|---|---|
| Operator Composition | Chain pure transformation components with clear input/output contracts | Data processing pipelines, text transformation |
| Workflow Orchestration | Branching, parallel processing, and conditional routing between components | Complex multi-step workflows, decision trees |
| Reactive Data Flow | Event-driven asynchronous processing with backpressure handling | Streaming applications, real-time processing |
| Agent-to-Agent Events | Stateful multi-turn interactions between AI agents with context preservation | Multi-agent systems, complex reasoning tasks |
Sources: README.md306-448 High-level diagrams (Diagram 2)
Sources: High-level diagrams (Diagram 6)
AStack is built on @hlang-org/runtime, a Flow-Based Programming (FBP) runtime that provides:
This foundation enables AStack's reactive data flow patterns and sophisticated component orchestration capabilities.
Sources: README.md25-26 README.md282-304
| Technology | Version | Purpose |
|---|---|---|
| TypeScript | 5.8.3 | Type-safe development |
| Node.js | ≥18.0.0 | Runtime environment |
| pnpm | 10.18.1 | Package manager and workspace orchestration |
| Turbo | 2.5.3 | Monorepo build orchestration |
| tsup | Latest | TypeScript bundler (ESM/CJS/Types) |
Sources: package.json6-49 High-level diagrams (Diagram 5)
The framework includes five example applications demonstrating different capabilities:
Each example includes a dedicated README with setup instructions and API key configuration guidance.
Sources: README.md145-280 High-level diagrams (Diagrams 3, 4)
AStack is distributed under the MIT License, allowing unrestricted use, modification, and distribution with proper attribution. The framework is published as scoped npm packages under the @astack-tech organization.
Package publication:
beta tag via pnpm publish:betalatest tag via pnpm publish:latest@changesets/cli for semantic versioning and changelog generationSources: LICENSE1-21 package.json25-28
The framework is in active beta development (version 0.1.x) with the following workflow:
dev - active feature developmentmaster - stable releases onlydev branchThe monorepo uses Turbo for parallel builds across packages, with comprehensive quality gates including ESLint, TypeScript type checking, and Vitest testing.
Refresh this wiki