{"id":41378092,"url":"https://github.com/astack-tech/astack","last_synced_at":"2026-01-23T10:36:44.338Z","repository":{"id":296907925,"uuid":"994939784","full_name":"astack-tech/astack","owner":"astack-tech","description":"🤖 A composable framework for building AI applications.","archived":false,"fork":false,"pushed_at":"2026-01-10T03:43:40.000Z","size":800,"stargazers_count":29,"open_issues_count":7,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-11T00:42:26.598Z","etag":null,"topics":["agent","agentic-framework","agentic-systems","agents","ai","ai-agent","ai-agents","ai-applications","ai-framework","composable","composable-architecture","framework","llm","llm-agent","workflow"],"latest_commit_sha":null,"homepage":"https://astack.tech","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astack-tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-02T18:06:14.000Z","updated_at":"2026-01-10T03:43:14.000Z","dependencies_parsed_at":"2025-06-03T09:16:50.815Z","dependency_job_id":"d01af0a2-8229-467c-81ab-8a9612fb500e","html_url":"https://github.com/astack-tech/astack","commit_stats":null,"previous_names":["astack-tech/astack"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/astack-tech/astack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astack-tech%2Fastack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astack-tech%2Fastack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astack-tech%2Fastack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astack-tech%2Fastack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astack-tech","download_url":"https://codeload.github.com/astack-tech/astack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astack-tech%2Fastack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28688722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T05:48:07.525Z","status":"ssl_error","status_checked_at":"2026-01-23T05:48:07.129Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","agentic-framework","agentic-systems","agents","ai","ai-agent","ai-agents","ai-applications","ai-framework","composable","composable-architecture","framework","llm","llm-agent","workflow"],"created_at":"2026-01-23T10:36:43.329Z","updated_at":"2026-01-23T10:36:44.328Z","avatar_url":"https://github.com/astack-tech.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"./assets/logo.svg\" alt=\"AStack Logo\" width=\"256\" height=\"256\"\u003e\n\n# AStack\n\n**A composable framework for building AI applications**\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/astack-tech/astack/pulls)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/astack-tech/astack)\n\n🎉 **Beta Version Released** 🎉\n\n*AStack is under active development but already provides significant value for building AI applications*\n\nEnglish | [简体中文](./README.zh-CN.md)\n\n\u003c/div\u003e\n\n## 📋 Overview\n\nAStack is a composable framework designed to simplify the development of AI applications through a \"everything is a component\" philosophy. Built on Flow-Based Programming (FBP) paradigm with monadic functional composition, it enables seamless integration between various AI models, tools, and custom business logic.\n\nAStack is an independent technical framework with its own architecture and ecosystem, built on top of [Hlang](https://github.com/hlang-tech) - a highly semantic [fourth-generation language (4GL)](https://en.wikipedia.org/wiki/Fourth-generation_programming_language) inspired by Flow-Based Programming paradigms. This foundation on Hlang, which is particularly well-suited for computational modeling and AI-generated code, is what gives AStack its power. The framework emphasizes minimalism and performance, allowing developers to create complex systems with minimal boilerplate code while maintaining complete technical autonomy.\n\n### Key Features\n\n- **Component-Based Architecture**: Build complex AI systems by composing simple, reusable components\n- **Flow-Based Programming (FBP)**: Declarative data flow paradigm with monadic functional composition\n- **Observable Streams**: Built on ReactiveX architecture for powerful stream processing\n- **Lock-Free Concurrency**: Natural concurrent execution through monadic FBP design\n- **Pipeline Execution Model**: Support for both independent and pipeline execution modes\n- **Extensible Tool System**: Easily integrate new capabilities through a unified tool interface\n- **Multi-Model Support**: Seamless integration with various LLM providers\n- **Declarative Workflow**: Define complex AI workflows with minimal code\n- **Minimalist API Design**: Focus on simplicity and expressiveness\n\n## 👁 Design Philosophy\n\nAStack is built on several core philosophical principles that guide its development:\n\n### Everything is a Component\n\nIn AStack, everything from a simple tool to a complex agent is represented as a component. This unified approach simplifies development and promotes code reuse. Components can be composed, extended, and reconfigured to suit various use cases.\n\n### Data Flow Paradigm for Agent Frameworks\n\nAStack embraces a **data flow** architecture rather than a **control flow** approach - a fundamental shift that aligns with how LLMs actually work. Traditional agent frameworks often attempt to \"control\" the model through complex control flow logic, but this is a conceptual mismatch.\n\nLLMs are stateless generators, not stateful programs. Agent state doesn't align with program state. The agent framework should serve as an **interpreter** for model output, treating the model as a data generator rather than a controllable component.\n\nThis data flow paradigm offers several advantages:\n- **Natural Alignment**: Matches the stateless, generative nature of LLMs\n- **Simplified Architecture**: Eliminates complex control flow logic trying to \"manage\" the model\n- **Better Scalability**: Data flow naturally supports concurrent processing through monadic composition\n- **Reduced Complexity**: Avoids the bloat of control-flow frameworks (some have 11k+ line single files)\n\nAStack's architecture is built on Flow-Based Programming (FBP) with monadic functional composition from HLang, using Observable streams from ReactiveX. This enables:\n- **Declarative Composition**: Components compose through data dependencies, not control instructions\n- **Lock-Free Concurrency**: Natural concurrent execution through monadic FBP design\n- **Stream Processing**: Observable/Observer pattern for data flow transformation\n\n### Minimalism Over Complexity\n\nAStack prioritizes simple, intuitive APIs over complex abstractions. This minimalist approach leads to more maintainable code and a gentler learning curve.\n\n## 🎯 Use Cases\n\nAStack is particularly well-suited for:\n\n- **AI Agents**: Build autonomous agents that can reason, plan, and execute tasks using tools\n- **Content Generation**: Create pipelines for researching, analyzing, and generating high-quality content\n- **Data Processing**: Construct workflows for extracting, transforming, and analyzing data\n- **Multi-modal Applications**: Develop applications that combine text, images, and other modalities\n- **Research Platforms**: Build experimental platforms for AI research and development\n\n## 👏 Inspiration \u0026 Comparison\n\nAStack draws inspiration from several outstanding projects in the AI ecosystem, particularly [Haystack](https://github.com/deepset-ai/haystack) by deepset-ai. We express our gratitude to these projects for their pioneering work and contributions to the open-source community.\n\n\u003e **Important Note**: AStack is a 100% original framework with its own independent technical implementation, architecture, and design. It is built in TypeScript and only shares API style inspiration with Haystack (which is implemented in Python). AStack is not a fork or derivative of Haystack.\n\n### AStack vs. Haystack: Technical Comparison\n\n\u003e This comparison is based on Haystack v2.0 (as of January 2026). Both frameworks continue to evolve, and specific features may change over time.\n\n| Feature | AStack | Haystack |\n|---------|--------|----------|\n| **Core Paradigm** | Flow-Based Programming (FBP) with monadic composition | Control flow - imperative, while-loop scheduling |\n| **Execution Model** | Observable streams (ReactiveX architecture) | Priority queue with dict-based data passing |\n| **Concurrency** | Lock-free through monadic FBP design | Manual async management with priority levels |\n| **Data Passing** | Observable/Observer pattern through port connections | Dict deepcopy between components |\n| **Topology Optimization** | Built once per route, reused for all executions | Topological sort on each run |\n| **Type Safety** | Compile-time TypeScript type checking | Runtime Python type compatibility checking |\n| **Primary Focus** | General AI application framework with data flow paradigm | Primarily NLP and RAG applications |\n| **Agent Philosophy** | LLM as stateless generator (interpreter pattern) | Traditional agent control patterns |\n| **Component Interface** | Unified component interface with port system | Different interfaces based on component types |\n| **Debugging Tools** | Standard TypeScript debugging | Rich debugging (breakpoints, snapshots, tracing) |\n| **Memory Management** | Built-in memory abstractions | Memory implemented through specialized components |\n| **Tool Integration** | Standardized tool interface | Various integration patterns depending on use case |\n| **Learning Curve** | Minimalist API focused on simplicity | Comprehensive but more complex API |\n| **Implementation** | **TypeScript** | **Python** |\n| **Ecosystem Maturity** | Growing ecosystem | Mature Python ecosystem with production validation |\n| **Chinese Support** | **Complete Chinese documentation** | **Limited Chinese documentation** |\n\n**Key Architectural Differences:**\n\n- **Data Flow vs Control Flow**: AStack's Flow-Based Programming with monadic composition aligns naturally with LLMs as stateless generators, while Haystack uses traditional control flow patterns with while-loop scheduling\n- **Concurrency Model**: AStack achieves lock-free concurrency through monadic FBP design; Haystack manages concurrency through priority queues and manual async handling\n- **Performance Optimization**: AStack builds topology once and reuses it; Haystack performs topological sorting on each execution\n- **Type System**: AStack provides compile-time safety through TypeScript; Haystack offers runtime checking with optional validation\n\nEach framework has its strengths and is optimized for different use cases. Haystack excels in RAG applications and document processing with mature Python ecosystem and rich debugging tools, while AStack is designed for TypeScript/JavaScript environments with emphasis on Flow-Based Programming, monadic composition, and the data flow paradigm that naturally fits Agent framework requirements. AStack also offers full Chinese language documentation, making it particularly accessible to Chinese-speaking developers.\n\n## 🔍 Architecture\n\n```mermaid\nflowchart TB\n    subgraph \"AStack Framework\"\n        Core[\"Core Module\"]\n        Components[\"Components\"]\n        Pipeline[\"Pipeline\"]\n        Tools[\"Tools\"]\n        Integrations[\"Integrations\"]\n        ModelProviders[\"Model Providers\"]\n        \n        Core--\u003e|provides|Components\n        Core--\u003e|provides|Pipeline\n        Components--\u003e|use|Tools\n        Components--\u003e|use|Integrations\n        Integrations--\u003e|include|ModelProviders\n    end\n\n    subgraph \"Applications\"\n        ExampleApps[\"Example Applications\"]\n    end\n\n    ExampleApps--\u003e|use|Core\n    ExampleApps--\u003e|use|Components\n    ExampleApps--\u003e|use|Pipeline\n\n    style Core fill:#e1f5fe,stroke:#0277bd,stroke-width:1px\n    style Components,Pipeline,Tools fill:#f5f5f5,stroke:#333,stroke-width:1px\n    style Integrations,ModelProviders fill:#f5f5f5,stroke:#333,stroke-width:1px\n    style ExampleApps fill:#fff8e1,stroke:#ff8f00,stroke-width:1px\n```\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Node.js (v18 or higher)\n- npm or pnpm\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/astack-tech/astack.git\ncd astack\n\n# Install dependencies\npnpm install\n\n# Build the packages\npnpm run build\n```\n\n### Examples Directory\n\nAStack includes several examples in the `examples/` directory to demonstrate its capabilities. Each example contains its own README with specific instructions on how to run it with your own API keys and configuration.\n\n## 📚 Examples\n\n### Agent with Tools\n\nThis example demonstrates how to create an Agent that can use tools to perform real-world tasks like file operations. It showcases AStack's reactive data flow where components communicate through event-driven port connections.\n\n```mermaid\nsequenceDiagram\n    actor User as User\n    participant Agent\n    participant ModelProvider as \"Model Provider\"\n    participant Tools\n    \n    User-\u003e\u003eAgent: \"Read file and write with timestamps\"\n    Agent-\u003e\u003eModelProvider: Send user request\n    Note over ModelProvider: Multi-round tool execution\u003cbr/\u003evia reactive data flow\n    ModelProvider-\u003e\u003eAgent: Request tool execution (readFile)\n    Agent-\u003e\u003eTools: Execute readFile tool\n    Tools-\u003e\u003eAgent: Return file contents\n    Agent-\u003e\u003eModelProvider: Send tool results\n    ModelProvider-\u003e\u003eAgent: Request tool execution (writeFile)\n    Agent-\u003e\u003eTools: Execute writeFile tool\n    Tools-\u003e\u003eAgent: Confirm file written\n    Agent-\u003e\u003eModelProvider: Send tool results\n    ModelProvider-\u003e\u003eAgent: Generate final response\n    Agent-\u003e\u003eUser: Return final answer\n```\n\nThis example highlights AStack's ability to handle multi-round tool execution, where the agent can process multiple tool calls within a single conversation, maintaining context throughout the interaction.\n\n### Research Pipeline\n\nThis example demonstrates a sophisticated research pipeline that automatically searches for information, analyzes content, and generates comprehensive research reports using AI. It showcases AStack's ability to coordinate complex workflows across multiple components.\n\n```mermaid\nflowchart TB\n    %% Main components\n    Gateway[\"Gateway Component\"]\n    WebDriver[\"Web Driver\"]\n    DataRelay[\"Data Relay\"]\n    ContentAnalyzer[\"Content Analyzer\"]\n    ReportEnhancer[\"Report Enhancer\"]\n    LLM[\"LLM Model Provider\"]\n    Output((\"Final Report\"))\n    \n    %% Gateway connections\n    Gateway --\u003e|topicOut| ContentAnalyzer\n    Gateway --\u003e|searchQueryOut| WebDriver\n    ContentAnalyzer --\u003e|ready| Gateway\n    ReportEnhancer --\u003e|enhancedReport| Gateway\n    \n    %% WebDriver connections\n    WebDriver --\u003e|searchResults| DataRelay\n    DataRelay --\u003e|dataOut| ContentAnalyzer\n    ContentAnalyzer --\u003e|relevantUrls| WebDriver\n    WebDriver --\u003e|pageContent| ContentAnalyzer\n    \n    %% Content processing\n    ContentAnalyzer --\u003e|report| ReportEnhancer\n    ReportEnhancer --\u003e|promptMessages| LLM\n    LLM --\u003e|message| ReportEnhancer\n    \n    %% Output\n    Gateway --\u003e|\"Research Report\u003cbr/\u003e(HTML + JSON)\"| Output\n    \n    %% Styling with standard colors\n    style Gateway fill:#e1f5fe,stroke:#0277bd,stroke-width:1px\n    style WebDriver fill:#e1f5fe,stroke:#0277bd,stroke-width:1px\n    style DataRelay fill:#e1f5fe,stroke:#0277bd,stroke-width:1px\n    style ContentAnalyzer fill:#e1f5fe,stroke:#0277bd,stroke-width:1px\n    style ReportEnhancer fill:#e1f5fe,stroke:#0277bd,stroke-width:1px\n    style LLM fill:#e1f5fe,stroke:#0277bd,stroke-width:1px\n    style Output fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px\n```\n\nThe pipeline intelligently coordinates web searches, content extraction, and AI-powered analysis to produce in-depth research reports on any topic, complete with proper citations and structured sections.\n\n## 💻 Code Examples\n\n### Creating a Simple Agent with Tools\n\n```typescript\nimport { Agent } from '@astack-tech/components';\nimport { createTool } from '@astack-tech/tools';\nimport { Deepseek } from '@astack-tech/integrations/model-provider';\n\n// Define tools\nconst readFileTool = createTool(\n  'readFile',\n  'Read file contents',\n  async ({ filePath }) =\u003e {\n    // Implementation details\n    return fileContents;\n  }\n);\n\n// Create model provider\nconst model = new Deepseek({\n  apiKey: process.env.DEEPSEEK_API_KEY,\n  model: 'deepseek-chat'\n});\n\n// Create Agent\nconst agent = new Agent({\n  model,\n  tools: [readFileTool],\n  systemPrompt: 'You are a helpful assistant that can read files.'\n});\n\n// Run the agent\nconst result = await agent.run('Please read the README.md file');\n```\n\n### Building a Pipeline\n\nAStack's refactored Pipeline provides intelligent execution with three flexible modes:\n\n```typescript\nimport { Pipeline } from '@astack-tech/core';\nimport { TextSplitter, Embedder, VectorStore } from '@astack-tech/components';\n\n// Create pipeline\nconst pipeline = new Pipeline();\n\n// Add components\npipeline.addComponent('splitter', new TextSplitter());\npipeline.addComponent('embedder', new Embedder());\npipeline.addComponent('store', new VectorStore());\n\n// Connect components - direct port connections\npipeline.connect('splitter.out', 'embedder.in');\npipeline.connect('embedder.out', 'store.in');\n\n// Mode 1: Auto-infer endpoint (detects single leaf port)\nconst result = await pipeline.run('splitter.in', document);\n\n// Mode 2: Explicit endpoint\nconst result = await pipeline.run('splitter.in', document, 'store.out');\n\n// Mode 3: Multi-output collection (type-safe)\nconst results = await pipeline.run('splitter.in', document, {\n  includeOutputsFrom: ['embedder.out', 'store.out']\n});\n// Returns: { 'embedder.out': T, 'store.out': T }\n```\n\n**Pipeline Features:**\n- **Smart Topology Optimization**: Each route builds topology once, reuses for subsequent executions\n- **Three Execution Modes**: Auto-inference, explicit endpoint, or multi-output collection\n- **Type-Safe Multi-Output**: Full TypeScript type inference for collected outputs\n- **Concurrent Execution**: Resolver queue manages multiple concurrent pipeline runs\n\n## 🔄 Hlang Compatibility\n\nWhile AStack is a technically independent framework, it offers seamless compatibility with [Hlang](https://github.com/hlang-tech) - a framework inspired by Flow-Based Programming (FBP) paradigm with features particularly well-suited for AI application development. This technical compatibility offers unique advantages:\n\n### Hlang's Distinctive Features\n\n[Hlang](https://github.com/hlang-tech) offers several distinctive concepts that are valuable for modern software development, especially for AI applications:\n\n- **Declarative Programming Approach**: Express complex behaviors in a fraction of the code required by traditional methods\n- **Human-Centric Design**: Intuitive syntax that reduces the learning curve for developers\n- **Component-Based Architecture**: Built around composable components that can be assembled into complex systems\n- **Type Safety with Flexibility**: Strong typing system that also accommodates the dynamic nature of modern applications\n\n### Technical Integration\n\nAStack maintains complete technical autonomy while offering compatibility with Hlang:\n\n- **Compatible Component Models**: AStack's component approach is structurally compatible with Hlang's flow-based programming model\n- **Independent Development**: AStack can be used independently or in conjunction with Hlang's capabilities\n- **Complementary Strengths**: Combine AStack's fine-grained component control with Hlang's higher-level abstractions\n- **Efficient Execution**: AStack's reactive data flow design enables efficient implementation of workflows defined in either framework\n\nThis technical compatibility creates a practical synergy for developers leveraging both frameworks' strengths while maintaining the independence of each system.\n\n## 🧩 Powerful Computation Model\n\nAStack implements a sophisticated computation model based on monadic functional programming paradigms inspired by Hlang. This model provides powerful abstractions that enable complex workflows, reactivity, and compositional architecture while maintaining simplicity and flexibility.\n\n### Four Core Computation Patterns\n\nAStack's computation model is built around four powerful patterns that can be combined to create sophisticated AI applications:\n\n```mermaid\ngraph TD\n    subgraph \"AStack Computation Model\"\n        A[\"Operator Composition\"] --\u003e B[\"Workflow Orchestration\"];\n        B --\u003e C[\"Reactive Data Flow\"];\n        C --\u003e D[\"Agent-to-Agent Events\"];\n        \n        style A fill:#f9f7ff,stroke:#8a56ac,stroke-width:2px\n        style B fill:#f6f8ff,stroke:#5670ac,stroke-width:2px\n        style C fill:#f5fcff,stroke:#56a0ac,stroke-width:2px\n        style D fill:#f5fff7,stroke:#56ac7d,stroke-width:2px\n    end\n```\n\n| Computation Pattern | Description | Diagram |\n|---------------------|-------------|--------|\n| **Operator Composition** | Each component is a composable transformation operator with pure functional interfaces. Components maintain clear input/output contracts and can be chained together seamlessly. | \u003cimg src=\"docs/images/operator-composition.svg\" width=\"400\" alt=\"Operator Composition Diagram\"\u003e |\n| **Workflow Orchestration** | Components can be orchestrated into complex workflows with branching, joining, and conditional execution paths, enabling dynamic routing and parallel processing. | \u003cimg src=\"docs/images/workflow-orchestration.svg\" width=\"400\" alt=\"Workflow Orchestration Diagram\"\u003e |\n| **Reactive Data Flow** | Implements an event-driven asynchronous data processing model where components respond to data events rather than polling, supporting backpressure handling. | \u003cimg src=\"docs/images/reactive-dataflow.svg\" width=\"400\" alt=\"Reactive Data Flow Diagram\"\u003e |\n| **Agent-to-Agent Events** | Support for complex interactions and message passing between agents, maintaining context continuity across multiple exchanges, enabling multi-agent coordination. | \u003cimg src=\"docs/images/agent-events.svg\" width=\"400\" alt=\"Agent-to-Agent Events Diagram\"\u003e |\n\n#### 1. Operator Composition\n\nThe fundamental building block of AStack is operator composition, where each component is a transformational operator that can be composed with others.\n\n```typescript\n// Simple operator composition example\nconst textProcessor = new TextProcessor();\nconst sentimentAnalyzer = new SentimentAnalyzer();\n\n// Connect output of textProcessor to input of sentimentAnalyzer\npipeline.connect('textProcessor.out', 'sentimentAnalyzer.in');\n```\n\n| Feature | Description |\n|---------|-------------|\n| **Functional Purity** | Components are designed as pure transformations with clear inputs and outputs |\n| **Composition Pattern** | Components can be linked together with their outputs feeding into inputs of other components |\n| **Type Safety** | The port system ensures type compatibility between connected components |\n| **Transparent Data Flow** | Data flow between components is explicit and traceable |\n\n#### 2. Workflow Orchestration\n\nComponents can be orchestrated into complex workflows with branching, joining, and conditional execution paths.\n\n```mermaid\ngraph LR\n    A[\"Input\"] --\u003e B[\"Analyzer\"]\n    B --\u003e|\"Positive Score\"| C[\"Enhancer\"]\n    B --\u003e|\"Negative Score\"| D[\"Corrector\"]\n    C --\u003e E[\"Output Formatter\"]\n    D --\u003e E\n    \n    style A fill:#f5f5f5,stroke:#333,stroke-width:1px\n    style B fill:#f9f7ff,stroke:#8a56ac,stroke-width:2px\n    style C fill:#f6f8ff,stroke:#5670ac,stroke-width:2px\n    style D fill:#fff7f7,stroke:#ac5656,stroke-width:2px\n    style E fill:#f5fff7,stroke:#56ac7d,stroke-width:2px\n```\n\n| Feature | Description |\n|---------|-------------|\n| **Dynamic Routing** | Data can be conditionally routed between components based on content or metadata |\n| **Parallel Processing** | Multiple pathways can execute simultaneously for efficient processing |\n| **Pipeline Construction** | Complex workflows can be built incrementally and modified at runtime |\n| **Error Handling** | Built-in mechanisms for handling and recovering from errors within the workflow |\n\n#### 3. Reactive Data Flow\n\nAStack implements a reactive programming model where data flows through the system in response to events or changes.\n\n```typescript\n// Reactive component example\nclass ReactiveProcessor extends Component {\n  constructor() {\n    super({});\n    Component.Port.I('in').attach(this);\n    Component.Port.O('out').attach(this);\n  }\n\n  _transform($i, $o) {\n    // Listen for data on input port\n    $i('in').receive(data =\u003e {\n      // Process data reactively\n      const result = this.process(data);\n      // Send to output port\n      $o('out').send(result);\n    });\n  }\n}\n```\n\n| Feature | Description |\n|---------|-------------|\n| **Event-Driven** | Components respond to data events rather than being actively polled |\n| **Asynchronous Processing** | Non-blocking operations allow for efficient resource utilization |\n| **Backpressure Handling** | Flow control mechanisms prevent overwhelming downstream components |\n| **Hot vs Cold Streams** | Support for both persistent (hot) and on-demand (cold) data streams |\n\n#### 4. Agent-to-Agent Event Communication\n\nAStack extends beyond simple data pipelines to enable sophisticated agent-to-agent communication patterns.\n\n```mermaid\nsequenceDiagram\n    participant A as Agent A\n    participant T as Tool Invoker\n    participant B as Agent B\n    \n    A-\u003e\u003eT: Request tool execution\n    T-\u003e\u003eB: Forward specialized request\n    B-\u003e\u003eB: Process request\n    B-\u003e\u003eT: Return result\n    T-\u003e\u003eA: Deliver processed result\n    \n    Note over A,B: Bidirectional communication with context preservation\n```\n\n| Feature | Description |\n|---------|-------------|\n| **Context Preservation** | Communication maintains context across multiple exchanges |\n| **Multi-Agent Coordination** | Agents can collaborate on complex tasks through structured interactions |\n| **Tool Integration** | Seamless integration of external tools and services into agent communication |\n| **State Management** | Optional stateful interactions for maintaining conversation history |\n\n### Monadic Design Pattern\n\nUnderlying all these patterns is a monadic design approach derived from functional programming:\n\n- **Encapsulated State**: Each component maintains its own isolated state\n- **Chainable Operations**: Operations can be chained together in a fluent interface\n- **Composable Transformations**: Complex transformations are built from simple, composable units\n- **Error Propagation**: Errors are propagated through the chain in a controlled manner\n\nThis monadic approach allows AStack to maintain both the flexibility of functional programming and the practical benefits of component-based development.\n\n## 📦 Packages\n\nAStack is organized into several packages, all published on npm:\n\n| Package | Version | Description |\n|---------|---------|-------------|\n| [@astack-tech/core](https://www.npmjs.com/package/@astack-tech/core) | [![npm](https://img.shields.io/npm/v/@astack-tech/core.svg)](https://www.npmjs.com/package/@astack-tech/core) | Core functionality and pipeline execution engine |\n| [@astack-tech/components](https://www.npmjs.com/package/@astack-tech/components) | [![npm](https://img.shields.io/npm/v/@astack-tech/components.svg)](https://www.npmjs.com/package/@astack-tech/components) | Reusable AI components like Agents and Memories |\n| [@astack-tech/tools](https://www.npmjs.com/package/@astack-tech/tools) | [![npm](https://img.shields.io/npm/v/@astack-tech/tools.svg)](https://www.npmjs.com/package/@astack-tech/tools) | Tool definitions and implementations |\n| [@astack-tech/integrations](https://www.npmjs.com/package/@astack-tech/integrations) | [![npm](https://img.shields.io/npm/v/@astack-tech/integrations.svg)](https://www.npmjs.com/package/@astack-tech/integrations) | Integrations with external services and model providers |\n\n### Installation\n\nInstall the beta packages you need:\n\n```bash\n# Core package (required)\nnpm install @astack-tech/core@beta\n\n# Components package (for Agents, Memory, etc.)\nnpm install @astack-tech/components@beta\n\n# Tools package (for tool implementations)\nnpm install @astack-tech/tools@beta\n\n# Integrations package (for model providers like OpenAI, Deepseek, etc.)\nnpm install @astack-tech/integrations@beta\n```\n\nOr install all packages at once:\n\n```bash\nnpm install @astack-tech/core@beta @astack-tech/components@beta @astack-tech/tools@beta @astack-tech/integrations@beta\n```\n\n\n## 📖 Documentation\n\n[Documentation coming soon]\n\nFor now, please refer to the examples and source code for understanding how to use AStack.\n\n## 🛠️ Development\n\n### Project Structure\n\n```\nastack/\n├── packages/\n│   ├── core/             # Core framework functionality\n│   ├── components/       # Reusable components\n│   ├── tools/            # Tool implementations\n│   └── integrations/     # External integrations\n├── examples/             # Example applications\n└── docs/                 # Documentation\n```\n\n### Contributing\n\nContributions are welcome! Please see [CONTRIBUTING.md](./.github/CONTRIBUTING.md) for detailed guidelines.\n\nKey points:\n- We use a `dev` branch for active development and new features\n- The `master` branch is reserved for stable releases\n- All pull requests should target the `dev` branch\n\nPlease feel free to submit a Pull Request following our guidelines.\n\n## 📃 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgements\n\n- Thanks to all contributors who have helped shape AStack\n- Inspired by modern AI application architectures and component-based design principles\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**AStack** - Building the future of AI applications, one component at a time.\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastack-tech%2Fastack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastack-tech%2Fastack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastack-tech%2Fastack/lists"}