stepstack-core
v1.0.0
Published
Modular graph engine for agent workflows and orchestration
Maintainers
Readme
StepStack Core
A modular graph engine for agent workflows and orchestration.
Features
- Graph-based workflow orchestration
- Agent system with LLM integration
- State management and memory
- Resource monitoring and limits
- Breakpoint system for debugging
- Parallel and branching execution
- TypeScript support with full type definitions
Installation
npm install @stepstack/coreQuick Start
import { Graph, Agent } from '@stepstack/core';
// Create a simple workflow
const graph = new Graph()
.step("fetch-data", async (ctx) => {
const data = await fetch("https://api.example.com/data");
return { ...ctx, data: await data.json() };
})
.step("process-data", async (ctx) => {
return { ...ctx, processed: ctx.data.map(item => item * 2) };
})
.connect("fetch-data", "process-data");
// Execute the workflow
const result = await graph.traverse();
console.log(result);Core Concepts
Graph
The main orchestration engine that manages nodes, edges, and execution flow.
Agent
Intelligent nodes that can process data, make decisions, and interact with external services.
State Management
Persistent state that flows through the graph and can be accessed by all nodes.
Memory
Long-term storage for conversation history, context, and persistent data.
Examples
See the examples/ directory for comprehensive examples:
- Basic: Simple graph workflows
- Advanced: Parallel execution, branching, resource monitoring
- LLM Integration: OpenAI and custom API examples
Documentation
License
MIT License - see LICENSE for details.
