kite-agent 0.1.0__tar.gz

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.
Files changed (93) hide show
  1. kite_agent-0.1.0/CHANGELOG.md +95 -0
  2. kite_agent-0.1.0/CONTRIBUTING.md +179 -0
  3. kite_agent-0.1.0/LICENSE +21 -0
  4. kite_agent-0.1.0/MANIFEST.in +7 -0
  5. kite_agent-0.1.0/PKG-INFO +621 -0
  6. kite_agent-0.1.0/README.md +523 -0
  7. kite_agent-0.1.0/kite/__init__.py +46 -0
  8. kite_agent-0.1.0/kite/ab_testing.py +384 -0
  9. kite_agent-0.1.0/kite/agent.py +556 -0
  10. kite_agent-0.1.0/kite/agents/__init__.py +3 -0
  11. kite_agent-0.1.0/kite/agents/plan_execute.py +191 -0
  12. kite_agent-0.1.0/kite/agents/react_agent.py +509 -0
  13. kite_agent-0.1.0/kite/agents/reflective_agent.py +90 -0
  14. kite_agent-0.1.0/kite/agents/rewoo.py +119 -0
  15. kite_agent-0.1.0/kite/agents/tot.py +151 -0
  16. kite_agent-0.1.0/kite/conversation.py +125 -0
  17. kite_agent-0.1.0/kite/core.py +974 -0
  18. kite_agent-0.1.0/kite/data_loaders.py +111 -0
  19. kite_agent-0.1.0/kite/embedding_providers.py +372 -0
  20. kite_agent-0.1.0/kite/llm_providers.py +1278 -0
  21. kite_agent-0.1.0/kite/memory/__init__.py +6 -0
  22. kite_agent-0.1.0/kite/memory/advanced_rag.py +333 -0
  23. kite_agent-0.1.0/kite/memory/graph_rag.py +719 -0
  24. kite_agent-0.1.0/kite/memory/session_memory.py +423 -0
  25. kite_agent-0.1.0/kite/memory/vector_memory.py +579 -0
  26. kite_agent-0.1.0/kite/monitoring.py +611 -0
  27. kite_agent-0.1.0/kite/observers.py +107 -0
  28. kite_agent-0.1.0/kite/optimization/__init__.py +9 -0
  29. kite_agent-0.1.0/kite/optimization/resource_router.py +80 -0
  30. kite_agent-0.1.0/kite/persistence.py +42 -0
  31. kite_agent-0.1.0/kite/pipeline/__init__.py +5 -0
  32. kite_agent-0.1.0/kite/pipeline/deterministic_pipeline.py +323 -0
  33. kite_agent-0.1.0/kite/pipeline/reactive_pipeline.py +171 -0
  34. kite_agent-0.1.0/kite/pipeline_manager.py +15 -0
  35. kite_agent-0.1.0/kite/routing/__init__.py +6 -0
  36. kite_agent-0.1.0/kite/routing/aggregator_router.py +325 -0
  37. kite_agent-0.1.0/kite/routing/llm_router.py +149 -0
  38. kite_agent-0.1.0/kite/routing/semantic_router.py +228 -0
  39. kite_agent-0.1.0/kite/safety/__init__.py +6 -0
  40. kite_agent-0.1.0/kite/safety/circuit_breaker.py +360 -0
  41. kite_agent-0.1.0/kite/safety/guardrails.py +82 -0
  42. kite_agent-0.1.0/kite/safety/idempotency_manager.py +304 -0
  43. kite_agent-0.1.0/kite/safety/kill_switch.py +75 -0
  44. kite_agent-0.1.0/kite/tool.py +183 -0
  45. kite_agent-0.1.0/kite/tool_registry.py +87 -0
  46. kite_agent-0.1.0/kite/tools/__init__.py +21 -0
  47. kite_agent-0.1.0/kite/tools/code_execution.py +53 -0
  48. kite_agent-0.1.0/kite/tools/contrib/__init__.py +19 -0
  49. kite_agent-0.1.0/kite/tools/contrib/calculator.py +26 -0
  50. kite_agent-0.1.0/kite/tools/contrib/datetime_utils.py +20 -0
  51. kite_agent-0.1.0/kite/tools/contrib/linkedin.py +428 -0
  52. kite_agent-0.1.0/kite/tools/contrib/web_search.py +30 -0
  53. kite_agent-0.1.0/kite/tools/mcp/__init__.py +31 -0
  54. kite_agent-0.1.0/kite/tools/mcp/database_mcp.py +267 -0
  55. kite_agent-0.1.0/kite/tools/mcp/gdrive_mcp_server.py +503 -0
  56. kite_agent-0.1.0/kite/tools/mcp/gmail_mcp_server.py +601 -0
  57. kite_agent-0.1.0/kite/tools/mcp/postgres_mcp_server.py +490 -0
  58. kite_agent-0.1.0/kite/tools/mcp/slack_mcp_server.py +538 -0
  59. kite_agent-0.1.0/kite/tools/mcp/stripe_mcp_server.py +219 -0
  60. kite_agent-0.1.0/kite/tools/search.py +90 -0
  61. kite_agent-0.1.0/kite/tools/system_tools.py +54 -0
  62. kite_agent-0.1.0/kite/tools_manager.py +27 -0
  63. kite_agent-0.1.0/kite_agent.egg-info/PKG-INFO +621 -0
  64. kite_agent-0.1.0/kite_agent.egg-info/SOURCES.txt +91 -0
  65. kite_agent-0.1.0/kite_agent.egg-info/dependency_links.txt +1 -0
  66. kite_agent-0.1.0/kite_agent.egg-info/requires.txt +67 -0
  67. kite_agent-0.1.0/kite_agent.egg-info/top_level.txt +1 -0
  68. kite_agent-0.1.0/requirements.txt +46 -0
  69. kite_agent-0.1.0/requirements_no_vllm.txt +0 -0
  70. kite_agent-0.1.0/setup.cfg +4 -0
  71. kite_agent-0.1.0/setup.py +130 -0
  72. kite_agent-0.1.0/tests/test_async_concurrency.py +40 -0
  73. kite_agent-0.1.0/tests/test_caching.py +142 -0
  74. kite_agent-0.1.0/tests/test_conversation.py +236 -0
  75. kite_agent-0.1.0/tests/test_data_loaders.py +179 -0
  76. kite_agent-0.1.0/tests/test_embedding_providers.py +203 -0
  77. kite_agent-0.1.0/tests/test_exports.py +22 -0
  78. kite_agent-0.1.0/tests/test_framework.py +269 -0
  79. kite_agent-0.1.0/tests/test_framework_observers.py +69 -0
  80. kite_agent-0.1.0/tests/test_graph_persistence.py +79 -0
  81. kite_agent-0.1.0/tests/test_integration_e2e.py +293 -0
  82. kite_agent-0.1.0/tests/test_llm_providers.py +173 -0
  83. kite_agent-0.1.0/tests/test_llm_routing.py +74 -0
  84. kite_agent-0.1.0/tests/test_native_tools.py +89 -0
  85. kite_agent-0.1.0/tests/test_parallel_async.py +38 -0
  86. kite_agent-0.1.0/tests/test_planning_agents.py +61 -0
  87. kite_agent-0.1.0/tests/test_production.py +83 -0
  88. kite_agent-0.1.0/tests/test_refactored_features.py +65 -0
  89. kite_agent-0.1.0/tests/test_reflection.py +67 -0
  90. kite_agent-0.1.0/tests/test_routing.py +165 -0
  91. kite_agent-0.1.0/tests/test_structured_output.py +54 -0
  92. kite_agent-0.1.0/tests/test_token_tracking.py +47 -0
  93. kite_agent-0.1.0/tests/test_tools.py +215 -0
