Files
JARVIS/backend
DESKTOP-72TV0V4\caoxiaozhu 9e4e94c75e Add log system with three log types (agent/system/chat)
Implemented a complete log system for tracking:
- Agent logs:智能体调用
- System logs: 系统运行
- Chat logs: 问答对话

Backend:
- Log model with type, level, user_id, message, source, duration_ms
- LogService with methods for logging and querying
- API endpoints: GET /api/logs, GET /api/logs/stats, GET /api/logs/recent

Frontend:
- LogView.vue with filters, stats, pagination, auto-refresh
- log.ts API client with TypeScript interfaces
- Added "运行日志" nav item to sidebar
2026-03-21 11:58:51 +08:00
..
2026-03-21 10:13:29 +08:00

Jarvis Backend

快速开始

1. 安装依赖

cd backend
uv sync

2. 配置环境变量

cp .env.example .env
# 编辑 .env 填入 API Key

3. 启动开发服务器

uv run uvicorn app.main:app --reload --port 8000

4. API 文档

启动后访问 http://localhost:8000/docs 查看交互式 API 文档。

环境变量

.env.example

数据库

SQLite 数据库位于 ./data/jarvis.db,首次启动自动创建表。