@endianai/carbon
v0.1.1
Published
A graph-based system for agentic workflows
Maintainers
Readme
Carbon
A graph-based system for agentic workflows by Endian AI.
Installation
npm install @endianai/carbonUsage
As a library
import { Graph, Node, NodeType } from '@endianai/carbon';
import { z } from 'zod';
// Create a graph definition
const graphDefinition = {
id: 'example-graph',
name: 'Example Graph',
nodes: [
{
id: 'document-processor',
name: 'Document Processor',
type: NodeType.OCR,
inputSchema: z.object({ documentPath: z.string() }),
outputSchema: z.object({ content: z.string() })
}
],
edges: []
};
// Create and execute the graph
const graph = new Graph(graphDefinition);
const result = await graph.execute({ documentPath: './sample.pdf' });
console.log(result);As a CLI tool
# Install globally
npm install -g @endianai/carbon
# Run a graph
carbon run path/to/graph-definition.json -i input.json
# Validate a graph
carbon validate path/to/graph-definition.jsonFeatures
- Document processing (PDF, DOCX, TXT)
- LLM integration with multiple providers
- Flexible graph-based workflow design
- Type-safe with Zod schemas
- Command-line interface for running graphs
License
Apache 2.0
