agentic-workflow-architecture 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,163 @@
1
+ # AWA TypeScript SDK
2
+
3
+ The official TypeScript SDK for the Agentic Workflow Architecture (AWA).
4
+
5
+ ## Installation
6
+
7
+ ### Global Installation (Recommended for CLI)
8
+
9
+ ```bash
10
+ npm install -g agentic-workflow-architecture
11
+ ```
12
+
13
+ After installation, the `awa` command will be available globally:
14
+
15
+ ```bash
16
+ awa --version
17
+ ```
18
+
19
+ ### Project Installation
20
+
21
+ ```bash
22
+ npm install agentic-workflow-architecture
23
+ ```
24
+
25
+ ### Development from Source
26
+
27
+ ```bash
28
+ cd sdk/typescript
29
+ npm install
30
+ npm run build
31
+ npm link
32
+ ```
33
+
34
+ ## Quick Start
35
+
36
+ ### Using the CLI
37
+
38
+ Create a workflow file `hello.awa.json`:
39
+
40
+ ```json
41
+ {
42
+ "id": "550e8400-e29b-41d4-a716-446655440000",
43
+ "name": "Hello World",
44
+ "version": "1.0.0",
45
+ "activities": [
46
+ {
47
+ "id": "550e8400-e29b-41d4-a716-446655440001",
48
+ "name": "Greet",
49
+ "actor_type": "application",
50
+ "role_id": "550e8400-e29b-41d4-a716-446655440003",
51
+ "inputs": [],
52
+ "outputs": []
53
+ }
54
+ ],
55
+ "edges": [],
56
+ "roles": [
57
+ {
58
+ "id": "550e8400-e29b-41d4-a716-446655440003",
59
+ "name": "System",
60
+ "actor_type": "application"
61
+ }
62
+ ],
63
+ "contexts": []
64
+ }
65
+ ```
66
+
67
+ Run it:
68
+
69
+ ```bash
70
+ awa run hello.awa.json
71
+ ```
72
+
73
+ ### Using Programmatically
74
+
75
+ ```typescript
76
+ import { WorkflowEngine, parse_workflow } from 'agentic-workflow-architecture';
77
+ import fs from 'fs/promises';
78
+
79
+ // Load and parse workflow
80
+ const content = await fs.readFile('workflow.awa.json', 'utf-8');
81
+ const workflow = parse_workflow(JSON.parse(content));
82
+
83
+ // Initialize engine
84
+ const engine = new WorkflowEngine(workflow, {
85
+ geminiApiKey: process.env.GEMINI_API_KEY
86
+ });
87
+
88
+ // Execute workflow
89
+ await engine.start();
90
+ while (engine.getStatus() === 'running') {
91
+ await engine.runStep();
92
+ }
93
+
94
+ console.log('Workflow completed!');
95
+ ```
96
+
97
+ ## Features
98
+
99
+ - **Workflow Runtime**: Execute AWA workflows with a robust engine
100
+ - **Workflow Builder**: Fluent API to construct workflows programmatically
101
+ - **Validation**: Validate workflow schemas against the AWA specification
102
+ - **CLI Tool**: Command-line interface for running workflows
103
+ - **REST API**: HTTP server for triggering workflows remotely
104
+ - **VSM & Analytics**: Real-time tracking of DOWNTIME waste and process metrics
105
+
106
+ ## CLI Commands
107
+
108
+ ### Run a Workflow
109
+
110
+ ```bash
111
+ # Basic execution
112
+ awa run workflow.awa.json
113
+
114
+ # With verbose output
115
+ awa run workflow.awa.json --verbose
116
+
117
+ # With API key for AI agents
118
+ awa run workflow.awa.json --key YOUR_GEMINI_API_KEY
119
+ ```
120
+
121
+ ### Start API Server
122
+
123
+ ```bash
124
+ # Default port (3000)
125
+ awa serve
126
+
127
+ # Custom port
128
+ awa serve --port 8080
129
+ ```
130
+
131
+ Then trigger workflows via HTTP:
132
+
133
+ ```bash
134
+ curl -X POST http://localhost:3000/api/v1/workflows/run \
135
+ -H "Content-Type: application/json" \
136
+ -d '{"filePath": "./workflow.awa.json"}'
137
+ ```
138
+
139
+ ## Documentation
140
+
141
+ - **[CLI Guide](./docs/cli-guide.md)** - Complete installation and usage guide with examples
142
+ - **[Operational API](./docs/operational-api.md)** - REST API documentation
143
+ - **[AWA Specification](../../spec)** - Full schema definitions
144
+
145
+ ## Examples
146
+
147
+ Check out the `examples` folder for sample workflows:
148
+
149
+ ```bash
150
+ # Simple sequential workflow
151
+ awa run ../../examples/bank-account-opening/workflow.awa.json
152
+
153
+ # AI-powered workflow
154
+ awa run ../../examples/skills-demonstration/scenario.awa.json --verbose
155
+ ```
156
+
157
+ ## Environment Variables
158
+
159
+ - `GEMINI_API_KEY` - Required for workflows using AI agents
160
+
161
+ ## License
162
+
163
+ Apache-2.0