@@ -0,0 +1,95 @@
1
+ # Changelog
2
+
3
+ All notable changes to Kite Framework will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.1.0] - 2025-01-23
9
+
10
+ ### Added
11
+
12
+ #### Core Framework
13
+ - Initial release of Kite Framework
14
+ - Lazy-loading architecture with ~50ms startup time
15
+ - Multi-provider LLM support (OpenAI, Anthropic, Groq, Ollama)
16
+ - Configuration management via environment variables
17
+
18
+ #### Safety Mechanisms
19
+ - **Circuit Breaker**: Production-grade circuit breaker with 3 states (CLOSED, OPEN, HALF_OPEN)
20
+ - Automatic failure detection and recovery
21
+ - Configurable thresholds and timeouts
22
+ - Statistics tracking and monitoring
23
+ - **Idempotency Manager**: Duplicate operation prevention
24
+ - Memory and Redis backend support
25
+ - Configurable TTL for cached results
26
+ - **Kill Switch**: Emergency stop mechanism
27
+ - Max iterations enforcement
28
+ - Cost limit enforcement
29
+ - Custom stop conditions
30
+
31
+ #### Agent Reasoning Patterns
32
+ - **ReAct Agent**: Reasoning + Acting loop with tool use
33
+ - **Plan-Execute Agent**: Task decomposition with replanning
34
+ - **ReWOO Agent**: Parallel execution with dependency resolution
35
+ - **Tree-of-Thoughts Agent**: Multi-path reasoning exploration
36
+
37
+ #### Memory Systems
38
+ - **Vector Memory**: Semantic search with FAISS/ChromaDB
39
+ - Document storage and retrieval
40
+ - Embedding-based similarity search
41
+ - **Graph RAG**: Knowledge graph for multi-hop reasoning
42
+ - Entity and relationship management
43
+ - Graph traversal queries
44
+ - **Session Memory**: Conversation context management
45
+
46
+ #### Pipeline & Routing
47
+ - **Deterministic Pipelines**: Workflow orchestration
48
+ - Sequential step execution
49
+ - Checkpoint support for Human-in-the-Loop (HITL)
50
+ - Intervention points for state modification
51
+ - **Semantic Router**: Intent classification using embeddings
52
+ - **Aggregator Router**: Multi-agent response combination
53
+
54
+ #### Tools & Integrations
55
+ - Built-in tools: web_search, calculator, datetime
56
+ - MCP (Model Context Protocol) integration
57
+ - PostgreSQL MCP server
58
+ - Gmail MCP client (basic)
59
+ - Google Drive MCP client (basic)
60
+
61
+ #### Monitoring & Observability
62
+ - Metrics collection for agents and operations
63
+ - Circuit breaker statistics
64
+ - Cost tracking
65
+
66
+ #### Documentation
67
+ - Comprehensive README with quick start
68
+ - API reference documentation
69
+ - Architecture guide
70
+ - Safety guide
71
+ - Memory systems guide
72
+ - 9 production-ready example case studies
73
+
74
+ ### Known Issues
75
+ - No comprehensive unit test suite
76
+ - Tool ecosystem limited (only 3 built-in tools)
77
+ - MCP servers are basic implementations
78
+
79
+ ### Notes
80
+ This is an **alpha release** (v0.1.0). The framework is functional but has known limitations:
81
+ - Not recommended for production use without thorough testing
82
+ - API may change in future releases
83
+ - Some features are basic implementations
84
+ - Comprehensive testing needed before production deployment
85
+
86
+ For production use, we recommend:
87
+ 1. Add your own unit tests for critical paths
88
+ 2. Implement proper async in LLM providers if using async extensively
89
+ 3. Add persistence layer for vector memory
90
+ 4. Monitor circuit breaker statistics closely
91
+
92
+ ### Contributors
93
+ - Thien Nguyen (@thienzz)
94
+
95
+ [0.1.0]: https://github.com/thienzz/Kite/releases/tag/v0.1.0
@@ -0,0 +1,179 @@
1
+ # Contributing to Kite Framework
2
+
3
+ First off, thank you for considering contributing to Kite! 🎉
4
+
5
+ ## Code of Conduct
6
+
7
+ This project adheres to a code of conduct. By participating, you are expected to uphold this code.
8
+
9
+ ## How Can I Contribute?
10
+
11
+ ### Reporting Bugs
12
+
13
+ Before creating bug reports, please check existing issues. When you create a bug report, include:
14
+
15
+ - **Use a clear and descriptive title**
16
+ - **Describe the exact steps to reproduce the problem**
17
+ - **Provide specific examples** (code snippets, error messages)
18
+ - **Describe the behavior you observed** and what you expected
19
+ - **Include your environment details** (Python version, OS, Kite version)
20
+
21
+ Example bug report:
22
+ ```markdown
23
+ **Title**: Circuit breaker not opening after 3 failures
24
+
25
+ **Description**:
26
+ Circuit breaker is configured with failure_threshold=3 but doesn't
27
+ open even after 5 consecutive failures.
28
+
29
+ **Steps to Reproduce**:
30
+ 1. Configure circuit breaker with threshold=3
31
+ 2. Cause 5 consecutive LLM call failures
32
+ 3. Observe circuit breaker state
33
+
34
+ **Expected**: State should be OPEN after 3 failures
35
+ **Actual**: State remains CLOSED
36
+
37
+ **Environment**:
38
+ - Kite version: 0.1.0
39
+ - Python: 3.10.0
40
+ - OS: Ubuntu 22.04
41
+ ```
42
+
43
+ ### Suggesting Enhancements
44
+
45
+ Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, include:
46
+
47
+ - **Use a clear and descriptive title**
48
+ - **Provide a detailed description** of the proposed functionality
49
+ - **Explain why this enhancement would be useful**
50
+ - **Provide examples** of how it would be used
51
+
52
+ ### Pull Requests
53
+
54
+ 1. **Fork the repo** and create your branch from `main`
55
+ 2. **Add tests** if you've added code that should be tested
56
+ 3. **Update documentation** if you've changed APIs
57
+ 4. **Ensure tests pass**: `pytest tests/`
58
+ 5. **Follow the code style**: `black kite/ && flake8 kite/`
59
+ 6. **Write a clear commit message**
60
+
61
+ Example workflow:
62
+ ```bash
63
+ # Fork and clone
64
+ git clone https://github.com/thienzz/Kite.git
65
+ cd Kite
66
+
67
+ # Create branch
68
+ git checkout -b feature/my-new-feature
69
+
70
+ # Make changes
71
+ # ... code ...
72
+
73
+ # Test
74
+ pytest tests/
75
+
76
+ # Format
77
+ black kite/
78
+ flake8 kite/
79
+
80
+ # Commit
81
+ git add .
82
+ git commit -m "Add feature: description"
83
+
84
+ # Push
85
+ git push origin feature/my-new-feature
86
+
87
+ # Open Pull Request on GitHub
88
+ ```
89
+
90
+ ## Development Setup
91
+ ```bash
92
+ # Clone repository
93
+ git clone https://github.com/thienzz/Kite.git
94
+ cd Kite
95
+
96
+ # Create virtual environment
97
+ python -m venv .venv
98
+ source .venv/bin/activate # On Windows: .venv\Scripts\activate
99
+
100
+ # Install dependencies
101
+ pip install -r requirements.txt
102
+ pip install -e ".[dev]" # Install in editable mode with dev dependencies
103
+
104
+ # Run tests
105
+ pytest tests/
106
+
107
+ # Run examples
108
+ python examples/case1_ecommerce_support.py
109
+ ```
110
+
111
+ ## Code Style
112
+
113
+ - Follow PEP 8
114
+ - Use `black` for formatting: `black kite/`
115
+ - Use `flake8` for linting: `flake8 kite/`
116
+ - Use type hints where possible
117
+ - Write docstrings for public APIs
118
+
119
+ Example:
120
+ ```python
121
+ def create_agent(
122
+ self,
123
+ name: str,
124
+ system_prompt: str = "",
125
+ tools: Optional[List[Tool]] = None,
126
+ **kwargs
127
+ ) -> Agent:
128
+ """
129
+ Create a general-purpose agent.
130
+
131
+ Args:
132
+ name: Agent name
133
+ system_prompt: System prompt for the agent
134
+ tools: List of tools available to the agent
135
+ **kwargs: Additional configuration
136
+
137
+ Returns:
138
+ Agent instance with configured tools
139
+
140
+ Example:
141
+ >>> agent = ai.create_agent(
142
+ ... name="Assistant",
143
+ ... system_prompt="You are helpful",
144
+ ... tools=[search_tool]
145
+ ... )
146
+ """
147
+ # Implementation
148
+ ```
149
+
150
+ ## Testing
151
+
152
+ - Write unit tests for new features
153
+ - Ensure existing tests pass
154
+ - Aim for >70% code coverage
155
+ ```bash
156
+ # Run all tests
157
+ pytest tests/
158
+
159
+ # Run with coverage
160
+ pytest --cov=kite tests/
161
+
162
+ # Run specific test
163
+ pytest tests/test_circuit_breaker.py
164
+ ```
165
+
166
+ ## Documentation
167
+
168
+ - Update README.md if adding major features
169
+ - Update docs/ for API changes
170
+ - Add examples for new functionality
171
+ - Keep CHANGELOG.md updated
172
+
173
+ ## Questions?
174
+
175
+ Feel free to open an issue with the "question" label or reach out to maintainers.
176
+
177
+ ## License
178
+
179
+ By contributing, you agree that your contributions will be licensed under the MIT License.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thien Nguyen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,7 @@
1
+ include README.md
2
+ include LICENSE
3
+ include requirements.txt
4
+ include requirements_no_vllm.txt
5
+ include CHANGELOG.md
6
+ include CONTRIBUTING.md
7
+ recursive-include kite *.json *.yaml *.yml *.txt