kailash 0.8.0__py3-none-any.whl → 0.8.2__py3-none-any.whl

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.
@@ -1,744 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: kailash
3
- Version: 0.8.0
4
- Summary: Python SDK for the Kailash container-node architecture
5
- Home-page: https://github.com/integrum/kailash-python-sdk
6
- Author: Integrum
7
- Author-email: Integrum <info@integrum.com>
8
- Project-URL: Homepage, https://github.com/integrum/kailash-python-sdk
9
- Project-URL: Bug Tracker, https://github.com/integrum/kailash-python-sdk/issues
10
- Classifier: Development Status :: 3 - Alpha
11
- Classifier: Intended Audience :: Developers
12
- Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.11
14
- Classifier: Programming Language :: Python :: 3.12
15
- Requires-Python: >=3.11
16
- Description-Content-Type: text/markdown
17
- License-File: LICENSE
18
- Requires-Dist: networkx>=2.7
19
- Requires-Dist: pydantic>=1.9
20
- Requires-Dist: matplotlib>=3.5
21
- Requires-Dist: pyyaml>=6.0
22
- Requires-Dist: click>=8.0
23
- Requires-Dist: pytest>=8.3.5
24
- Requires-Dist: mcp[cli]==1.11.0
25
- Requires-Dist: pandas>=2.2.3
26
- Requires-Dist: numpy>=2.2.5
27
- Requires-Dist: scipy>=1.15.3
28
- Requires-Dist: scikit-learn>=1.6.1
29
- Requires-Dist: requests>=2.32.3
30
- Requires-Dist: pytest-cov>=6.1.1
31
- Requires-Dist: isort>=6.0.1
32
- Requires-Dist: aiohttp>=3.12.4
33
- Requires-Dist: aiohttp-cors>=0.7.0
34
- Requires-Dist: ruff>=0.11.12
35
- Requires-Dist: msal>=1.32.3
36
- Requires-Dist: sphinx>=8.2.3
37
- Requires-Dist: sphinx-rtd-theme>=3.0.2
38
- Requires-Dist: sphinx-copybutton>=0.5.2
39
- Requires-Dist: sphinxcontrib-mermaid>=1.0.0
40
- Requires-Dist: sphinx-autobuild>=2024.10.3
41
- Requires-Dist: autodoc>=0.5.0
42
- Requires-Dist: myst-parser>=4.0.1
43
- Requires-Dist: black>=25.1.0
44
- Requires-Dist: psutil>=7.0.0
45
- Requires-Dist: fastapi>=0.115.12
46
- Requires-Dist: uvicorn[standard]>=0.31.0
47
- Requires-Dist: pytest-asyncio>=1.0.0
48
- Requires-Dist: pre-commit>=4.2.0
49
- Requires-Dist: twine>=6.1.0
50
- Requires-Dist: ollama>=0.5.1
51
- Requires-Dist: sqlalchemy>=2.0.0
52
- Requires-Dist: psycopg2-binary>=2.9.0
53
- Requires-Dist: pymysql>=1.1.0
54
- Requires-Dist: aiosqlite>=0.19.0
55
- Requires-Dist: websockets>=12.0
56
- Requires-Dist: httpx>=0.25.0
57
- Requires-Dist: python-jose>=3.5.0
58
- Requires-Dist: pytest-xdist>=3.6.0
59
- Requires-Dist: pytest-timeout>=2.3.0
60
- Requires-Dist: pytest-split>=0.9.0
61
- Requires-Dist: asyncpg>=0.30.0
62
- Requires-Dist: aiomysql>=0.2.0
63
- Requires-Dist: twilio>=9.6.3
64
- Requires-Dist: qrcode>=8.2
65
- Requires-Dist: aiofiles>=24.1.0
66
- Requires-Dist: bcrypt>=4.3.0
67
- Requires-Dist: plotly>=6.2.0
68
- Requires-Dist: redis[asyncio]>=6.2.0
69
- Requires-Dist: faker>=37.4.0
70
- Requires-Dist: structlog>=25.4.0
71
- Requires-Dist: authlib>=1.6.0
72
- Requires-Dist: slowapi>=0.1.9
73
- Requires-Dist: limits>=5.4.0
74
- Requires-Dist: prometheus-client>=0.22.1
75
- Requires-Dist: opentelemetry-api>=1.34.1
76
- Requires-Dist: opentelemetry-sdk>=1.34.1
77
- Requires-Dist: passlib>=1.7.4
78
- Requires-Dist: pyotp>=2.9.0
79
- Requires-Dist: opentelemetry-instrumentation-fastapi>=0.55b1
80
- Requires-Dist: seaborn>=0.13.2
81
- Requires-Dist: sqlparse>=0.5.3
82
- Provides-Extra: dev
83
- Requires-Dist: pytest>=7.0; extra == "dev"
84
- Requires-Dist: pytest-cov>=3.0; extra == "dev"
85
- Requires-Dist: black>=22.0; extra == "dev"
86
- Requires-Dist: isort>=5.10; extra == "dev"
87
- Requires-Dist: mypy>=0.9; extra == "dev"
88
- Dynamic: author
89
- Dynamic: home-page
90
- Dynamic: license-file
91
- Dynamic: requires-python
92
-
93
- # Kailash Python SDK
94
-
95
- <p align="center">
96
- <a href="https://pypi.org/project/kailash/"><img src="https://img.shields.io/pypi/v/kailash.svg" alt="PyPI version"></a>
97
- <a href="https://pypi.org/project/kailash/"><img src="https://img.shields.io/pypi/pyversions/kailash.svg" alt="Python versions"></a>
98
- <a href="https://pepy.tech/project/kailash"><img src="https://static.pepy.tech/badge/kailash" alt="Downloads"></a>
99
- <img src="https://img.shields.io/badge/license-MIT-green.svg" alt="MIT License">
100
- <img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black">
101
- <img src="https://img.shields.io/badge/tests-production%20quality-brightgreen.svg" alt="Tests: Production Quality">
102
- <img src="https://img.shields.io/badge/docker-integrated-blue.svg" alt="Docker: Integrated">
103
- <img src="https://img.shields.io/badge/AI-ollama%20validated-purple.svg" alt="AI: Ollama Validated">
104
- </p>
105
-
106
- <p align="center">
107
- <strong>A Pythonic SDK for the Kailash container-node architecture</strong>
108
- </p>
109
-
110
- <p align="center">
111
- Build workflows that seamlessly integrate with Kailash's production environment while maintaining the flexibility to prototype quickly and iterate locally.
112
- </p>
113
-
114
- ---
115
-
116
- ## 🔥 Latest Release: v0.6.3 (July 5, 2025)
117
-
118
- **Comprehensive MCP Platform & Documentation Improvements**
119
-
120
- - 🚀 **MCP Testing**: 407 tests with 100% pass rate across 8 MCP components
121
- - 📚 **Documentation**: Fixed 200+ code examples, all now execute correctly
122
- - 🏢 **Enterprise**: Complete MCP platform integration with production workflows
123
- - 🔧 **Platform**: Resolved namespace collision (kailash.mcp → kailash.mcp_server)
124
-
125
- [Full Changelog](changelogs/releases/v0.6.3-2025-07-05.md) | [Previous Release](changelogs/releases/v0.6.1-2025-01-26.md)
126
-
127
- ## ✨ Highlights
128
-
129
- - 🚀 **Rapid Prototyping**: Create and test workflows locally without containerization
130
- - 🏗️ **Architecture-Aligned**: Automatically ensures compliance with Kailash standards
131
- - 🔄 **Seamless Handoff**: Export prototypes directly to production-ready formats
132
- - 📊 **Real-time Monitoring**: Live dashboards with WebSocket streaming and performance metrics
133
- - 🧩 **Extensible**: Easy to create custom nodes for domain-specific operations
134
- - ⚡ **Fast Installation**: Uses `uv` for lightning-fast Python package management
135
- - 🤖 **AI-Powered**: Complete LLM agents, embeddings, and hierarchical RAG architecture
136
- - 🧠 **Retrieval-Augmented Generation**: Full RAG pipeline with intelligent document processing
137
- - 🌐 **REST API Wrapper**: Expose any workflow as a production-ready API in 3 lines
138
- - 🚪 **Multi-Workflow Gateway**: Manage multiple workflows through unified API with MCP integration
139
- - 🤖 **Self-Organizing Agents**: Autonomous agent pools with intelligent team formation and convergence detection
140
- - 🧠 **Agent-to-Agent Communication**: Shared memory pools and intelligent caching for coordinated multi-agent systems
141
- - 🔒 **Production Security**: Comprehensive security framework with path traversal prevention, code sandboxing, and audit logging
142
- - 🛡️ **Admin Tool Framework**: Complete enterprise admin infrastructure with React UI, RBAC, audit logging, and LLM-based QA testing
143
- - 🎨 **Visual Workflow Builder**: Kailash Workflow Studio - drag-and-drop interface for creating and managing workflows (coming soon)
144
- - 🔁 **Cyclic Workflows (v0.2.0)**: Universal Hybrid Cyclic Graph Architecture with 30,000+ iterations/second performance
145
- - 🛠️ **Developer Tools**: CycleAnalyzer, CycleDebugger, CycleProfiler for production-ready cyclic workflows
146
- - 📈 **High Performance**: Optimized execution engine supporting 100,000+ iteration workflows
147
- - 📁 **Complete Finance Workflow Library (v0.3.1)**: Production-ready financial workflows with AI analysis
148
- - 💼 **Enterprise Workflow Patterns**: Credit risk, portfolio optimization, trading signals, fraud detection
149
- - 🔔 **Production Alert System**: Rich Discord alerts with rate limiting, retry logic, and rich embed support
150
- - 🏭 **Session 067 Enhancements**: Business workflow templates, data lineage tracking, automatic credential rotation
151
- - 🔄 **Zero-Downtime Operations**: Automatic credential rotation with enterprise notifications and audit trails
152
- - 🌉 **Enterprise Middleware (v0.4.0)**: Production-ready middleware architecture with real-time agent-frontend communication, dynamic workflows, and AI chat integration
153
- - ⚡ **Performance Revolution (v0.5.0)**: 10-100x faster parameter resolution, clear async/sync separation, automatic resource management
154
- - 🧪 **Production-Quality Testing (v0.5.0)**: Comprehensive testing infrastructure with Docker integration, AI workflows, and real-world business scenarios
155
-
156
- ## 🏗️ Project Architecture
157
-
158
- The Kailash project is organized into three distinct layers:
159
-
160
- ### Core Architecture (v0.5.0)
161
- ```
162
- ┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
163
- │ Frontend │ │ Middleware │ │ Kailash Core │
164
- │ │ │ │ │ │
165
- │ • React/Vue │◄───│ • Agent-UI │◄───│ • Workflows │
166
- │ • JavaScript │ │ • Real-time │ │ • Nodes │
167
- │ • Mobile Apps │ │ • API Gateway │ │ • Runtime │
168
- │ │ │ • AI Chat │ │ • Security │
169
- │ │ │ • WebSocket/SSE │ │ • Database │
170
- └─────────────────┘ └──────────────────┘ └─────────────────┘
171
- ```
172
-
173
- ```
174
- kailash_python_sdk/
175
- ├── src/kailash/ # Core SDK - Framework and building blocks
176
- ├── apps/ # Applications - Production-ready solutions built with the SDK
177
- └── studio/ # UI Layer - Frontend interfaces and visual tools
178
- ```
179
-
180
- ### Layer Overview
181
-
182
- 1. **SDK Layer** (`src/kailash/`) - The core framework providing:
183
- - Nodes: Reusable computational units (100+ built-in)
184
- - Workflows: DAG-based orchestration with cyclic support
185
- - Runtime: Unified execution engine with optimized async/sync separation (v0.5.0)
186
- - Middleware: Enterprise communication layer (v0.4.0)
187
- - Security: RBAC/ABAC access control with audit logging
188
- - Performance: LRU parameter caching, automatic resource pooling (NEW in v0.5.0)
189
-
190
- 2. **Application Layer** (`apps/`) - Complete applications including:
191
- - User Management System (Django++ capabilities)
192
- - Future: Workflow Designer, Data Pipeline, API Gateway, etc.
193
-
194
- 3. **UI Layer** (`studio/`) - Modern React interfaces for:
195
- - Admin dashboards
196
- - Workflow visualization
197
- - Application UIs
198
-
199
- ### Installation Options
200
-
201
- ```bash
202
- # Core SDK only
203
- pip install kailash
204
-
205
- # SDK with User Management
206
- pip install kailash[user-management]
207
-
208
- # Everything
209
- pip install kailash[all]
210
- ```
211
-
212
- ## 🎯 Who Is This For?
213
-
214
- The Kailash Python SDK is designed for:
215
-
216
- - **AI Business Coaches (ABCs)** who need to prototype workflows quickly
217
- - **Data Scientists** building ML pipelines compatible with production infrastructure
218
- - **Engineers** who want to test Kailash workflows locally before deployment
219
- - **Teams** looking to standardize their workflow development process
220
-
221
- ## 🚀 Quick Start
222
-
223
- ### Installation
224
-
225
- **Requirements:** Python 3.11 or higher
226
-
227
- ```bash
228
- # Install uv if you haven't already
229
- curl -LsSf https://astral.sh/uv/install.sh | sh
230
-
231
- # For users: Install from PyPI
232
- pip install kailash
233
-
234
- # For developers: Clone and sync
235
- git clone https://github.com/integrum/kailash-python-sdk.git
236
- cd kailash-python-sdk
237
- uv sync
238
-
239
- # Set up SDK development infrastructure (optional but recommended)
240
- ./scripts/setup-sdk-environment.sh
241
- ```
242
-
243
- ### Your First Workflow
244
-
245
- ```python
246
- from kailash.workflow import Workflow
247
- from kailash.nodes.data import CSVReaderNode
248
- from kailash.nodes.code import PythonCodeNode
249
- from kailash.runtime.local import LocalRuntime
250
- import pandas as pd
251
-
252
- # Create a workflow
253
- workflow = Workflow("customer_analysis", name="customer_analysis")
254
-
255
- # Add data reader
256
- reader = CSVReaderNode(file_path="customers.csv")
257
- workflow.add_node("read_customers", reader)
258
-
259
- # Add custom processing using Python code
260
- def analyze_customers(data):
261
- """Analyze customer data and compute metrics."""
262
- df = pd.DataFrame(data)
263
- # Convert total_spent to numeric
264
- df['total_spent'] = pd.to_numeric(df['total_spent'])
265
- return {
266
- "result": {
267
- "total_customers": len(df),
268
- "avg_spend": df["total_spent"].mean(),
269
- "top_customers": df.nlargest(10, "total_spent").to_dict("records")
270
- }
271
- }
272
-
273
- processor = PythonCodeNode(code=analyze_customers)
274
- workflow.add_node("analyze", processor)
275
-
276
- # Connect nodes
277
- workflow.connect("read_customers", "analyze", mapping={"data": "data"})
278
-
279
- # Run locally
280
- runtime = LocalRuntime()
281
- results, run_id = runtime.execute(workflow, parameters={
282
- "read_customers": {"file_path": "customers.csv"}
283
- })
284
-
285
- print(f"Total customers: {results['analyze']['result']['total_customers']}")
286
- print(f"Average spend: ${results['analyze']['result']['avg_spend']:.2f}")
287
- ```
288
-
289
- ### Export to Production
290
-
291
- ```python
292
- # Export to Kailash container format
293
- from kailash.utils.export import export_workflow
294
-
295
- export_workflow(workflow, "customer_analysis.yaml")
296
- ```
297
-
298
- ## 💼 Finance Workflow Library (New in v0.3.1)
299
-
300
- Complete production-ready financial workflows using AI and modern quantitative methods:
301
-
302
- ### Credit Risk Assessment
303
-
304
- ```python
305
- from kailash.workflow import Workflow
306
- from kailash.nodes.data import CSVReaderNode
307
- from kailash.nodes.code import PythonCodeNode
308
- from kailash.nodes.ai import LLMAgentNode
309
-
310
- def calculate_risk_metrics(customers, transactions):
311
- """Calculate comprehensive risk metrics."""
312
- # Modern risk scoring with AI analysis
313
- # 100+ lines of production risk calculation
314
- return {"result": risk_scores}
315
-
316
- workflow = Workflow("credit-risk", "Credit Risk Assessment")
317
- workflow.add_node("customer_reader", CSVReaderNode())
318
- workflow.add_node("risk_calculator", PythonCodeNode.from_function(func=calculate_risk_metrics))
319
- workflow.add_node("ai_analyzer", LLMAgentNode(model="gpt-4",
320
- system_prompt="You are a financial risk expert..."))
321
- ```
322
-
323
- ### Portfolio Optimization
324
-
325
- ```python
326
- def optimize_portfolio(holdings, market_data, risk_profile="moderate"):
327
- """Modern Portfolio Theory optimization with rebalancing."""
328
- # Sharpe ratio optimization, correlation analysis
329
- # Risk-adjusted returns with AI market insights
330
- return {"result": optimization_plan}
331
-
332
- workflow = Workflow("portfolio-opt", "Portfolio Optimization")
333
- workflow.add_node("optimizer", PythonCodeNode.from_function(func=optimize_portfolio))
334
- # Generates rebalancing trades, risk metrics, AI market analysis
335
- ```
336
-
337
- ### Trading Signals & Fraud Detection
338
-
339
- - **Trading Signals**: Technical indicators (RSI, MACD, Bollinger Bands) + AI sentiment
340
- - **Fraud Detection**: Real-time transaction monitoring with velocity analysis
341
-
342
- **See complete examples**: `sdk-users/workflows/by-industry/finance/`
343
-
344
- ## 📚 Documentation
345
-
346
- ### For SDK Users
347
-
348
- **Build solutions with the SDK:**
349
- - `sdk-users/` - Everything you need to build with Kailash
350
- - `developer/` - Node creation patterns and troubleshooting
351
- - `workflows/` - Complete production workflow library (v0.3.1)
352
- - Finance workflows: Credit risk, portfolio optimization, trading signals, fraud detection
353
- - Quick-start patterns (30-second workflows)
354
- - Industry-specific solutions by vertical
355
- - Enterprise integration patterns
356
- - `essentials/` - Quick reference and cheatsheets
357
- - `nodes/` - Comprehensive node catalog (93+ nodes including Session 067 enhancements)
358
- - `patterns/` - Architectural patterns
359
-
360
- ### For SDK Contributors
361
-
362
- **Develop the SDK itself:**
363
- - `sdk-contributors/` - Internal SDK development resources
364
- - `architecture/` - ADRs and design decisions
365
- - `project/` - TODOs and development tracking
366
- - `training/` - LLM training examples
367
-
368
- ### Shared Resources
369
-
370
- - `shared/` - Resources for both users and contributors
371
- - `mistakes/` - Common error patterns and solutions
372
- - `frontend/` - UI development resources
373
-
374
- ### Quick Links
375
-
376
- - [SDK User Guide](sdk-users/README.md) - Build with the SDK
377
- - [SDK Contributor Guide](sdk-contributors/README.md) - Develop the SDK
378
- - [API Documentation](https://integrum.github.io/kailash-python-sdk)
379
- - [Examples](examples/)
380
- - [Release Notes](CHANGELOG.md)
381
-
382
- ## 🌉 Enterprise Middleware (v0.4.0)
383
-
384
- ### Production-Ready Communication Layer
385
-
386
- The new middleware architecture provides enterprise-grade components for building production applications:
387
-
388
- ```python
389
- from kailash.middleware import (
390
- AgentUIMiddleware,
391
- APIGateway,
392
- create_gateway,
393
- RealtimeMiddleware,
394
- AIChatMiddleware
395
- )
396
-
397
- # Create enterprise middleware stack
398
- agent_ui = AgentUIMiddleware(
399
- max_sessions=1000,
400
- session_timeout_minutes=60,
401
- enable_persistence=True
402
- )
403
-
404
- # API Gateway with authentication
405
- gateway = create_gateway(
406
- title="My Production API",
407
- cors_origins=["https://myapp.com"],
408
- enable_docs=True
409
- )
410
-
411
- # Real-time communication
412
- realtime = RealtimeMiddleware(agent_ui)
413
-
414
- # AI chat integration
415
- ai_chat = AIChatMiddleware(
416
- agent_ui,
417
- enable_vector_search=True,
418
- llm_provider="ollama"
419
- )
420
- ```
421
-
422
- ### Key Middleware Features
423
-
424
- - **Dynamic Workflow Creation**: Create workflows from frontend configurations using `WorkflowBuilder.from_dict()`
425
- - **Real-time Communication**: WebSocket and SSE support for live updates
426
- - **Session Management**: Multi-tenant isolation with automatic cleanup
427
- - **AI Chat Integration**: Natural language workflow generation with context awareness
428
- - **Database Persistence**: Repository pattern with audit logging
429
- - **JWT Authentication**: Enterprise security with RBAC/ABAC access control
430
- - **Health Monitoring**: Built-in health checks and performance metrics
431
-
432
- ### Frontend Integration
433
-
434
- ```python
435
- # Create session for frontend client
436
- session_id = await agent_ui.create_session("user123")
437
-
438
- # Dynamic workflow from frontend
439
- workflow_config = {
440
- "name": "data_pipeline",
441
- "nodes": [...],
442
- "connections": [...]
443
- }
444
-
445
- workflow_id = await agent_ui.create_dynamic_workflow(
446
- session_id, workflow_config
447
- )
448
-
449
- # Execute with real-time updates
450
- execution_id = await agent_ui.execute_workflow(
451
- session_id, workflow_id, inputs={}
452
- )
453
- ```
454
-
455
- **Test Excellence**: 17/17 integration tests passing with 100% reliability for production deployment.
456
-
457
- See [Middleware Integration Guide](sdk-users/developer/16-middleware-integration-guide.md) for complete documentation.
458
-
459
- ## 🔥 Advanced Features
460
-
461
- ### Unified Access Control (v0.3.3)
462
-
463
- Single interface for all access control strategies:
464
-
465
- ```python
466
- from kailash.access_control import AccessControlManager
467
-
468
- # Choose your strategy
469
- manager = AccessControlManager(strategy="abac") # or "rbac" or "hybrid"
470
-
471
- # ABAC example with helper functions
472
- from kailash.access_control import create_attribute_condition
473
-
474
- condition = create_attribute_condition(
475
- path="user.attributes.department",
476
- operator="hierarchical_match",
477
- value="finance"
478
- )
479
-
480
- # Database integration
481
- db_node = AsyncSQLDatabaseNode(
482
- name="financial_query",
483
- query="SELECT * FROM sensitive_data",
484
- access_control_manager=manager
485
- )
486
- ```
487
-
488
- ### Cyclic Workflows (Enhanced in v0.2.2)
489
-
490
- Build iterative workflows with the new CycleBuilder API:
491
-
492
- ```python
493
- # Create an optimization cycle
494
- workflow.create_cycle("optimization_loop")
495
- .connect("processor", "processor")
496
- .max_iterations(100)
497
- .converge_when("quality >= 0.95")
498
- .timeout(30)
499
- .build()
500
- ```
501
-
502
- ### Self-Organizing Agent Pools
503
-
504
- Create teams of AI agents that autonomously coordinate:
505
-
506
- ```python
507
- from kailash.nodes.ai import SelfOrganizingAgentPoolNode
508
-
509
- agent_pool = SelfOrganizingAgentPoolNode(
510
- formation_strategy="capability_matching",
511
- convergence_strategy="quality_voting",
512
- min_agents=3,
513
- max_agents=10
514
- )
515
- workflow.add_node("agent_team", agent_pool)
516
- ```
517
-
518
- ### Hierarchical RAG Pipeline
519
-
520
- Build sophisticated document processing systems:
521
-
522
- ```python
523
- from kailash.nodes.data import DocumentSourceNode, HierarchicalChunkerNode
524
- from kailash.nodes.ai import EmbeddingGeneratorNode
525
-
526
- # Build a complete RAG pipeline
527
- workflow.add_node("docs", DocumentSourceNode(directory="./knowledge"))
528
- workflow.add_node("chunker", HierarchicalChunkerNode(chunk_size=512))
529
- workflow.add_node("embedder", EmbeddingGeneratorNode(provider="openai"))
530
- ```
531
-
532
- ### REST API Wrapper
533
-
534
- Transform any workflow into a production API:
535
-
536
- ```python
537
- from kailash.api import WorkflowAPI
538
-
539
- # Create API from workflow
540
- api = WorkflowAPI(workflow, host="0.0.0.0", port=8000)
541
- api.run()
542
-
543
- # Your workflow is now available at:
544
- # POST http://localhost:8000/execute
545
- # GET http://localhost:8000/workflow/info
546
- ```
547
-
548
- ## 🏗️ Key Components
549
-
550
- ### Nodes (85+ built-in)
551
-
552
- - **Data**: CSVReaderNode, JSONReaderNode, SQLDatabaseNode, AsyncSQLDatabaseNode, DirectoryReaderNode
553
- - **Admin**: UserManagementNode, RoleManagementNode, PermissionCheckNode, AuditLogNode, SecurityEventNode
554
- - **Transform**: DataTransformer, DataFrameFilter, DataFrameJoiner
555
- - **AI/ML**: LLMAgentNode, EmbeddingGeneratorNode, A2ACoordinatorNode, MCPAgentNode
556
- - **API**: RESTClientNode, GraphQLNode, AuthNode, HTTPRequestNode
557
- - **Logic**: SwitchNode, MergeNode, ConvergenceCheckerNode
558
- - **Code**: PythonCodeNode, WorkflowNode
559
- - **Alerts**: DiscordAlertNode with rich embeds and rate limiting
560
- - **Security**: EnhancedAccessControlManager (ABAC with 16 operators)
561
-
562
- ### Runtimes
563
-
564
- - **LocalRuntime**: Test workflows on your machine
565
- - **DockerRuntime**: Run in containers (coming soon)
566
- - **ParallelRuntime**: Execute nodes concurrently
567
- - **CyclicWorkflowExecutor**: Optimized for iterative workflows
568
-
569
- ### Visualization
570
-
571
- - **Mermaid diagrams**: Workflow structure visualization
572
- - **Real-time dashboard**: Monitor execution with WebSocket streaming
573
- - **Performance metrics**: Track execution time, resource usage
574
-
575
- ## 🧪 Testing Your Workflows
576
-
577
- ```python
578
- # Use the testing runtime for unit tests
579
- from kailash.runtime.testing import TestingRuntime
580
-
581
- runtime = TestingRuntime()
582
- runtime.set_mock_result("read_customers", {"data": test_data})
583
- results, run_id = runtime.execute(workflow)
584
- assert results["analyze"]["result"]["total_customers"] == len(test_data)
585
- ```
586
-
587
- ## 🚢 Production Deployment
588
-
589
- 1. **Export your workflow**:
590
- ```python
591
- export_workflow(workflow, "workflow.yaml", format="kailash")
592
- ```
593
-
594
- 2. **Deploy to Kailash**:
595
- ```bash
596
- kailash deploy workflow.yaml --environment production
597
- ```
598
-
599
- 3. **Monitor in real-time**:
600
- ```python
601
- from kailash.visualization import DashboardServer
602
-
603
- server = DashboardServer(port=8080)
604
- server.start()
605
- # Open http://localhost:8080 for live monitoring
606
- ```
607
-
608
- ## 🤝 Contributing
609
-
610
- We welcome contributions! We use a **Claude Code-driven workflow** for all team collaboration.
611
-
612
- ### 🚀 New Team Member?
613
- **Start Here → [NEW_TEAM_MEMBER.md](NEW_TEAM_MEMBER.md)**
614
-
615
- ### For Contributors
616
- - **SDK Users**: See [sdk-users/CLAUDE.md](sdk-users/CLAUDE.md) for building with the SDK
617
- - **SDK Contributors**: See [sdk-contributors/CLAUDE.md](sdk-contributors/CLAUDE.md) for SDK development
618
- - **Team Collaboration**: Use [Claude Code Workflow System](sdk-contributors/operations/claude-code-workflows/) for all project management
619
-
620
- ### Claude Code Workflow
621
- All project management is done through conversational interaction with Claude Code:
622
- - **No manual TODO editing** - Claude Code handles all updates
623
- - **No direct GitHub issues** - Created through planning sessions
624
- - **All progress tracked** - Through natural conversation
625
-
626
- See [Contributing Guide](CONTRIBUTING.md) for complete details.
627
-
628
- ### Development Setup
629
-
630
- ```bash
631
- # Clone the repository
632
- git clone https://github.com/integrum/kailash-python-sdk.git
633
- cd kailash-python-sdk
634
-
635
- # Install with development dependencies
636
- uv sync
637
-
638
- # Run tests
639
- pytest
640
-
641
- # Run linting
642
- black .
643
- isort .
644
- ruff check .
645
-
646
- # Test all examples
647
- python scripts/test-all-examples.py
648
- ```
649
-
650
- ## 🧪 Tests & Examples
651
-
652
- ### Comprehensive Test Suite
653
- The SDK features a fully reorganized test suite with 127 tests organized by purpose:
654
-
655
- ```bash
656
- # Run all tests
657
- pytest
658
-
659
- # Fast unit tests (92 tests)
660
- pytest tests/unit/
661
-
662
- # Integration tests (31 tests)
663
- pytest tests/integration/
664
-
665
- # End-to-end tests (4 tests)
666
- pytest tests/e2e/
667
-
668
- # Specific component tests
669
- pytest tests/unit/nodes/ai/
670
- ```
671
-
672
- **Test Structure:**
673
- - **Unit Tests**: Fast, isolated component validation
674
- - **Integration Tests**: Component interaction testing
675
- - **E2E Tests**: Complete scenario validation
676
- - **Unified Configuration**: Single `conftest.py` with 76+ fixtures
677
-
678
- ### Production Workflows & Examples
679
- Clear separation of purpose for maximum value:
680
-
681
- **Business Workflows** (`sdk-users/workflows/`):
682
- ```
683
- sdk-users/workflows/
684
- ├── quickstart/ # 5-minute success stories
685
- ├── by-industry/ # Finance, healthcare, manufacturing
686
- ├── by-pattern/ # Data processing, AI/ML, API integration
687
- ├── integrations/ # Third-party platform connections
688
- └── production-ready/ # Enterprise deployment patterns
689
- ```
690
-
691
- **SDK Development** (`examples/`):
692
- ```
693
- examples/
694
- ├── feature-validation/ # SDK component testing
695
- ├── test-harness/ # Development utilities
696
- └── utils/ # Shared development tools
697
- ```
698
-
699
- **Key Principles:**
700
- - **Workflows**: Production business value, real-world solutions
701
- - **Examples**: SDK development, feature validation
702
- - **Tests**: Quality assurance, regression prevention
703
-
704
- ## 📈 Project Status
705
-
706
- ### ✅ v0.4.0 - Enterprise Middleware Architecture
707
- - **Middleware Layer**: Complete refactor from monolithic to composable middleware
708
- - **Real-time Communication**: WebSocket/SSE with comprehensive event streaming
709
- - **AI Integration**: Built-in chat middleware with workflow generation
710
- - **Test Excellence**: 799 tests passing (100% pass rate), organized structure
711
- - **Gateway Integration**: Updated for middleware-based architecture
712
- - **Performance**: Excluded slow tests from CI, builds complete in <2 minutes
713
-
714
- ### ✅ Previous Releases
715
- - ✅ Core workflow engine with 100+ production-ready nodes
716
- - ✅ Unified LocalRuntime (async + enterprise features)
717
- - ✅ Export to container format
718
- - ✅ Reorganized test suite (unit/integration/e2e structure)
719
- - ✅ Self-organizing agent systems and hierarchical RAG
720
- - ✅ Cyclic workflow support with CycleBuilder API
721
- - ✅ Production security framework with RBAC/ABAC/Hybrid
722
- - ✅ Async database infrastructure with pgvector support
723
- - ✅ Admin tool framework with React UI and QA testing
724
- - ✅ Comprehensive workflow library (finance, enterprise patterns)
725
-
726
- ### 🚧 In Progress
727
- - 🚧 Visual workflow builder (Studio UI)
728
- - 🚧 Docker runtime integration
729
- - 🚧 Cloud deployment tools
730
- - 🚧 Advanced RAG toolkit validation
731
-
732
- ## 📄 License
733
-
734
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
735
-
736
- ## 🙏 Acknowledgments
737
-
738
- Built with ❤️ by the Integrum team for the Kailash ecosystem.
739
-
740
- ---
741
-
742
- <p align="center">
743
- <strong>Ready to build your first workflow? Check out our <a href="examples/">examples</a> or dive into the <a href="sdk-users/README.md">documentation</a>!</strong>
744
- </p>