AiTaskV1 ai.task@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
ai
Visibility
public
Status
active
Compatibility
backward
Decision
ADR-001
Schema
https://openvibe.network/contracts/ai/task.v1.json

A named piece of AI work in OpenVibe.AI's catalogue: the service that registered it, its kind (text, code, vision, image or search), one sentence saying what it does, the built-in default choice and the workflow that runs it. Services register their own namespace with POST /api/v1/tasks; the catalogue lists every task at GET /api/v1/tasks.

Fields

FieldTypeRequiredDescriptionConstraints
namestringyes
  • pattern ^[a-z][a-z0-9_-]*\.[a-z0-9_.-]{1,100}$
kindenumyes
  • one of "text", "code", "vision", "image", "search"
sentencestringyes
  • minLength 1
  • maxLength 300
defaultai.choiceyes
servicestring
workflowstring

Examples

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

Valid: basic
{
  "name": "design.icon",
  "kind": "code",
  "sentence": "Draw an SVG icon.",
  "default": {
    "model": "openvibe/cheapest",
    "source": "openvibe"
  }
}
Rejected: basic
{
  "name": "design.icon",
  "kind": "other",
  "sentence": "Draw.",
  "default": {
    "model": "auto",
    "source": "openvibe"
  }
}

Validate

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