AgentGoal agent.goal@1

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

Version
1.0.0
Owner
codes
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/agent/goal.v1.json

A task outcome, its verifiable check, and bounded resources. A worker proposes completion; an independent verifier records the verdict.

Fields

FieldTypeRequiredDescriptionConstraints
goalstringyes
  • minLength 1
  • maxLength 4000
checkobjectyes
  • no other fields
check.kindenumyes
  • one of "command", "url", "rubric"
check.valuestringyes
  • minLength 1
  • maxLength 4000
budgetobject
  • no other fields
budget.tokensinteger
  • minimum 1
budget.turnsinteger
  • minimum 1
budget.active_minutesinteger
  • minimum 1
no_progress_limitinteger
  • minimum 1
  • maximum 20
proposalstring
  • maxLength 4000
evidencestring
  • maxLength 262144
verdictobject
  • no other fields
verdict.statusenumyes
  • one of "accepted", "rejected", "failed"
verdict.reasonstringyes
  • minLength 1
  • maxLength 4000
verdict.check_outputstring
  • maxLength 262144

Examples

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

Valid: example
{
  "goal": "The file src/main.js exists and passes node --check.",
  "check": {
    "kind": "command",
    "value": "node --check src/main.js"
  },
  "budget": {
    "tokens": 12000,
    "turns": 12,
    "active_minutes": 30
  },
  "no_progress_limit": 3
}
Rejected: missing-check-kind
{
  "goal": "The file exists.",
  "check": {
    "value": "test -f src/main.js"
  }
}

Validate

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