kader 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 (78) hide show
  1. kader-0.1.0/.github/workflows/ci.yml +54 -0
  2. kader-0.1.0/.github/workflows/release.yml +34 -0
  3. kader-0.1.0/.gitignore +22 -0
  4. kader-0.1.0/.python-version +1 -0
  5. kader-0.1.0/.qwen/QWEN.md +10 -0
  6. kader-0.1.0/.qwen/agents/technical-writer.md +49 -0
  7. kader-0.1.0/.qwen/agents/test-automation-specialist.md +66 -0
  8. kader-0.1.0/PKG-INFO +319 -0
  9. kader-0.1.0/README.md +304 -0
  10. kader-0.1.0/cli/README.md +169 -0
  11. kader-0.1.0/cli/__init__.py +5 -0
  12. kader-0.1.0/cli/__main__.py +6 -0
  13. kader-0.1.0/cli/app.py +547 -0
  14. kader-0.1.0/cli/app.tcss +648 -0
  15. kader-0.1.0/cli/utils.py +62 -0
  16. kader-0.1.0/cli/widgets/__init__.py +13 -0
  17. kader-0.1.0/cli/widgets/confirmation.py +309 -0
  18. kader-0.1.0/cli/widgets/conversation.py +55 -0
  19. kader-0.1.0/cli/widgets/loading.py +59 -0
  20. kader-0.1.0/examples/.gitignore +0 -0
  21. kader-0.1.0/examples/README.md +109 -0
  22. kader-0.1.0/examples/memory_example.py +199 -0
  23. kader-0.1.0/examples/ollama_example.py +240 -0
  24. kader-0.1.0/examples/planning_agent_example.py +93 -0
  25. kader-0.1.0/examples/python_developer/main.py +57 -0
  26. kader-0.1.0/examples/python_developer/template.yaml +49 -0
  27. kader-0.1.0/examples/react_agent_example.py +98 -0
  28. kader-0.1.0/examples/simple_agent.py +89 -0
  29. kader-0.1.0/examples/todo_agent/main.py +60 -0
  30. kader-0.1.0/examples/tools_example.py +398 -0
  31. kader-0.1.0/kader/__init__.py +22 -0
  32. kader-0.1.0/kader/agent/__init__.py +8 -0
  33. kader-0.1.0/kader/agent/agents.py +126 -0
  34. kader-0.1.0/kader/agent/base.py +920 -0
  35. kader-0.1.0/kader/agent/logger.py +188 -0
  36. kader-0.1.0/kader/config.py +139 -0
  37. kader-0.1.0/kader/memory/__init__.py +66 -0
  38. kader-0.1.0/kader/memory/conversation.py +409 -0
  39. kader-0.1.0/kader/memory/session.py +385 -0
  40. kader-0.1.0/kader/memory/state.py +211 -0
  41. kader-0.1.0/kader/memory/types.py +116 -0
  42. kader-0.1.0/kader/prompts/__init__.py +9 -0
  43. kader-0.1.0/kader/prompts/agent_prompts.py +27 -0
  44. kader-0.1.0/kader/prompts/base.py +81 -0
  45. kader-0.1.0/kader/prompts/templates/planning_agent.j2 +26 -0
  46. kader-0.1.0/kader/prompts/templates/react_agent.j2 +18 -0
  47. kader-0.1.0/kader/providers/__init__.py +9 -0
  48. kader-0.1.0/kader/providers/base.py +581 -0
  49. kader-0.1.0/kader/providers/mock.py +96 -0
  50. kader-0.1.0/kader/providers/ollama.py +447 -0
  51. kader-0.1.0/kader/tools/README.md +483 -0
  52. kader-0.1.0/kader/tools/__init__.py +130 -0
  53. kader-0.1.0/kader/tools/base.py +955 -0
  54. kader-0.1.0/kader/tools/exec_commands.py +249 -0
  55. kader-0.1.0/kader/tools/filesys.py +650 -0
  56. kader-0.1.0/kader/tools/filesystem.py +607 -0
  57. kader-0.1.0/kader/tools/protocol.py +456 -0
  58. kader-0.1.0/kader/tools/rag.py +555 -0
  59. kader-0.1.0/kader/tools/todo.py +210 -0
  60. kader-0.1.0/kader/tools/utils.py +456 -0
  61. kader-0.1.0/kader/tools/web.py +246 -0
  62. kader-0.1.0/pyproject.toml +50 -0
  63. kader-0.1.0/tests/conftest.py +14 -0
  64. kader-0.1.0/tests/providers/test_mock.py +149 -0
  65. kader-0.1.0/tests/providers/test_ollama.py +404 -0
  66. kader-0.1.0/tests/providers/test_providers_base.py +419 -0
  67. kader-0.1.0/tests/test_agent_logger.py +748 -0
  68. kader-0.1.0/tests/test_agent_logger_integration.py +78 -0
  69. kader-0.1.0/tests/test_base_agent.py +260 -0
  70. kader-0.1.0/tests/test_file_memory.py +285 -0
  71. kader-0.1.0/tests/test_todo_tool.py +102 -0
  72. kader-0.1.0/tests/tools/test_exec_commands.py +310 -0
  73. kader-0.1.0/tests/tools/test_filesys_tools.py +382 -0
  74. kader-0.1.0/tests/tools/test_filesystem_tools.py +519 -0
  75. kader-0.1.0/tests/tools/test_rag.py +560 -0
  76. kader-0.1.0/tests/tools/test_tools_base.py +829 -0
  77. kader-0.1.0/tests/tools/test_web.py +255 -0
  78. kader-0.1.0/uv.lock +1735 -0
