ActorTaskCreateRequest actor.task-create-request@1

Generated at from openvibe-contracts v0.127.0 and openvibe-sdk v0.37.0.

Version
1.0.0
Owner
actor
Visibility
public
Status
active
Compatibility
backward
Decision
ADR-044
Schema
https://openvibe.network/contracts/actor/task-create-request.v1.json

actor.task-create-request@1: the body of POST /api/v1/tasks on OpenVibe.Actor (capability actor.task.create), the creation subset of platform.task@1. TASK is the instruction in plain words. MODE is the planner objective (default balanced). BUDGET caps what this task may cost (per_task_usd) and what the caller's tasks may cost in one UTC day (per_day_usd); either may be left out for the person's free-allowance defaults, and a value above the person's tier is refused 422 actor.budget.over_tier, never silently lowered. AGENT pins one agent system by its id from GET /api/v1/agents (routing still checks that it can take the task). IDEMPOTENCY_KEY: a repeat from the same requester within 24 h with an identical body answers the first task (200), with a different body 409 actor.idempotency.conflict.

Fields

FieldTypeRequiredDescriptionConstraints
taskstringyesThe instruction in plain words.
  • pattern \S
  • minLength 1
  • maxLength 20000
modeenum
  • one of "cheapest", "balanced", "best", "fastest", "private"
  • default "balanced"
budgetobject
  • no other fields
budget.per_task_usdnumber
  • minimum 0
  • maximum 100
budget.per_day_usdnumber
  • minimum 0
  • maximum 1000
agentstringAn agent system id from GET /api/v1/agents.
  • pattern ^[a-z][a-z0-9-]{1,63}$
idempotency_keystring
  • pattern ^[A-Za-z0-9._:-]+$
  • minLength 8
  • maxLength 128

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: full
{
  "task": "Research five competitors of my shop and write a one-page brief with sources.",
  "mode": "best",
  "budget": {
    "per_task_usd": 0.5,
    "per_day_usd": 2
  },
  "agent": "openai-agent",
  "idempotency_key": "brief-2026-10-08"
}
Valid: minimal
{
  "task": "What is the TTL of openvibe.network's MX record?"
}
Rejected: blank-task
{
  "task": "   "
}
Rejected: negative-budget
{
  "task": "x",
  "budget": {
    "per_task_usd": -1
  }
}
Rejected: unknown-mode
{
  "task": "x",
  "mode": "smartest"
}
Rejected: webhooks-not-here
{
  "task": "x",
  "webhooks": []
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('actor.task-create-request@1', value);   // { valid, errors: [{ path, message }] }