AStack
The composable framework for AI applications
Build any ai application pattern with type-safe components, Observable streams, and mathematical composition guarantees from HLang's monadic FBP foundation.
npm install @astack-tech/core@betaTechnical Innovations
Built on HLang's monadic foundation with mathematical composition guarantees
Monadic Component System
Every component extends HLang's TransformNode (Component in AStack), providing mathematical composition guarantees. Agents, tools, and pipelines share the same base interface with type-safe ports.
Data Flow Paradigm
Flow-Based Programming treating LLMs as stateless generators, not control flow components
Dual Execution Modes
Independent execution with run() or reactive pipeline mode with _transform()
Type-Safe Port System
Port.I() and Port.O() provide compile-time type checking and runtime validation for component connections
Modular Design
Core, components, and integrations as separate packages
Easy Integration
OpenAI-compatible interfaces for any model provider
Computation Model
Built on HLang's monadic paradigm - the foundation for all computation patterns
Monadic Component Base
Built on HLang's TransformNode (Component in AStack) with monadic composition laws
Port.I('in')Port.O('out')run(data)_transform($i, $o)// Every component extends Component
import { Component } from '@astack-tech/core';
class MyComponent extends Component {
// Type-safe input/output ports
inPort = Port.I('in');
outPort = Port.O('out');
// Dual execution modes:
// 1. Independent execution
async run(data) {
return this.process(data);
}
// 2. Reactive pipeline execution
_transform($i, $o) {
$i('in').receive(async (input) => {
const output = await this.run(input);
$o('out').send(output);
});
}
}Monadic Laws
Composition follows mathematical laws ensuring predictable behavior
Direct Connections
Port-to-port data flow without intermediate layers
Reactive Streams
Built-in backpressure and flow control for real-time processing
Quick Start
Get up and running with AStack in minutes
Install AStack
Create Your First Agent
import { Agent } from "@astack-tech/components";
import { Deepseek } from "@astack-tech/integrations";
const agent = new Agent({
model: new Deepseek({ model: "deepseek-chat" }),
tools: [searchTool, writeTool],
});
const result = await agent.run("Research AI trends");Run & Explore
Your agent is ready! Explore more examples and documentation on GitHub.
Technical Independence
100% original framework with independent architecture, inspired by Haystack's API style
AStack provides developers with a more concise and flexible component-based AI framework through an independently innovative technical approach.
Use Cases
Explore real-world applications built with AStack