AStack
A composable TypeScript framework for AI applications — everything is a component.
AStack has one rule: everything is a component. A model, a tool, an agent, your own logic — each is a component with named input and output ports. A pipeline connects those ports into a graph, and data flows along the connections. A component never calls another component; it reads its inputs and writes its outputs, and the pipeline decides where data goes — so every step stays small, testable, and rewireable without editing the components in it.
Every component runs two ways: call run(input) like a function, or drop it into
a pipeline where the runtime drives it. Agents, multi-step workflows, and routing
are patterns built from these primitives, not separate subsystems. The runtime is
HLang, a flow-based programming runtime built on RxJS, so
each connection is an observable stream.
- An original computation model — the graph is the framework. PocketFlow reached a similar idea independently in Python, and Haystack inspired the API shape, but AStack’s typed, reactive data-flow core is its own.
- A real component library — a tool-calling
Agent, a streaming agent, and an experimental Recursive Language Model agent that runs model-generated orchestration code inside a sandboxed VM. - One tool interface, four ways in — author a tool, compose a tool set, wrap any component as a tool, or bridge a Model Context Protocol server.
- Built to ship — typed end to end, with worked examples that go from a first component to a streaming agent served over Server-Sent Events.
Compile-time type-safe TypeScript, MIT, a pnpm + Turborepo monorepo of four
packages (core, components, tools, integrations). AStack puts HLang’s
reactive flow runtime to work, aimed squarely at AI applications.

Comments