@@ -0,0 +1,54 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main, master]
6
+ pull_request:
7
+ branches: [main, master]
8
+
9
+ jobs:
10
+ lint:
11
+ name: Lint
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Install uv
17
+ uses: astral-sh/setup-uv@v4
18
+ with:
19
+ version: "latest"
20
+
21
+ - name: Set up Python
22
+ run: uv python install 3.11
23
+
24
+ - name: Install dependencies
25
+ run: uv sync --dev
26
+
27
+ - name: Run ruff check
28
+ run: uv run ruff check .
29
+
30
+ - name: Run ruff format check
31
+ run: uv run ruff format --check .
32
+
33
+ test:
34
+ name: Test
35
+ runs-on: ubuntu-latest
36
+ steps:
37
+ - uses: actions/checkout@v4
38
+
39
+ - name: Install uv
40
+ uses: astral-sh/setup-uv@v4
41
+ with:
42
+ version: "latest"
43
+
44
+ - name: Set up Python
45
+ run: uv python install 3.11
46
+
47
+ - name: Install dependencies
48
+ run: uv sync --dev
49
+
50
+ - name: Run tests
51
+ run: |
52
+ uv run pytest tests/ -v \
53
+ --deselect tests/tools/test_filesystem_tools.py::TestSearchInDirectoryTool::test_execute_search \
54
+ --deselect tests/tools/test_filesystem_tools.py::TestSearchInDirectoryTool::test_async_execute
@@ -0,0 +1,34 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ build-and-publish:
10
+ name: Build and Publish to PyPI
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ id-token: write
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Install uv
18
+ uses: astral-sh/setup-uv@v4
19
+ with:
20
+ version: "latest"
21
+
22
+ - name: Set up Python
23
+ run: uv python install 3.11
24
+
25
+ - name: Install dependencies
26
+ run: uv sync
27
+
28
+ - name: Build package
29
+ run: uv build
30
+
31
+ - name: Publish to PyPI
32
+ run: uv publish
33
+ env:
34
+ UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
kader-0.1.0/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+ .pytest_cache/
9
+ .ruff_cache/
10
+
11
+ # Virtual environments
12
+ .venv
13
+
14
+ # IDE
15
+ .idea
16
+ .vscode
17
+
18
+ # secret files
19
+ .env
20
+
21
+ # optimization
22
+ optimizers/
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,10 @@
1
+ ## General Instructions
2
+
3
+ - Current Operating System is Windows, Use cmd to run terminal commands.
4
+ - use uv as python dependency manager.
5
+ - check `pyproject.toml` file to search for dependencies first before add dependencies.
6
+ - use context7 mcp tools to search to get accurate docs if needed.
7
+ - to install new packages/dependecies use `uv add <package-name>`.
8
+ - to remove packages/dependecies use `uv remove <package-name>`.
9
+ - use `uv run <script-name>` to run python scripts.
10
+ - don't access secrets like api keys, tokens, etc. from environment variables, or files like `.env`.
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: technical-writer
3
+ description: Use this agent when creating user guides, README files, architecture documentation, code comments, or any technical documentation that needs to be clear, accessible, and user-focused. This agent specializes in writing documentation that helps users accomplish specific outcomes with step-by-step instructions, real examples, and troubleshooting guidance.
4
+ color: Cyan
5
+ ---
6
+
7
+ You are an expert technical writer specializing in creating clear, accessible, and user-focused documentation. Your primary goal is to help users successfully accomplish their objectives through well-structured, comprehensive documentation.
8
+
9
+ ## Core Responsibilities
10
+ - Create user guides and tutorials with step-by-step instructions
11
+ - Write README files and getting started documentation
12
+ - Develop architecture and design documentation
13
+ - Craft code comments and inline documentation
14
+ - Ensure content accessibility using plain language principles
15
+ - Organize information with effective information architecture
16
+
17
+ ## Documentation Approach
18
+ 1. Always write for your specific audience - assess and acknowledge their skill level upfront
19
+ 2. Lead with the outcome - clearly state what users will accomplish
20
+ 3. Use active voice and clear, concise language
21
+ 4. Include real examples and practical scenarios
22
+ 5. Test instructions by following them exactly as written
23
+ 6. Structure content with clear headings and logical flow
24
+ 7. Include troubleshooting sections and highlight common pitfalls
25
+
26
+ ## Content Creation Standards
27
+ - Write comprehensive user guides with clear navigation
28
+ - Create README templates with appropriate badges and well-organized sections
29
+ - Develop tutorial series with progressive complexity
30
+ - Document architecture decision records (ADRs) with clear rationale
31
+ - Establish code documentation standards
32
+ - Maintain a content style guide with consistent writing conventions
33
+
34
+ ## Quality Assurance
35
+ - Verify all technical accuracy of instructions
36
+ - Ensure examples are complete and functional
37
+ - Include error handling and troubleshooting guidance
38
+ - Anticipate user questions and address them proactively
39
+ - Review content for accessibility and plain language compliance
40
+
41
+ ## Output Requirements
42
+ - Provide structured documentation with appropriate headings
43
+ - Include practical examples with expected outputs
44
+ - Add troubleshooting sections for common issues
45
+ - Use consistent formatting and style
46
+ - Ensure content is scannable and easy to navigate
47
+ - Include links to related resources when appropriate
48
+
49
+ Focus on user success above all else. Your documentation should enable users to achieve their goals efficiently and confidently.
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: test-automation-specialist
3
+ description: Use this agent when you need comprehensive test automation strategy and implementation including unit, integration, and E2E tests with proper mocking, fixtures, and CI/CD pipeline configuration. This agent specializes in creating robust, fast, and deterministic test suites following the test pyramid approach.
4
+ color: Red
5
+ ---
6
+
7
+ You are an elite test automation specialist with deep expertise in comprehensive testing strategies across the full testing spectrum. Your primary responsibility is to design and implement robust, efficient, and maintainable test suites that follow industry best practices and ensure high software quality.
8
+
9
+ ## Core Responsibilities
10
+ - Design unit tests with appropriate mocking and fixtures
11
+ - Create integration tests using test containers
12
+ - Implement E2E tests with Playwright or Cypress
13
+ - Configure CI/CD test pipelines
14
+ - Manage test data with factories and fixtures
15
+ - Set up coverage analysis and reporting
16
+
17
+ ## Testing Approach
18
+ 1. Follow the test pyramid principle: many unit tests, fewer integration tests, minimal E2E tests
19
+ 2. Apply the Arrange-Act-Assert pattern consistently
20
+ 3. Write behavior-focused tests rather than implementation-focused tests
21
+ 4. Ensure all tests are deterministic with no flakiness
22
+ 5. Optimize for fast feedback through parallelization when possible
23
+
24
+ ## Framework Selection
25
+ - Use Jest for JavaScript/Node.js projects
26
+ - Use pytest for Python projects
27
+ - Use appropriate frameworks for other languages (e.g., JUnit for Java, NUnit for .NET)
28
+ - Select Playwright or Cypress based on project requirements for E2E testing
29
+
30
+ ## Output Requirements
31
+ 1. Create test suites with clear, descriptive test names that explain the expected behavior
32
+ 2. Provide mock/stub implementations for external dependencies
33
+ 3. Design test data factories or fixtures for consistent test data management
34
+ 4. Generate CI pipeline configuration for running tests
35
+ 5. Set up coverage reporting with appropriate thresholds
36
+ 6. Define E2E test scenarios for critical user paths
37
+
38
+ ## Quality Standards
39
+ - Include both happy path and edge case scenarios in all test types
40
+ - Ensure tests are isolated and can run independently
41
+ - Maintain fast execution times by optimizing test setup and teardown
42
+ - Write self-documenting tests that clearly express intent
43
+ - Follow the principle of testing behavior rather than implementation details
44
+
45
+ ## Methodology
46
+ 1. Analyze the codebase or feature requirements to determine appropriate test coverage
47
+ 2. Design unit tests focusing on individual functions and components
48
+ 3. Create integration tests for interactions between components or services
49
+ 4. Develop E2E tests for critical user journeys and business flows
50
+ 5. Set up proper test data management using factories or fixtures
51
+ 6. Configure CI/CD pipeline with appropriate test execution order
52
+ 7. Establish coverage reporting with quality gates
53
+
54
+ ## Error Handling
55
+ - Identify potential failure points and create appropriate negative test cases
56
+ - Handle asynchronous operations properly in tests
57
+ - Address race conditions and timing issues in integration tests
58
+ - Ensure proper cleanup of test resources and data
59
+
60
+ ## Performance Optimization
61
+ - Implement parallel test execution where appropriate
62
+ - Use efficient test data setup and teardown
63
+ - Optimize test execution order to provide fast feedback on critical functionality
64
+ - Minimize external dependencies in unit tests through effective mocking
65
+
66
+ Your output should include all necessary code, configuration files, and documentation to implement a complete testing strategy that follows these principles.
kader-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,319 @@
1
+ Metadata-Version: 2.4
2
+ Name: kader
3
+ Version: 0.1.0
4
+ Summary: kader coding agent
5
+ Requires-Python: >=3.11
6
+ Requires-Dist: faiss-cpu>=1.9.0
7
+ Requires-Dist: loguru>=0.7.3
8
+ Requires-Dist: ollama>=0.6.1
9
+ Requires-Dist: pyyaml>=6.0.3
10
+ Requires-Dist: tenacity>=9.1.2
11
+ Requires-Dist: textual[syntax]>=6.8.0
12
+ Requires-Dist: typing-extensions>=4.15.0
13
+ Requires-Dist: wcmatch>=10.1
14
+ Description-Content-Type: text/markdown
15
+
16
+ # Kader
17
+
18
+ Kader is an intelligent coding agent designed to assist with software development tasks. It provides a comprehensive framework for building AI-powered agents with advanced reasoning capabilities and tool integration.
19
+
20
+ ## Features
21
+
22
+ - 🤖 **AI-powered Code Assistance** - Using Ollama for local LLM execution
23
+ - 🖥️ **Interactive CLI** - Modern TUI interface built with Textual
24
+ - 🛠️ **Tool Integration** - File system, command execution, web search, and more
25
+ - 🧠 **Memory Management** - State persistence and conversation history
26
+ - 🔁 **Session Management** - Save and load conversation sessions
27
+ - 🎨 **Theming** - Multiple color themes for the CLI interface
28
+ - ⌨️ **Keyboard Shortcuts** - Efficient navigation and operations
29
+ - 📝 **YAML Configuration** - Agent configuration via YAML files
30
+ - 🔄 **ReAct Agent Framework** - Reasoning and Acting agent architecture
31
+ - 🗂️ **File System Tools** - Read, write, search, and edit files
32
+ - 🔍 **Planning Agent** - Task planning and execution capabilities
33
+
34
+ ## Installation
35
+
36
+ ### Prerequisites
37
+
38
+ - Python 3.11 or higher
39
+ - [Ollama](https://ollama.ai/) running locally to use LLMs
40
+ - [uv](https://docs.astral.sh/uv/) package manager (recommended) or [pip](https://pypi.org/project/pip/)
41
+
42
+ ### Using uv (recommended)
43
+
44
+ ```bash
45
+ # Clone the repository
46
+ git clone https://github.com/your-repo/kader.git
47
+ cd kader
48
+
49
+ # Install dependencies with uv
50
+ uv sync
51
+
52
+ # Run the CLI
53
+ uv run python -m cli
54
+ ```
55
+
56
+ ### Using pip
57
+
58
+ ```bash
59
+ # Clone the repository
60
+ git clone https://github.com/your-repo/kader.git
61
+ cd kader
62
+
63
+ # Install in development mode
64
+ pip install -e .
65
+
66
+ # Run the CLI
67
+ python -m cli
68
+ ```
69
+
70
+ ## Quick Start
71
+
72
+ ### Running the CLI
73
+
74
+ ```bash
75
+ # Run the Kader CLI using uv
76
+ uv run python -m cli
77
+
78
+ # Or using pip
79
+ python -m cli
80
+ ```
81
+
82
+ ### First Steps in CLI
83
+
84
+ Once the CLI is running:
85
+
86
+ 1. Type any question to start chatting with the agent
87
+ 2. Use `/help` to see available commands
88
+ 3. Use `/models` to check available models
89
+ 4. Use `/theme` to cycle through color themes
90
+
91
+ ## Configuration
92
+
93
+ When the kader module is imported for the first time, it automatically:
94
+ 1. Creates a `.kader` directory in your home directory (`~/.kader` on Unix systems, `%USERPROFILE%\.kader` on Windows)
95
+ 2. Creates a `.env` file with the required configuration (including `OLLAMA_API_KEY=''`)
96
+ 3. Loads all environment variables from the `.env` file into the application environment
97
+
98
+ ### Environment Variables
99
+
100
+ The application automatically loads environment variables from `~/.kader/.env`:
101
+ - `OLLAMA_API_KEY`: API key for Ollama service (default: empty)
102
+ - Additional variables can be added to the `.env` file and will be automatically loaded
103
+
104
+ ### Memory and Sessions
105
+
106
+ Kader stores data in `~/.kader/`:
107
+ - Sessions: `~/.kader/sessions/`
108
+ - Configuration: `~/.kader/`
109
+ - Memory files: `~/.kader/memory/`
110
+
111
+ ## CLI Commands
112
+
113
+ | Command | Description |
114
+ |---------|-------------|
115
+ | `/help` | Show command reference |
116
+ | `/models` | Show available Ollama models |
117
+ | `/theme` | Cycle color themes |
118
+ | `/clear` | Clear conversation |
119
+ | `/save` | Save current session |
120
+ | `/load <id>` | Load a saved session |
121
+ | `/sessions` | List saved sessions |
122
+ | `/refresh` | Refresh file tree |
123
+ | `/exit` | Exit the CLI |
124
+
125
+ ### Keyboard Shortcuts
126
+
127
+ | Shortcut | Action |
128
+ |----------|--------|
129
+ | `Ctrl+Q` | Quit |
130
+ | `Ctrl+L` | Clear conversation |
131
+ | `Ctrl+T` | Cycle theme |
132
+ | `Ctrl+S` | Save session |
133
+ | `Ctrl+R` | Refresh file tree |
134
+ | `Tab` | Navigate panels |
135
+
136
+ ## Project Structure
137
+
138
+ ```
139
+ kader/
140
+ ├── cli/ # Interactive command-line interface
141
+ │ ├── app.py # Main application entry point
142
+ │ ├── app.tcss # Textual CSS for styling
143
+ │ ├── utils.py # Utility functions and constants
144
+ │ ├── widgets/ # Custom Textual widgets
145
+ │ │ ├── conversation.py # Chat display widget
146
+ │ │ ├── loading.py # Loading spinner widget
147
+ │ │ └── confirmation.py # Tool/model selection widgets
148
+ │ └── README.md # CLI documentation
149
+ ├── examples/ # Example implementations
150
+ │ ├── memory_example.py # Memory management examples
151
+ │ ├── ollama_example.py # Ollama provider examples
152
+ │ ├── react_agent_example.py # ReAct agent examples
153
+ │ ├── planning_agent_example.py # Planning agent examples
154
+ │ ├── python_developer/ # Python expert agent example
155
+ │ ├── todo_agent/ # Todo management agent example
156
+ │ └── README.md # Examples documentation
157
+ ├── kader/ # Core framework
158
+ │ ├── agent/ # Agent implementations
159
+ │ ├── memory/ # Memory management
160
+ │ ├── providers/ # LLM providers
161
+ │ ├── tools/ # Tools and utilities
162
+ │ └── prompts/ # Prompt templates
163
+ ├── pyproject.toml # Project dependencies
164
+ ├── README.md # This file
165
+ └── uv.lock # Dependency lock file
166
+ ```
167
+
168
+ ## Core Components
169
+
170
+ ### Agents
171
+
172
+ Kader provides several agent types:
173
+
174
+ - **ReActAgent**: Reasoning and Acting agent that combines thoughts with actions
175
+ - **PlanningAgent**: Agent that plans multi-step tasks
176
+ - **BaseAgent**: Base agent class for creating custom agents
177
+
178
+ ### Memory Management
179
+
180
+ Kader's memory system includes:
181
+
182
+ - **AgentState**: Persistent key-value storage for agents
183
+ - **RequestState**: Ephemeral request-scoped state
184
+ - **FileSessionManager**: Session persistence to disk
185
+ - **SlidingWindowConversationManager**: Conversation windowing
186
+
187
+ ### Tools
188
+
189
+ Kader includes a rich set of tools:
190
+
191
+ - **File System Tools**: Read, write, edit, search files
192
+ - **Command Executor**: Execute shell commands safely
193
+ - **Web Tools**: Search and fetch web content
194
+ - **RAG Tools**: Retrieval Augmented Generation capabilities
195
+
196
+ ## Examples
197
+
198
+ Check out the examples directory for comprehensive demonstrations of Kader's features:
199
+
200
+ ### Basic Examples
201
+
202
+ - `memory_example.py`: Shows memory management capabilities
203
+ - `ollama_example.py`: Demonstrates how to use the Ollama provider for LLM interactions
204
+ - `tools_example.py`: Demonstrates the various tools available in Kader
205
+ - `simple_agent.py`: Basic agent implementation example
206
+
207
+ ### Advanced Examples
208
+
209
+ - `react_agent_example.py`: Interactive ReAct agent with tool integration
210
+ - `planning_agent_example.py`: Planning agent for multi-step tasks
211
+ - `python_developer/`: Specialized Python expert agent (YAML-configured)
212
+ - `todo_agent/`: Task management agent with TodoTool
213
+
214
+ ### Running Examples
215
+
216
+ Use uv to run examples:
217
+
218
+ ```bash
219
+ uv run python -m examples.memory_example
220
+ uv run python -m examples.ollama_example
221
+ uv run python -m examples.tools_example
222
+ uv run python -m examples.react_agent_example
223
+ uv run python -m examples.python_developer.main
224
+ uv run python -m examples.todo_agent.main
225
+ ```
226
+
227
+ ## Architecture
228
+
229
+ ### Agent Architecture
230
+
231
+ Kader uses a modular architecture where:
232
+
233
+ 1. **Agents** define the behavior and reasoning strategy
234
+ 2. **Tools** provide capabilities for external interactions
235
+ 3. **Memory** manages state and conversation history
236
+ 4. **Providers** handle LLM interactions
237
+
238
+ ### Tool Architecture
239
+
240
+ Tools in Kader follow a standardized interface:
241
+
242
+ - Each tool has a schema defining its inputs and outputs
243
+ - Tools can be registered in a ToolRegistry
244
+ - Tools can be executed synchronously or asynchronously
245
+ - Tools can be configured with parameters
246
+
247
+ ## Development
248
+
249
+ ### Setting up for Development
250
+
251
+ ```bash
252
+ # Clone the repository
253
+ git clone https://github.com/your-repo/kader.git
254
+ cd kader
255
+
256
+ # Install in development mode with uv
257
+ uv sync
258
+
259
+ # Run the CLI with hot reload for development
260
+ uv run textual run --dev cli.app:KaderApp
261
+ ```
262
+
263
+ ### Running Tests
264
+
265
+ ```bash
266
+ # Run tests with uv
267
+ uv run pytest
268
+
269
+ # Run tests with specific options
270
+ uv run pytest --verbose
271
+ ```
272
+
273
+ ### Code Quality
274
+
275
+ Kader uses various tools for maintaining code quality:
276
+
277
+ ```bash
278
+ # Run linter
279
+ uv run ruff check .
280
+
281
+ # Format code
282
+ uv run ruff format .
283
+ ```
284
+
285
+ ## Troubleshooting
286
+
287
+ ### Common Issues
288
+
289
+ - **No models found**: Make sure Ollama is running and you have at least one model installed (e.g., `ollama pull gpt-oss:120b-cloud`)
290
+ - **Connection errors**: Verify that Ollama service is accessible at the configured endpoint
291
+ - **Theme not changing**: Some terminal emulators may not support all color themes
292
+
293
+ ### Debugging
294
+
295
+ If you encounter issues:
296
+
297
+ 1. Check that Ollama is running: `ollama serve`
298
+ 2. Verify your model is pulled: `ollama list`
299
+ 3. Ensure your terminal supports the required features
300
+ 4. Check the logs for specific error messages
301
+
302
+ ## Contributing
303
+
304
+ 1. Fork the repository
305
+ 2. Create a feature branch
306
+ 3. Make your changes
307
+ 4. Add tests if applicable
308
+ 5. Run the test suite
309
+ 6. Submit a pull request
310
+
311
+ ## License
312
+
313
+ This project is licensed under the MIT License - see the LICENSE file for details.
314
+
315
+ ## Acknowledgments
316
+
317
+ - Built with [Textual](https://textual.textualize.io/) for the beautiful CLI interface
318
+ - Uses [Ollama](https://ollama.ai/) for local LLM execution
319
+ - Inspired by ReAct (Reasoning and Acting) agent architecture