Overview
BitRobot tracks robot operations through tasks and task runs. A task represents a type of operation your robots perform, while task runs are individual executions of those tasks. Each run follows three steps:- Start — call
task_startwhen a robot begins an operation. BitRobot creates a task run and returns atask_run_id. - End — call
task_endwhen the operation completes. Provide araw_data_uripointing to the run’s output and araw_data_cidfor integrity verification; BitRobot records the run on-chain and verifies the file before validation. - Validate — call
task_validateto award VRW points to the resource owner based on the run’s output.
Task lifecycle flowchart
Task lifecycle flowchart
Event Types
Register Resource
Register a robot or resource before it can perform tasks:resource_id and ent_address (the on-chain PDA of the created ENT). Store the resource_id to use in subsequent task_start events instead of repeating resource_name, resource_subtype, and ENT fields:
Task Start
Start a new task run when a robot begins an operation.task_id is optional — if your subnet has exactly one task, it will be used automatically. If your subnet has multiple tasks, you must specify which one to use.
You can optionally supply your own task_run_id (ULID format) to identify the run. If you don’t provide one, the API will generate one for you — note it from the response so you can use it when ending the run.
event_id
event_id is a required, caller-defined identifier for the event. It must be unique within a given task — submitting a second task_start with the same event_id against the same task_id returns an error. You can use it to associate the task run with a record in your own system, or supply any unique string.
started_at
started_at is an optional ISO 8601 timestamp recording when the robot actually began the operation. Use this when you want to capture the real-world start time, which may differ from when the event was ingested by BitRobot.
The response includes task_id, task_run_id, and the resource_id of the resource the run was attached to (created on the fly if it didn’t already exist). You will need the task_run_id to end the run:
ENT ownership
Each resource has an on-chain ENT (Entity NFT) — a Solana NFT that represents ownership of the robot and entitles its holder to token rewards. When identifying a resource byresource_name/resource_subtype, ent_owner is required and ent_metadata is recommended:
ent_owner— the Solana wallet address that will own the ENT and receive token rewards for this resource. Required when usingresource_name/resource_subtype; can be omitted when usingresource_id(the ENT already exists on-chain).ent_metadata— metadata for the NFT, following the Metaplex token standard. Optional — if omitted, a placeholder URI is used.
register_resource event using the owner and ent_metadata fields, before any task runs occur.
Task End
Complete a task run using thetask_run_id returned from the task_start response. Include a raw_data_uri pointing to the raw output of the run — typically a video, but any file type is supported — and a raw_data_cid: the IPFS CID of the file, computed locally before upload.
Compute the CID using the Kubo CLI:
ended_at to record the real-world time the operation finished:
task_end event is recorded immediately and the run is ended on-chain. BitRobot then asynchronously downloads the file at raw_data_uri, recomputes the CID using ipfs add -n --raw-leaves --chunker=size-1048576 -Q, and verifies the result matches raw_data_cid. If verification passes, the file is stored and the run is eligible for validation. If verification fails, the run is marked as invalid and task_validate will return an error.
Task Validate
After a task run ends, validate it and award VRW (Verifiable Robotic Work) points to the resource. Use thetask_run_id from the task_start response:
vrw_points value determines how many on-chain VRW points are awarded to the resource owner for this run. These points are used for proportional token reward distribution at the end of each epoch.
By default, validating a run also grants the resource owner Subnet Points equal to
vrw_points (in addition to the on-chain VRW). A subnet can turn this off with the auto_grant_subnet_points_from_vrw setting — when it’s off, validation records VRW on-chain but grants no Subnet Points, leaving distribution to the subnet. See Automatic grants from VRW.Batch Upload
If you have historical task run data or want to import runs in bulk, you can upload a CSV file instead of sending individual events. Each row is processed through the same start → end → validate flow as individual events.Upload a CSV
queued is the number of rows accepted for processing. failed is the number of rows that were rejected due to validation errors — these are recorded in the batch and visible when you poll for status.
CSV format
Each row represents one complete task run. Required columns:
* Provide either
resource_id alone, or resource_name + resource_subtype + resource_type + ent_owner together.
Example CSV:
Poll batch status
Use the batch ID to check progress:status is processing while any rows are still pending or in progress, and completed once all rows have finished (whether successfully or not). Each row has one of four statuses:
The
steps object breaks the row down into the five stages of the start → end → validate pipeline (create_task_run, start_run, complete_task_run, end_run, validate_run). Each step carries its own status (same enum as the row) and error_message. Use this to see which stage failed when a row’s top-level status is failed.
Both endpoints accept either a subnet API key (recommended for server-to-server use) or a subnet-admin JWT from the BitRobot dashboard.
Task Management
Subnet admins can view task runs through the Task Management page in the BitRobot dashboard:- Task Runs History: See all task runs with status, type, and timestamps
- Summary Stats: View total runs, unique tasks, and unique resources
- Filtering and Sorting: Sort by date to find specific task runs
API Reference
View the full events API reference