Documentation Index Fetch the complete documentation index at: https://docs.profy.cn/llms.txt
Use this file to discover all available pages before exploring further.
Task Orchestration
The task system manages the full lifecycle of user-submitted work requests — from creation through agent dispatch to paid result delivery. Tasks bridge the gap between user intent and AI agent execution.
Overview
Task Lifecycle
Every task progresses through a defined state machine:
Task States
State Description PENDINGTask created, not yet submitted for processing RUNNINGSubmitted to agent engine, awaiting result COMPLETEDAgent returned a result, available for viewing FAILEDAgent processing encountered an error CANCELLEDTask deleted by user before completion
Payment States
State Description UNPAIDResult available but not yet purchased PAIDUser paid coins to unlock full result REFUNDEDPayment reversed
API Endpoints
Method Endpoint Description POST/api/task/createCreate a new task POST/api/task/submitSubmit task to agent for processing POST/api/task/listList user’s tasks with pagination POST/api/task/resultGet task result (preview or full) POST/api/task/payPay coins to unlock full result POST/api/task/renameRename a task POST/api/task/pinPin/unpin a task POST/api/task/deleteDelete (cancel) a task
All endpoints require JWT authentication.
Agent Dispatch
When a task is submitted, the Core API dispatches it to the configured agent engine.
Configuration
Environment Variable Description AGENT_INVOKE_URLURL of the agent engine’s task intake endpoint
When AGENT_INVOKE_URL is not configured, the system enters test mode — tasks complete immediately with mock data, useful for development and testing.
Agent Callback
The agent engine reports results asynchronously via:
POST /internal/task/callback
This is an internal-only route, accessible only from the private network. The callback payload includes the task identifier, result data, and success/failure status.
Pay-to-View Model
Task results use a two-tier visibility model:
Access Level Content Auth Required Preview resultPreview — summary or truncated resultJWT (task owner) Full resultFull — complete result dataJWT + PAID status
Task Management
Beyond the core lifecycle, users can organize their tasks:
Action Endpoint Description Rename POST /api/task/renameChange task display name Pin POST /api/task/pinPin/unpin for quick access Delete POST /api/task/deleteCancel and remove a pending task List POST /api/task/listPaginated list with filters
File Attachments
Tasks can reference files stored in MinIO. The file service provides:
Method Endpoint Description POST/api/file/uploadUpload file to MinIO GET/api/file/download/:fileUuidDownload a file DELETE/api/file/:fileUuidDelete a file
Related Pages
Finance & Payments Coin consumption powers the pay-to-view model
Agent Platform AutoClaw agents process submitted tasks