Zum Hauptinhalt springen

POST /api/zeq/agent/skills/synthesise

When the agent's LLM can't find an operator that fits the next move, it calls skill synthesis to mint a parameterised, JSON-defined function it can call as if it were an operator. The synthesised skill is auto-shared with the agent's parent state machine and reusable across future runs on that chain.

Auth

Authorization: Bearer zeq_ak_…. Public during the homepage wizard flow (no auth needed for step 5) — re-gated for any other caller.

Cost

50 ZEQ atomic for normal callers. The wizard path is foundation- subsidised (cost paid by the foundation pot, 0 to the caller).

Request

curl -X POST https://YOUR-FRAMEWORK/api/zeq/agent/skills/synthesise \
-H "Authorization: Bearer zeq_ak_..." \
-H "Content-Type: application/json" \
-d '{
"problem": "I need to integrate a constrained Hamiltonian over [0, 2π] but no operator combines symplectic stepping with the boundary constraint",
"context": { "kernel_version": "1.287.5", "operator_chain_so_far": ["KO42", "QM5"] }
}'

Response · 200 OK

{
"ok": true,
"skill_id": "skill_2026-05-10T13:08:32Z_...",
"name": "constrained_hamiltonian_integrate",
"signature": "(H: Operator, t_range: [number, number], constraints: Constraint[]) => ZeqState",
"definition": { /* JSON-defined function the agent can invoke */ },
"verification_path": "ZeqProof against analytic solution at 5 known points",
"tally_charge": {
"charged": 50, "burned": 40, "toFoundation": 10, "remainingAfter": 88
}
}

Errors

StatusCodeCause
400problem_requiredEmpty or > 4000 chars.
402INSUFFICIENT_BALANCEWallet < 50 ZEQ (non-wizard callers).
503synthesis_failedLLM produced output that fails the verification path. No charge.