AgentTask agent.task@1

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

Version
1.0.0
Owner
network
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/agent/task.v1.json

A2A task with agent, person, thread and text parts limited to 8000 characters.

Fields

FieldTypeRequiredDescriptionConstraints
idstring
  • pattern ^[a-z]{3}_[A-Za-z0-9_-]{8,80}$
tostringyes
  • pattern ^agt_[0-9A-HJKMNP-TV-Z]{26}$
fromstringyes
  • pattern ^agt_[0-9A-HJKMNP-TV-Z]{26}$
on_behalf_ofstringyes
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
threadstringyes
  • pattern ^[a-z]{3}_[A-Za-z0-9_-]{8,80}$
messageobjectyes
  • no other fields
message.roleenum
  • one of "user", "agent"
message.partsarray of objectyes
  • minItems 1
  • maxItems 20
  • items: no other fields
message.parts[].typeconstyes
  • = "text"
message.parts[].textstringyes
  • maxLength 8000
skillIdstring
  • maxLength 64
created_atstring
  • format date-time

Examples

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

Valid: example
{
  "to": "agt_BBBBBBBBBBBBBBBBBBBBBBBBBB",
  "from": "agt_AAAAAAAAAAAAAAAAAAAAAAAAAA",
  "on_behalf_of": "usr_AAAAAAAAAAAAAAAAAAAAAAAAAA",
  "thread": "thr_12345678",
  "message": {
    "role": "user",
    "parts": [
      {
        "type": "text",
        "text": "Hello"
      }
    ]
  }
}
Rejected: example
{}

Validate

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