Agent AI tự chủ — DeepSeek R1 — Quản lý tasks, lập lịch và thực thi pipeline phân tích phức tạp
OpenClaw là một AI Agent tự chủ chạy tại máy chủ 192.168.1.248, sử dụng
DeepSeek R1 (model suy luận) để xử lý các tác vụ phức tạp. Agent này có khả năng tạo và
quản lý tasks, lập lịch chạy tự động, thực thi pipeline phân tích, và hỗ trợ các quyết định y tế phức tạp.
Trang web tại pnt.badt.vn giao tiếp với OpenClaw thông qua PHP proxy tại
api/openclaw_proxy.php — trình duyệt không trực tiếp kết nối đến OpenClaw.
api/openclaw_proxy.phpTất cả requests gửi qua POST api/openclaw_proxy.php với tham số action.
| Action | Mô tả | Tham số thêm | Response |
|---|---|---|---|
| status | Kiểm tra trạng thái kết nối OpenClaw | — | {"status":"online"|"offline"} |
| chat | Gửi tin nhắn / giao việc cho OpenClaw | message, session_id (tuỳ chọn) |
{"response":"...","model":"...","session_id":"..."} |
| list_tasks | Lấy danh sách tasks | limit (mặc định 50), status (filter) |
{"tasks":[...]} |
| get_task | Lấy chi tiết một task kèm logs và runs | task_id |
{"task":{...},"logs":[...],"runs":[...]} |
| create_task | Tạo task mới trong OpenClaw | title, description, priority |
{"id":123,"status":"pending"} |
| cancel_task | Huỷ task đang pending/running | task_id |
{"cancelled":true} |
| get_task_logs | Lấy logs của task (hoặc tất cả) | task_id (tuỳ chọn), limit |
{"logs":[...]} |
| get_runs | Lấy danh sách task_runs gần nhất | task_id (tuỳ chọn), limit |
{"runs":[...]} |
| get_stats | Thống kê số lượng task theo trạng thái | — | {"stats":{"total":N,"pending":N,...}} |
| get_skills | Lấy danh sách skills của OpenClaw (nếu có) | — | {"skills":[...]} |
| get_schedules | Lấy lịch chạy định kỳ (nếu có) | — | {"schedules":[...]} |
| clear_history | Xoá lịch sử hội thoại theo session_id | session_id |
{"cleared":true} |
api/openclaw_proxy.php yêu cầu
PHP session hợp lệ ($_SESSION['authenticated'] === true). Đăng nhập tại
login.php trước khi gọi API.
OpenClaw lưu dữ liệu vào MySQL tại 192.168.1.244:3306, database api_ai_main.
id, title / namestatus, prioritydescription, resultcreated_at, updated_atid, task_idlevel (info/warn/error)message / contentcreated_atid, task_idstatus, started_atfinished_at, outputerror / error_message