Schema enhancements: - Add requires_balance_check property for operations with wallet+password - Add requires_currency property for operations with amount/price parameters - Add creates_resource property for operations that create IDs - Add requires_resource property for operations that require IDs Validation script: - Create validate_stage_dependencies.py to check: - Operations with wallet+password have wallet_balance check before them - Operations with amount/price parameters have currency field - Operations requiring resources have corresponding create operations Stage fixes: - Stage 2: Add wallet_balance check at beginning, add currency to wallet_send and staking_stake - Stage 3: Add wallet_balance check at beginning, add market_gpu_register for listing_id dependency - Update RESOURCE_CREATORS to handle multiple resources per operation - Add multi_chain_island_setup as island_id creator for Stage 9
357 lines
13 KiB
JSON
357 lines
13 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "Agent Training Data Schema",
|
|
"description": "Schema for Hermes agent training data on AITBC operations",
|
|
"type": "object",
|
|
"required": ["stage", "agent_type", "training_data", "validation"],
|
|
"properties": {
|
|
"stage": {
|
|
"type": "string",
|
|
"description": "Training stage identifier",
|
|
"enum": [
|
|
"stage1_foundation",
|
|
"stage2_operations_mastery",
|
|
"stage3_ai_operations",
|
|
"stage4_marketplace_economics",
|
|
"stage5_expert_operations",
|
|
"stage6_agent_identity_sdk",
|
|
"stage7_cross_node_training",
|
|
"stage8_advanced_agent_specialization",
|
|
"stage9_multi_chain_architecture"
|
|
]
|
|
},
|
|
"agent_type": {
|
|
"type": "string",
|
|
"description": "Type of agent being trained",
|
|
"enum": ["coordinator", "genesis", "follower", "wallet", "general"]
|
|
},
|
|
"scenarios": {
|
|
"type": "array",
|
|
"description": "Scenarios covered by this training stage",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"depends_on": {
|
|
"type": "array",
|
|
"description": "Stage dependencies - stages that must be completed before this stage. The training system should verify that prerequisite stages have been mastered (passing score met) before allowing a dependent stage to begin.",
|
|
"items": {"type": "string"}
|
|
},
|
|
"resource_depends": {
|
|
"type": "array",
|
|
"description": "Resource dependencies - specific resources or conditions that must exist before this stage can begin. Examples: GPU listings on marketplace, specific wallet balances, registered agents.",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"resource": {"type": "string", "description": "Resource type (e.g., gpu_listing, wallet_balance, agent)"},
|
|
"condition": {"type": "string", "description": "Required condition (e.g., >0, exists, active)"},
|
|
"stage": {"type": "string", "description": "Stage that provides this resource (optional, for cross-stage dependencies)"}
|
|
}
|
|
}
|
|
},
|
|
"difficulty": {
|
|
"type": "string",
|
|
"description": "Difficulty level of this training stage",
|
|
"enum": ["beginner", "intermediate", "advanced", "expert"]
|
|
},
|
|
"estimated_time_minutes": {
|
|
"type": "number",
|
|
"description": "Estimated time to complete this stage in minutes"
|
|
},
|
|
"skills": {
|
|
"type": "array",
|
|
"description": "Skills taught in this stage",
|
|
"items": {"type": "string"}
|
|
},
|
|
"skill_level": {
|
|
"type": "string",
|
|
"description": "Skill level achieved after completing this stage",
|
|
"enum": ["novice", "apprentice", "practitioner", "expert", "master"]
|
|
},
|
|
"objectives": {
|
|
"type": "array",
|
|
"description": "Learning objectives for this stage",
|
|
"items": {"type": "string"}
|
|
},
|
|
"training_data": {
|
|
"type": "object",
|
|
"required": ["operations"],
|
|
"properties": {
|
|
"prerequisites": {
|
|
"type": "object",
|
|
"description": "Environment setup prerequisites for this training stage",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string",
|
|
"description": "Description of required environment setup"
|
|
},
|
|
"setup_method": {
|
|
"type": "string",
|
|
"description": "Path to setup script for this stage"
|
|
},
|
|
"requirements": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "List of required environment conditions"
|
|
}
|
|
}
|
|
},
|
|
"operations": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["operation", "parameters", "expected_result", "success_criteria"],
|
|
"properties": {
|
|
"operation": {
|
|
"type": "string",
|
|
"description": "AITBC operation name"
|
|
},
|
|
"parameters": {
|
|
"type": "object",
|
|
"description": "Operation parameters"
|
|
},
|
|
"expected_result": {
|
|
"type": "object",
|
|
"description": "Expected operation result"
|
|
},
|
|
"success_criteria": {
|
|
"type": "object",
|
|
"description": "Criteria for operation success",
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": ["success", "error"]
|
|
},
|
|
"response_fields": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Required fields in response"
|
|
},
|
|
"performance": {
|
|
"type": "object",
|
|
"properties": {
|
|
"max_duration_ms": {"type": "number"},
|
|
"min_success_rate": {"type": "number"},
|
|
"max_memory_mb": {"type": "number"}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"idempotent": {
|
|
"type": "boolean",
|
|
"description": "Whether operation can be safely retried",
|
|
"default": false
|
|
},
|
|
"check_exists": {
|
|
"type": "string",
|
|
"description": "Operation to check if resource already exists"
|
|
},
|
|
"verify_on_chain": {
|
|
"type": "boolean",
|
|
"description": "Whether to verify transaction on-chain",
|
|
"default": false
|
|
},
|
|
"confirmations_required": {
|
|
"type": "number",
|
|
"description": "Number of block confirmations required"
|
|
},
|
|
"timeout_seconds": {
|
|
"type": "number",
|
|
"description": "Timeout for on-chain verification"
|
|
},
|
|
"retry": {
|
|
"type": "object",
|
|
"properties": {
|
|
"max_attempts": {"type": "number"},
|
|
"backoff_seconds": {"type": "number"},
|
|
"retryable_errors": {
|
|
"type": "array",
|
|
"items": {"type": "string"}
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"command": {"type": "string"},
|
|
"description": {"type": "string"}
|
|
}
|
|
}
|
|
},
|
|
"errors": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {"type": "string"},
|
|
"message": {"type": "string"},
|
|
"resolution": {"type": "string"}
|
|
}
|
|
}
|
|
},
|
|
"verify": {
|
|
"type": "object",
|
|
"properties": {
|
|
"command": {"type": "string"},
|
|
"expected_pattern": {"type": "string"}
|
|
}
|
|
},
|
|
"resources": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {"type": "string"},
|
|
"url": {"type": "string"}
|
|
}
|
|
}
|
|
},
|
|
"requires_balance_check": {
|
|
"type": "boolean",
|
|
"description": "Whether this operation requires a wallet_balance check before execution. Automatically set to true for operations with wallet and password parameters.",
|
|
"default": false
|
|
},
|
|
"requires_currency": {
|
|
"type": "boolean",
|
|
"description": "Whether this operation requires a currency field in parameters. Automatically set to true for operations with amount, price, bounty_amount, or stake_amount parameters.",
|
|
"default": false
|
|
},
|
|
"creates_resource": {
|
|
"type": "string",
|
|
"description": "Type of resource created by this operation (e.g., agent_id, dispute_id, enterprise_id, proposal_id, island_id). Used for dependency validation.",
|
|
"enum": ["agent_id", "dispute_id", "enterprise_id", "proposal_id", "island_id", "workflow_id", "gpu_id", "listing_id", "job_id", "bounty_id", "mm_id", "fl_id", "swarm_id", "validator_id", "bridge_tx_id", "transfer_id", "deployment_id", "pubsub_config_id", "sync_config_id"]
|
|
},
|
|
"requires_resource": {
|
|
"type": "string",
|
|
"description": "Type of resource required by this operation (e.g., agent_id, dispute_id, enterprise_id). Used for dependency validation to ensure create operation exists.",
|
|
"enum": ["agent_id", "dispute_id", "enterprise_id", "proposal_id", "island_id", "workflow_id", "gpu_id", "listing_id", "job_id", "bounty_id", "mm_id", "fl_id", "swarm_id", "validator_id", "bridge_tx_id", "transfer_id", "deployment_id", "pubsub_config_id", "sync_config_id"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"validation": {
|
|
"type": "object",
|
|
"required": ["exam_tests", "passing_score"],
|
|
"properties": {
|
|
"exam_tests": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["test_name", "operation", "test_case", "expected_output"],
|
|
"properties": {
|
|
"test_name": {
|
|
"type": "string",
|
|
"description": "Test name"
|
|
},
|
|
"operation": {
|
|
"type": "string",
|
|
"description": "Operation to test"
|
|
},
|
|
"test_case": {
|
|
"type": "object",
|
|
"description": "Test input parameters"
|
|
},
|
|
"expected_output": {
|
|
"type": "object",
|
|
"description": "Expected test output"
|
|
},
|
|
"weight": {
|
|
"type": "number",
|
|
"description": "Test weight for scoring",
|
|
"default": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"integration_tests": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Integration test name"
|
|
},
|
|
"operations": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Operations to execute in sequence"
|
|
},
|
|
"cleanup": {
|
|
"type": "boolean",
|
|
"description": "Whether to cleanup after test",
|
|
"default": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"coverage_target": {
|
|
"type": "number",
|
|
"description": "Target test coverage percentage",
|
|
"minimum": 0,
|
|
"maximum": 100
|
|
},
|
|
"coverage_report": {
|
|
"type": "boolean",
|
|
"description": "Whether to generate coverage report",
|
|
"default": false
|
|
},
|
|
"passing_score": {
|
|
"type": "number",
|
|
"description": "Minimum score percentage to pass",
|
|
"minimum": 0,
|
|
"maximum": 100,
|
|
"default": 80
|
|
}
|
|
}
|
|
},
|
|
"mock_data": {
|
|
"type": "object",
|
|
"description": "Mock data for testing",
|
|
"properties": {
|
|
"wallets": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Mock wallet names"
|
|
},
|
|
"addresses": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Mock wallet addresses"
|
|
},
|
|
"transactions": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Mock transaction IDs"
|
|
}
|
|
}
|
|
},
|
|
"certifications": {
|
|
"type": "array",
|
|
"description": "Certifications that can be earned by completing this stage",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Certification name"
|
|
},
|
|
"required_stages": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "Stages required for this certification"
|
|
},
|
|
"exam_score": {
|
|
"type": "number",
|
|
"description": "Minimum exam score required"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|