@Eugene Sukhodolskiy Eugene Sukhodolskiy authored on 8 Apr
client Dark theme and session delete 2 months ago
navi Filesystem tool: unrestricted mode by default 2 months ago
.env.example Filesystem tool: unrestricted mode by default 2 months ago
.gitignore Unrestricted terminal mode and SSH tool 2 months ago
README.md Initial implementation of the agent system core 2 months ago
pyproject.toml Unrestricted terminal mode and SSH tool 2 months ago
ssh_hosts.json.example Unrestricted terminal mode and SSH tool 2 months ago
README.md

navi-1

Модульная агентная система с REST API и WebSocket.

Запуск

python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

cp .env.example .env  # при необходимости настрой

uvicorn navi.main:app --reload

API доступно по адресу http://localhost:8000.
Swagger UI: http://localhost:8000/docs

Быстрый старт (REST)

# 1. Создать сессию с профилем "secretary"
curl -X POST http://localhost:8000/sessions \
  -H "Content-Type: application/json" \
  -d '{"profile_id": "secretary"}'

# 2. Отправить сообщение (замени <session_id>)
curl -X POST http://localhost:8000/sessions/<session_id>/messages \
  -H "Content-Type: application/json" \
  -d '{"content": "Найди последние новости про Python 3.13"}'

WebSocket

ws://localhost:8000/ws/sessions/<session_id>

Клиент отправляет: {"type": "message", "content": "..."}
Сервер стримит: stream_starttool_call*stream_delta*stream_end

Структура

navi/
├── main.py            # FastAPI app
├── config.py          # настройки через .env
├── exceptions.py      # доменные исключения
├── llm/               # LLM бекенды (ollama, openai stub)
├── tools/             # инструменты (web_search, filesystem, http, code, terminal)
├── profiles/          # профили агентов (smart_home, server_admin, secretary)
├── core/              # агент, реестры, сессии
└── api/               # роуты и WebSocket

Профили

ID Описание Инструменты
smart_home Умный дом / Home Assistant http, filesystem, code, terminal
server_admin Администрирование серверов terminal, filesystem, http, web_search
secretary Личный секретарь web_search, http, filesystem, code

Расширение

Новый профиль — создай navi/profiles/my_profile.py, добавь в ALL_PROFILES в __init__.py.

Новый инструмент — реализуй Tool из navi/tools/base.py, зарегистрируй в navi/core/registry.py.

Новый LLM бекенд — реализуй LLMBackend из navi/llm/base.py, зарегистрируй в navi/core/registry.py.