AStack
The composable framework for AI applications
Build any AI pattern with type-safe components, zero adaptation layers, and mathematical composition guarantees from HLang's monadic foundation.
npm install @astack-tech/coreTechnical Innovations
Built on HLang's monadic foundation with mathematical composition guarantees
Monadic Component System
Every component extends HLang's TransformNode, providing mathematical composition guarantees. Agents, tools, and pipelines share the same base interface with type-safe ports.
Zero Adaptation
Components connect directly via ports without serialization or protocol translation
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 agent patterns
Monadic Component Base
Built on HLang's TransformNode with monadic composition laws
Port.I('in')Port.O('out')run(data)_transform($i, $o)// Every component extends TransformNode
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(this.inPort, async (data) => {
const result = await this.process(data);
$o(this.outPort, result);
});
}
}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
npm install @astack-tech/core @astack-tech/componentsCreate 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