跳至主要内容

POST /api/zeq/agent/tick/:id

Run one generation of the agent's evolutionary loop. The runtime auto-ticks on spawn and on the per-machine ticker (one tick per Zeqond by default), so manual tick is mostly for debugging or stepping through generations one at a time.

Auth

Authorization: Bearer zeq_ak_…. Owner of the agent's chain only.

Cost

5 ZEQ atomic per tick — the same as one contract transition (and that's exactly what every tick writes).

Request

curl -X POST https://zeqapi.com/api/zeq/agent/tick/5b7a9c12-... \
-H "Authorization: Bearer zeq_ak_..."

Response · 200 OK

{
"ok": true,
"agent_id": "5b7a9c12-...",
"generation": 1,
"best_fitness": 0.0089,
"operators": ["KO42", "GR34", "QM7"],
"result": { /* ZeqState */ },
"transition_id": "tx_...",
"tally_charge": {
"charged": 5,
"burned": 4,
"toFoundation": 1,
"remainingAfter": 138
},
"done": false
}

When done: true, the agent has either:

  • cleared the precision gate (winning genotype in result), or
  • exhausted generations without clearing.

Errors

StatusCodeCause
404agent_not_foundBad UUID or revoked.
409agent_doneAlready finished — call /spawn for a new run.
402INSUFFICIENT_BALANCEWallet < 5 ZEQ.