53 lines
1.2 KiB
Markdown
53 lines
1.2 KiB
Markdown
# komAI Agent Guidelines
|
|
|
|
## Репозиторий
|
|
|
|
https://git.komisar.gin.by/komisar/komAI
|
|
|
|
## Entry Point
|
|
|
|
```
|
|
python -m app.komAI
|
|
```
|
|
|
|
## Architecture
|
|
|
|
- `app/` - application entry point (komAI.py expected)
|
|
- `src/` - source code, `src/__init__.py` exposes centralized API
|
|
- `config/` - YAML configuration; `config/global.yaml` is the main config
|
|
- `modules/` - pluggable modules, configured via `global.modules`
|
|
- `log/` - runtime logs
|
|
- `tests/` - standalone unit tests (executable from CLI)
|
|
|
|
## Config System
|
|
|
|
Modules register parameters at initialization via `config.register()`.
|
|
|
|
Access global config:
|
|
```python
|
|
import src.utils.config_manager
|
|
config = src.utils.config_manager.config
|
|
```
|
|
|
|
Save config: `config.save()`
|
|
|
|
## Logging
|
|
|
|
All console output is duplicated to log files. Configure in `config/global.yaml`.
|
|
|
|
## Env Vars (see `.env.example`)
|
|
|
|
- `KOMAI_CONFIG` - path to config file (optional)
|
|
- `LOGGING_LOG_PATH`, `LOGGING_LOG_FILE`, `LOGGING_LEVEL`
|
|
|
|
## Requirements
|
|
|
|
- Python >3.10
|
|
|
|
## Module Development
|
|
|
|
When creating new modules:
|
|
- Register parameters with `config.register(name=..., val=..., cat="module_name", ...)`
|
|
- Use categories to organize params
|
|
- All param changes trigger validators if set
|
|
- Use `getall()` / `getrawall()` for nested param groups |