Rename openclaw to hermes across documentation and workflows
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Documentation Validation / validate-docs (push) Has been cancelled
Documentation Validation / validate-policies-strict (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
CLI Tests / test-cli (push) Has been cancelled
Blockchain Synchronization Verification / sync-verification (push) Successful in 11s
Contract Performance Benchmarks / benchmark-gas-usage (push) Successful in 1m36s
Contract Performance Benchmarks / benchmark-execution-time (push) Successful in 1m24s
Contract Performance Benchmarks / benchmark-throughput (push) Successful in 1m25s
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Successful in 2s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 5s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Successful in 3s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
Multi-Chain Island Architecture Tests / test-multi-chain-island (push) Successful in 2s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 3s
P2P Network Verification / p2p-verification (push) Successful in 2s
Smart Contract Tests / test-solidity (map[name:aitbc-contracts path:contracts]) (push) Failing after 1m28s
Smart Contract Tests / test-solidity (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Successful in 21s
Smart Contract Tests / test-foundry (push) Failing after 20s
Smart Contract Tests / lint-solidity (push) Successful in 30s
Smart Contract Tests / deploy-contracts (push) Successful in 1m40s
Systemd Sync / sync-systemd (push) Successful in 26s
Contract Performance Benchmarks / compare-benchmarks (push) Successful in 4s

- Update workflow paths from docs/openclaw to docs/hermes
- Rename skill prefixes from openclaw-* to hermes-*
- Update agent skill references in refactoring and analysis docs
- Rename OPENCLAW_AITBC_MASTERY_PLAN.md to reflect hermes branding
- Update CLI examples and command references throughout documentation
This commit is contained in:
aitbc
2026-05-07 11:42:06 +02:00
parent 151aae1916
commit 852f2e5a8a
307 changed files with 3333 additions and 2837 deletions

View File

@@ -88,7 +88,7 @@ The scripts look for systemd services matching the pattern `aitbc-*`.
| 8011 | Learning Service | Machine learning |
| 8012 | Agent Coordinator | Agent orchestration |
| 8013 | Agent Registry | Agent registration |
| 8014 | OpenClaw Service | Edge computing |
| 8014 | hermes Service | Edge computing |
| 8015 | AI Service | Advanced AI capabilities |
| 8020 | Multimodal Service | Multi-modal processing |
| 8021 | Modality Optimization | Modality optimization |
@@ -109,7 +109,7 @@ The scripts test these health endpoints:
- `http://localhost:8011/health` - Learning Service
- `http://localhost:8012/health` - Agent Coordinator
- `http://localhost:8013/health` - Agent Registry
- `http://localhost:8014/health` - OpenClaw Service
- `http://localhost:8014/health` - hermes Service
- `http://localhost:8015/health` - AI Service
- `http://localhost:8020/health` - Multimodal Service
- `http://localhost:8021/health` - Modality Optimization
@@ -145,7 +145,7 @@ The scripts test these health endpoints:
[SUCCESS] Learning Service (port 8011): RUNNING
[SUCCESS] Agent Coordinator (port 8012): RUNNING
[SUCCESS] Agent Registry (port 8013): RUNNING
[SUCCESS] OpenClaw Service (port 8014): RUNNING
[SUCCESS] hermes Service (port 8014): RUNNING
[SUCCESS] AI Service (port 8015): RUNNING
[SUCCESS] Multimodal Service (port 8020): RUNNING
[SUCCESS] Modality Optimization (port 8021): RUNNING

View File

@@ -46,7 +46,7 @@ System maintenance and cleanup
### 📁 deployment/
Deployment and provisioning
- `build-release.sh` - Release building automation
- `deploy_openclaw_dao.py` - OpenClaw DAO deployment
- `deploy_hermes_dao.py` - hermes DAO deployment
- `provision_node.sh` - Node provisioning
- `complete-agent-protocols.sh` - Complete agent protocols deployment
- `deploy.sh` - General deployment script

View File

@@ -20,7 +20,7 @@ PYTHON_CMD="$VENV_DIR/bin/python"
echo -e "${BLUE}🚀 AITBC REAL PRODUCTION SYSTEM${NC}"
echo "=========================="
echo "Implementing real blockchain mining, multi-chain, OpenClaw AI, real marketplace"
echo "Implementing real blockchain mining, multi-chain, hermes AI, real marketplace"
echo ""
# Step 1: Real Blockchain Mining Implementation
@@ -355,14 +355,14 @@ EOF
chmod +x /opt/aitbc/production/services/mining_blockchain.py
echo "✅ Real mining blockchain created"
# Step 2: OpenClaw AI Integration
echo -e "${CYAN}🤖 Step 2: OpenClaw AI Integration${NC}"
# Step 2: hermes AI Integration
echo -e "${CYAN}🤖 Step 2: hermes AI Integration${NC}"
echo "=================================="
cat > /opt/aitbc/production/services/openclaw_ai.py << 'EOF'
cat > /opt/aitbc/production/services/hermes_ai.py << 'EOF'
#!/usr/bin/env python3
"""
OpenClaw AI Service Integration
hermes AI Service Integration
Real AI agent system with marketplace integration
"""
@@ -381,21 +381,21 @@ logging.basicConfig(
level=logging.INFO,
format='%(asctime)s [%(levelname)s] %(name)s: %(message)s',
handlers=[
logging.FileHandler('/opt/aitbc/production/logs/openclaw/openclaw.log'),
logging.FileHandler('/opt/aitbc/production/logs/hermes/hermes.log'),
logging.StreamHandler()
]
)
logger = logging.getLogger(__name__)
class OpenClawAIService:
"""Real OpenClaw AI service"""
class hermesAIService:
"""Real hermes AI service"""
def __init__(self):
self.node_id = os.getenv('NODE_ID', 'aitbc')
self.data_dir = Path(f'/opt/aitbc/production/data/openclaw/{self.node_id}')
self.data_dir = Path(f'/opt/aitbc/production/data/hermes/{self.node_id}')
self.data_dir.mkdir(parents=True, exist_ok=True)
# Initialize OpenClaw agents
# Initialize hermes agents
self.agents = {}
self.tasks = {}
self.results = {}
@@ -403,30 +403,30 @@ class OpenClawAIService:
self._initialize_agents()
self._load_data()
logger.info(f"OpenClaw AI service initialized for node: {self.node_id}")
logger.info(f"hermes AI service initialized for node: {self.node_id}")
def _initialize_agents(self):
"""Initialize OpenClaw AI agents"""
"""Initialize hermes AI agents"""
agents_config = [
{
'id': 'openclaw-text-gen',
'name': 'OpenClaw Text Generator',
'id': 'hermes-text-gen',
'name': 'hermes Text Generator',
'capabilities': ['text_generation', 'creative_writing', 'content_creation'],
'model': 'llama2-7b',
'price_per_task': 5.0,
'status': 'active'
},
{
'id': 'openclaw-research',
'name': 'OpenClaw Research Agent',
'id': 'hermes-research',
'name': 'hermes Research Agent',
'capabilities': ['research', 'analysis', 'data_processing'],
'model': 'llama2-13b',
'price_per_task': 10.0,
'status': 'active'
},
{
'id': 'openclaw-trading',
'name': 'OpenClaw Trading Bot',
'id': 'hermes-trading',
'name': 'hermes Trading Bot',
'capabilities': ['trading', 'market_analysis', 'prediction'],
'model': 'custom-trading',
'price_per_task': 15.0,
@@ -482,13 +482,13 @@ class OpenClawAIService:
with open(self.data_dir / 'results.json', 'w') as f:
json.dump(self.results, f, indent=2)
logger.debug("OpenClaw data saved")
logger.debug("hermes data saved")
except Exception as e:
logger.error(f"Failed to save data: {e}")
def execute_task(self, agent_id: str, task_data: dict) -> dict:
"""Execute a task with OpenClaw agent"""
"""Execute a task with hermes agent"""
if agent_id not in self.agents:
raise Exception(f"Agent {agent_id} not found")
@@ -510,9 +510,9 @@ class OpenClawAIService:
self.tasks[task_id] = task
# Execute task with OpenClaw
# Execute task with hermes
try:
result = self._execute_openclaw_task(agent, task)
result = self._execute_hermes_task(agent, task)
# Update task and agent
task['status'] = 'completed'
@@ -552,12 +552,12 @@ class OpenClawAIService:
'error': str(e)
}
def _execute_openclaw_task(self, agent: dict, task: dict) -> dict:
"""Execute task with OpenClaw"""
def _execute_hermes_task(self, agent: dict, task: dict) -> dict:
"""Execute task with hermes"""
task_type = task['task_type']
prompt = task['prompt']
# Simulate OpenClaw execution
# Simulate hermes execution
if task_type == 'text_generation':
return self._generate_text(agent, prompt)
elif task_type == 'research':
@@ -568,16 +568,16 @@ class OpenClawAIService:
raise Exception(f"Unsupported task type: {task_type}")
def _generate_text(self, agent: dict, prompt: str) -> dict:
"""Generate text with OpenClaw"""
"""Generate text with hermes"""
# Simulate text generation
time.sleep(2) # Simulate processing time
result = f"""
OpenClaw {agent['name']} Generated Text:
hermes {agent['name']} Generated Text:
{prompt}
This is a high-quality text generation response from OpenClaw AI agent {agent['name']}.
This is a high-quality text generation response from hermes AI agent {agent['name']}.
The agent uses the {agent['model']} model to generate creative and coherent text based on the provided prompt.
Generated at: {datetime.utcnow().isoformat()}
@@ -593,12 +593,12 @@ Node: {self.node_id}
}
def _perform_research(self, agent: dict, query: str) -> dict:
"""Perform research with OpenClaw"""
"""Perform research with hermes"""
# Simulate research
time.sleep(3) # Simulate processing time
result = f"""
OpenClaw {agent['name']} Research Results:
hermes {agent['name']} Research Results:
Query: {query}
@@ -623,12 +623,12 @@ Node: {self.node_id}
}
def _analyze_trading(self, agent: dict, market_data: str) -> dict:
"""Analyze trading with OpenClaw"""
"""Analyze trading with hermes"""
# Simulate trading analysis
time.sleep(4) # Simulate processing time
result = f"""
OpenClaw {agent['name']} Trading Analysis:
hermes {agent['name']} Trading Analysis:
Market Data: {market_data}
@@ -665,7 +665,7 @@ Node: {self.node_id}
}
def get_marketplace_listings(self) -> dict:
"""Get marketplace listings for OpenClaw agents"""
"""Get marketplace listings for hermes agents"""
listings = []
for agent in self.agents.values():
@@ -688,19 +688,19 @@ Node: {self.node_id}
}
if __name__ == '__main__':
# Initialize OpenClaw service
service = OpenClawAIService()
# Initialize hermes service
service = hermesAIService()
# Execute sample tasks
sample_tasks = [
{
'agent_id': 'openclaw-text-gen',
'agent_id': 'hermes-text-gen',
'type': 'text_generation',
'prompt': 'Explain the benefits of decentralized AI networks',
'parameters': {'max_length': 500}
},
{
'agent_id': 'openclaw-research',
'agent_id': 'hermes-research',
'type': 'research',
'prompt': 'Analyze the current state of blockchain technology',
'parameters': {'depth': 'comprehensive'}
@@ -716,20 +716,20 @@ if __name__ == '__main__':
# Print service info
info = service.get_agents_info()
print(f"OpenClaw service info: {json.dumps(info, indent=2)}")
print(f"hermes service info: {json.dumps(info, indent=2)}")
EOF
chmod +x /opt/aitbc/production/services/openclaw_ai.py
echo "✅ OpenClaw AI integration created"
chmod +x /opt/aitbc/production/services/hermes_ai.py
echo "✅ hermes AI integration created"
# Step 3: Real Marketplace with OpenClaw & Ollama
# Step 3: Real Marketplace with hermes & Ollama
echo -e "${CYAN}🏪 Step 3: Real Marketplace with AI${NC}"
echo "=================================="
cat > /opt/aitbc/production/services/real_marketplace.py << 'EOF'
#!/usr/bin/env python3
"""
Real Marketplace with OpenClaw AI and Ollama Tasks
Real Marketplace with hermes AI and Ollama Tasks
"""
import os
@@ -744,9 +744,9 @@ from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
import uvicorn
# Import OpenClaw service
# Import hermes service
sys.path.insert(0, '/opt/aitbc/production/services')
from openclaw_ai import OpenClawAIService
from hermes_ai import hermesAIService
# Production logging
logging.basicConfig(
@@ -768,7 +768,7 @@ class RealMarketplace:
self.data_dir.mkdir(parents=True, exist_ok=True)
# Initialize services
self.openclaw_service = OpenClawAIService()
self.hermes_service = hermesAIService()
# Marketplace data
self.ai_services = {}
@@ -815,19 +815,19 @@ class RealMarketplace:
logger.error(f"Failed to save marketplace data: {e}")
def _initialize_ai_services(self):
"""Initialize AI services from OpenClaw"""
openclaw_agents = self.openclaw_service.get_agents_info()
"""Initialize AI services from hermes"""
hermes_agents = self.hermes_service.get_agents_info()
for agent in openclaw_agents['agents']:
for agent in hermes_agents['agents']:
service_id = f"ai_{agent['id']}"
self.ai_services[service_id] = {
'id': service_id,
'name': agent['name'],
'type': 'openclaw_ai',
'type': 'hermes_ai',
'capabilities': agent['capabilities'],
'model': agent['model'],
'price_per_task': agent['price_per_task'],
'provider': 'OpenClaw AI',
'provider': 'hermes AI',
'node_id': self.node_id,
'rating': agent['rating'],
'tasks_completed': agent['tasks_completed'],
@@ -889,10 +889,10 @@ class RealMarketplace:
service = self.ai_services[service_id]
if service['type'] == 'openclaw_ai':
# Execute with OpenClaw
if service['type'] == 'hermes_ai':
# Execute with hermes
agent_id = service_id.replace('ai_', '')
result = self.openclaw_service.execute_task(agent_id, task_data)
result = self.hermes_service.execute_task(agent_id, task_data)
# Update service stats
service['tasks_completed'] += 1
@@ -975,7 +975,7 @@ marketplace = RealMarketplace()
app = FastAPI(
title="AITBC Real Marketplace",
version="1.0.0",
description="Real marketplace with OpenClaw AI and Ollama tasks"
description="Real marketplace with hermes AI and Ollama tasks"
)
@app.get("/health")
@@ -1035,14 +1035,14 @@ echo " • Multi-chain support (main + GPU chains)"
echo " • Real coin generation and rewards"
echo " • Cross-chain trading capabilities"
echo ""
echo "✅ OpenClaw AI Integration:"
echo "✅ hermes AI Integration:"
echo " • Real AI agents (text generation, research, trading)"
echo " • Llama2 models (7B, 13B)"
echo " • Task execution and results"
echo " • Marketplace integration"
echo ""
echo "✅ Real Marketplace:"
echo " • OpenClaw AI services"
echo " • hermes AI services"
echo " • Ollama inference tasks"
echo " • Real commercial activity"
echo " • Payment processing"

View File

@@ -76,13 +76,13 @@ EOF
echo "✅ Real mining service created"
# Step 2: OpenClaw AI Service
echo -e "${CYAN}🤖 Step 2: OpenClaw AI Service${NC}"
# Step 2: hermes AI Service
echo -e "${CYAN}🤖 Step 2: hermes AI Service${NC}"
echo "=============================="
cat > /opt/aitbc/systemd/aitbc-openclaw-ai.service << 'EOF'
cat > /opt/aitbc/systemd/aitbc-hermes-ai.service << 'EOF'
[Unit]
Description=AITBC OpenClaw AI Service
Description=AITBC hermes AI Service
After=network.target aitbc-mining-blockchain.service
[Service]
@@ -95,8 +95,8 @@ Environment=NODE_ID=aitbc
Environment=PYTHONPATH=/opt/aitbc/production/services
EnvironmentFile=/opt/aitbc/production/.env
# OpenClaw AI execution
ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/production/services/openclaw_ai.py
# hermes AI execution
ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/production/services/hermes_ai.py
ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed
TimeoutStopSec=10
@@ -110,13 +110,13 @@ StartLimitIntervalSec=60
# AI logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=aitbc-openclaw-ai
SyslogIdentifier=aitbc-hermes-ai
# AI security
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/opt/aitbc/production/data/openclaw /opt/aitbc/production/logs/openclaw
ReadWritePaths=/opt/aitbc/production/data/hermes /opt/aitbc/production/logs/hermes
# AI performance
LimitNOFILE=65536
@@ -128,7 +128,7 @@ CPUQuota=60%
WantedBy=multi-user.target
EOF
echo "✅ OpenClaw AI service created"
echo "✅ hermes AI service created"
# Step 3: Real Marketplace Service
echo -e "${CYAN}🏪 Step 3: Real Marketplace Service${NC}"
@@ -137,7 +137,7 @@ echo "=============================="
cat > /opt/aitbc/systemd/aitbc-real-marketplace.service << 'EOF'
[Unit]
Description=AITBC Real Marketplace with AI Services
After=network.target aitbc-mining-blockchain.service aitbc-openclaw-ai.service
After=network.target aitbc-mining-blockchain.service aitbc-hermes-ai.service
[Service]
Type=simple
@@ -191,7 +191,7 @@ echo "============================"
# Copy services to systemd
cp /opt/aitbc/systemd/aitbc-mining-blockchain.service /etc/systemd/system/
cp /opt/aitbc/systemd/aitbc-openclaw-ai.service /etc/systemd/system/
cp /opt/aitbc/systemd/aitbc-hermes-ai.service /etc/systemd/system/
cp /opt/aitbc/systemd/aitbc-real-marketplace.service /etc/systemd/system/
# Reload systemd
@@ -199,14 +199,14 @@ systemctl daemon-reload
# Enable services
systemctl enable aitbc-mining-blockchain.service
systemctl enable aitbc-openclaw-ai.service
systemctl enable aitbc-hermes-ai.service
systemctl enable aitbc-real-marketplace.service
# Start services
echo "Starting real production services..."
systemctl start aitbc-mining-blockchain.service
sleep 3
systemctl start aitbc-openclaw-ai.service
systemctl start aitbc-hermes-ai.service
sleep 3
systemctl start aitbc-real-marketplace.service
@@ -214,7 +214,7 @@ systemctl start aitbc-real-marketplace.service
echo "Checking service status..."
systemctl status aitbc-mining-blockchain.service --no-pager -l | head -8
echo ""
systemctl status aitbc-openclaw-ai.service --no-pager -l | head -8
systemctl status aitbc-hermes-ai.service --no-pager -l | head -8
echo ""
systemctl status aitbc-real-marketplace.service --no-pager -l | head -8
@@ -240,15 +240,15 @@ else
tail -10 /tmp/mining_test.log
fi
# Test OpenClaw AI
echo "Testing OpenClaw AI..."
python production/services/openclaw_ai.py > /tmp/openclaw_test.log 2>&1
# Test hermes AI
echo "Testing hermes AI..."
python production/services/hermes_ai.py > /tmp/hermes_test.log 2>&1
if [ $? -eq 0 ]; then
echo "✅ OpenClaw AI test passed"
head -10 /tmp/openclaw_test.log
echo "✅ hermes AI test passed"
head -10 /tmp/hermes_test.log
else
echo "❌ OpenClaw AI test failed"
tail -10 /tmp/openclaw_test.log
echo "❌ hermes AI test failed"
tail -10 /tmp/hermes_test.log
fi
# Test real marketplace
@@ -264,13 +264,13 @@ echo "=========================="
echo "Copying real production system to aitbc1..."
scp -r /opt/aitbc/production/services aitbc1:/opt/aitbc/production/
scp /opt/aitbc/systemd/aitbc-mining-blockchain.service aitbc1:/opt/aitbc/systemd/
scp /opt/aitbc/systemd/aitbc-openclaw-ai.service aitbc1:/opt/aitbc/systemd/
scp /opt/aitbc/systemd/aitbc-hermes-ai.service aitbc1:/opt/aitbc/systemd/
scp /opt/aitbc/systemd/aitbc-real-marketplace.service aitbc1:/opt/aitbc/systemd/
# Configure services for aitbc1
echo "Configuring services for aitbc1..."
ssh aitbc1 "sed -i 's/NODE_ID=aitbc/NODE_ID=aitbc1/g' /opt/aitbc/systemd/aitbc-mining-blockchain.service"
ssh aitbc1 "sed -i 's/NODE_ID=aitbc/NODE_ID=aitbc1/g' /opt/aitbc/systemd/aitbc-openclaw-ai.service"
ssh aitbc1 "sed -i 's/NODE_ID=aitbc/NODE_ID=aitbc1/g' /opt/aitbc/systemd/aitbc-hermes-ai.service"
ssh aitbc1 "sed -i 's/NODE_ID=aitbc/NODE_ID=aitbc1/g' /opt/aitbc/systemd/aitbc-real-marketplace.service"
# Update ports for aitbc1
@@ -280,17 +280,17 @@ ssh aitbc1 "sed -i 's/REAL_MARKETPLACE_PORT=8006/REAL_MARKETPLACE_PORT=8007/g' /
echo "Starting services on aitbc1..."
ssh aitbc1 "cp /opt/aitbc/systemd/aitbc-*.service /etc/systemd/system/"
ssh aitbc1 "systemctl daemon-reload"
ssh aitbc1 "systemctl enable aitbc-mining-blockchain.service aitbc-openclaw-ai.service aitbc-real-marketplace.service"
ssh aitbc1 "systemctl enable aitbc-mining-blockchain.service aitbc-hermes-ai.service aitbc-real-marketplace.service"
ssh aitbc1 "systemctl start aitbc-mining-blockchain.service"
sleep 3
ssh aitbc1 "systemctl start aitbc-openclaw-ai.service"
ssh aitbc1 "systemctl start aitbc-hermes-ai.service"
sleep 3
ssh aitbc1 "systemctl start aitbc-real-marketplace.service"
# Check aitbc1 services
echo "Checking aitbc1 services..."
ssh aitbc1 "systemctl status aitbc-mining-blockchain.service --no-pager -l | head -5"
ssh aitbc1 "systemctl status aitbc-openclaw-ai.service --no-pager -l | head -5"
ssh aitbc1 "systemctl status aitbc-hermes-ai.service --no-pager -l | head -5"
ssh aitbc1 "curl -s http://localhost:8007/health | head -5" || echo "aitbc1 marketplace not ready"
# Step 7: Demonstrate real functionality
@@ -339,14 +339,14 @@ echo " • Multi-chain support (main + GPU chains)"
echo " • Real coin generation: 50 AITBC (main), 25 AITBC (GPU)"
echo " • Cross-chain trading capabilities"
echo ""
echo "✅ OpenClaw AI Integration:"
echo "✅ hermes AI Integration:"
echo " • Real AI agents: text generation, research, trading"
echo " • Llama2 models: 7B, 13B parameters"
echo " • Task execution with real results"
echo " • Marketplace integration with payments"
echo ""
echo "✅ Real Commercial Marketplace:"
echo " • OpenClaw AI services (5-15 AITBC per task)"
echo " • hermes AI services (5-15 AITBC per task)"
echo " • Ollama inference tasks (3-5 AITBC per task)"
echo " • Real commercial activity and transactions"
echo " • Payment processing via blockchain"
@@ -368,14 +368,14 @@ echo " • aitbc1: http://aitbc1:8007/health"
echo ""
echo "✅ Monitoring:"
echo " • Mining logs: journalctl -u aitbc-mining-blockchain"
echo " • AI logs: journalctl -u aitbc-openclaw-ai"
echo " • AI logs: journalctl -u aitbc-hermes-ai"
echo " • Marketplace logs: journalctl -u aitbc-real-marketplace"
echo ""
echo -e "${BLUE}🚀 REAL PRODUCTION SYSTEM IS LIVE!${NC}"
echo ""
echo "🎉 AITBC is now a REAL production system with:"
echo " • Real blockchain mining and coin generation"
echo " • Real OpenClaw AI agents and services"
echo " • Real hermes AI agents and services"
echo " • Real commercial marketplace with transactions"
echo " • Multi-chain support and cross-chain trading"
echo " • Multi-node deployment and coordination"

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python3
"""
OpenClaw DAO Deployment Script
Deploys and configures the complete OpenClaw DAO governance system
hermes DAO Deployment Script
Deploys and configures the complete hermes DAO governance system
"""
import asyncio
@@ -10,7 +10,7 @@ import time
from web3 import Web3
from web3.contract import Contract
class OpenClawDAODeployment:
class hermesDAODeployment:
def __init__(self, web3_provider: str, private_key: str):
self.w3 = Web3(Web3.HTTPProvider(web3_provider))
self.account = self.w3.eth.account.from_key(private_key)
@@ -24,15 +24,15 @@ class OpenClawDAODeployment:
self.governance_token = None
async def deploy_all(self, governance_token_address: str) -> dict:
"""Deploy complete OpenClaw DAO system"""
print("🚀 Deploying OpenClaw DAO Governance System...")
"""Deploy complete hermes DAO system"""
print("🚀 Deploying hermes DAO Governance System...")
# 1. Deploy TimelockController
print("1⃣ Deploying TimelockController...")
self.timelock = await self.deploy_timelock()
# 2. Deploy OpenClawDAO
print("2⃣ Deploying OpenClawDAO...")
# 2. Deploy hermesDAO
print("2⃣ Deploying hermesDAO...")
self.dao_contract = await self.deploy_dao(governance_token_address)
# 3. Deploy AgentWallet template
@@ -70,7 +70,7 @@ class OpenClawDAODeployment:
"network": self.w3.eth.chain_id
}
print("OpenClaw DAO deployment complete!")
print("hermes DAO deployment complete!")
return deployment_info
async def deploy_timelock(self) -> Contract:
@@ -98,7 +98,7 @@ class OpenClawDAODeployment:
return self.w3.eth.contract(address=receipt.contractAddress, abi=timelock_abi)
async def deploy_dao(self, governance_token_address: str) -> Contract:
"""Deploy OpenClawDAO contract"""
"""Deploy hermesDAO contract"""
# DAO bytecode and ABI (from compiled contract)
dao_bytecode = "0x..." # Actual bytecode needed
dao_abi = [] # Actual ABI needed
@@ -272,14 +272,14 @@ async def main():
GOVERNANCE_TOKEN = "0x..." # Existing AITBC token address
# Deploy system
deployer = OpenClawDAODeployment(WEB3_PROVIDER, PRIVATE_KEY)
deployer = hermesDAODeployment(WEB3_PROVIDER, PRIVATE_KEY)
deployment_info = await deployer.deploy_all(GOVERNANCE_TOKEN)
# Save deployment info
with open("openclaw_dao_deployment.json", "w") as f:
with open("hermes_dao_deployment.json", "w") as f:
json.dump(deployment_info, f, indent=2)
print(f"🎉 Deployment complete! Check openclaw_dao_deployment.json for details")
print(f"🎉 Deployment complete! Check hermes_dao_deployment.json for details")
if __name__ == "__main__":
asyncio.run(main())

View File

@@ -55,7 +55,7 @@ check_service "GPU Service" "http://localhost:8010/health"
check_service "Learning Service" "http://localhost:8011/health"
check_service "Agent Coordinator" "http://localhost:8012/health"
check_service "Agent Registry" "http://localhost:8013/health"
check_service "OpenClaw Service" "http://localhost:8014/health"
check_service "Hermes Service" "http://localhost:8014/health"
check_service "AI Service" "http://localhost:8015/health"
# Other Services (8020-8029)

View File

@@ -1,12 +1,12 @@
#!/bin/bash
# AITBC + OpenClaw Hybrid Script System
# Clean separation: Shell (execution) + OpenClaw (reasoning)
# AITBC + Hermes Hybrid Script System
# Clean separation: Shell (execution) + Hermes (reasoning)
set -e
# Configuration
AITBC_CLI="/opt/aitbc/aitbc-cli"
OPENCLAW_CMD="openclaw agent --agent main"
HERMES_CMD="hermes agent --agent main"
LOG_DIR="/var/log/aitbc/hybrid"
mkdir -p "$LOG_DIR"
@@ -47,21 +47,21 @@ execute_aitbc() {
fi
}
# Analyze output with OpenClaw
analyze_with_openclaw() {
# Analyze output with Hermes
analyze_with_hermes() {
local data="$@"
log "INFO" "Analyzing with OpenClaw..."
log "INFO" "Analyzing with Hermes..."
local analysis
analysis=$(echo "$data" | $OPENCLAW_CMD --message "Analyze this AITBC output and provide insights: $data" 2>&1)
analysis=$(echo "$data" | $HERMES_CMD --message "Analyze this AITBC output and provide insights: $data" 2>&1)
local exit_code=$?
if [ $exit_code -eq 0 ]; then
log "SUCCESS" "OpenClaw analysis completed"
log "SUCCESS" "Hermes analysis completed"
echo "$analysis"
return 0
else
log "WARN" "OpenClaw analysis failed (non-critical)"
log "WARN" "Hermes analysis failed (non-critical)"
echo "$analysis" >&2
return 1
fi
@@ -70,7 +70,7 @@ analyze_with_openclaw() {
# Hybrid execution with optional analysis
hybrid_execute() {
local cmd="$@"
local use_openclaw="${USE_OPENCLAW:-false}"
local use_hermes="${USE_HERMES:-false}"
# Execute AITBC command
local aitbc_output
@@ -81,10 +81,10 @@ hybrid_execute() {
return $aitbc_exit
fi
# Optionally analyze with OpenClaw
if [ "$use_openclaw" = "true" ]; then
echo -e "${BLUE}=== OpenClaw Analysis ===${NC}"
analyze_with_openclaw "$aitbc_output"
# Optionally analyze with Hermes
if [ "$use_hermes" = "true" ]; then
echo -e "${BLUE}=== Hermes Analysis ===${NC}"
analyze_with_hermes "$aitbc_output"
fi
return 0
@@ -101,13 +101,13 @@ main() {
execute_aitbc "$@"
;;
analyze)
# Analyze existing data with OpenClaw
# Analyze existing data with Hermes
local data="$@"
analyze_with_openclaw "$data"
analyze_with_hermes "$data"
;;
hybrid)
# Execute AITBC and analyze with OpenClaw
USE_OPENCLAW=true hybrid_execute "$@"
# Execute AITBC and analyze with Hermes
USE_HERMES=true hybrid_execute "$@"
;;
*)
# Default: execute AITBC only

View File

@@ -384,7 +384,7 @@ install_services() {
"aitbc-blockchain-node.service"
"aitbc-blockchain-rpc.service"
"aitbc-marketplace.service"
"aitbc-openclaw.service"
"aitbc-hermes.service"
"aitbc-ai.service"
"aitbc-learning.service"
"aitbc-explorer.service"
@@ -473,7 +473,7 @@ check_service "GPU Service" "http://localhost:8010/health"
check_service "Learning Service" "http://localhost:8011/health"
check_service "Agent Coordinator" "http://localhost:8012/health"
check_service "Agent Registry" "http://localhost:8013/health"
check_service "OpenClaw Service" "http://localhost:8014/health"
check_service "hermes Service" "http://localhost:8014/health"
check_service "AI Service" "http://localhost:8015/health"
# Other Services (8020-8029)
@@ -500,12 +500,12 @@ start_services() {
log "Starting AITBC services..."
# Try systemd first
if systemctl start aitbc-wallet aitbc-coordinator-api aitbc-exchange-api aitbc-blockchain-node aitbc-blockchain-rpc aitbc-gpu aitbc-marketplace aitbc-openclaw aitbc-ai aitbc-learning aitbc-explorer aitbc-agent-coordinator aitbc-agent-registry aitbc-multimodal aitbc-modality-optimization 2>/dev/null; then
if systemctl start aitbc-wallet aitbc-coordinator-api aitbc-exchange-api aitbc-blockchain-node aitbc-blockchain-rpc aitbc-gpu aitbc-marketplace aitbc-hermes aitbc-ai aitbc-learning aitbc-explorer aitbc-agent-coordinator aitbc-agent-registry aitbc-multimodal aitbc-modality-optimization 2>/dev/null; then
log "Services started via systemd"
sleep 5
# Check if services are running
if systemctl is-active --quiet aitbc-wallet aitbc-coordinator-api aitbc-exchange-api aitbc-blockchain-node aitbc-blockchain-rpc aitbc-gpu aitbc-marketplace aitbc-openclaw aitbc-ai aitbc-learning aitbc-explorer aitbc-agent-coordinator aitbc-agent-registry aitbc-multimodal aitbc-modality-optimization; then
if systemctl is-active --quiet aitbc-wallet aitbc-coordinator-api aitbc-exchange-api aitbc-blockchain-node aitbc-blockchain-rpc aitbc-gpu aitbc-marketplace aitbc-hermes aitbc-ai aitbc-learning aitbc-explorer aitbc-agent-coordinator aitbc-agent-registry aitbc-multimodal aitbc-modality-optimization; then
success "Services started successfully via systemd"
else
warning "Some systemd services failed, falling back to manual startup"
@@ -534,7 +534,7 @@ setup_autostart() {
systemctl enable aitbc-blockchain-node.service
systemctl enable aitbc-blockchain-rpc.service
systemctl enable aitbc-marketplace.service
systemctl enable aitbc-openclaw.service
systemctl enable aitbc-hermes.service
systemctl enable aitbc-ai.service
systemctl enable aitbc-learning.service
systemctl enable aitbc-explorer.service

View File

@@ -1,6 +1,6 @@
# OpenClaw AITBC Training Scripts
# hermes AITBC Training Scripts
Complete training script suite for OpenClaw agents to master AITBC software operations from beginner to expert level.
Complete training script suite for hermes agents to master AITBC software operations from beginner to expert level.
## 📁 Training Scripts Overview
@@ -43,7 +43,7 @@ Complete training script suite for OpenClaw agents to master AITBC software oper
- **Dependencies**: `training_lib.sh`, Stage 4 completion
- **Features**: Advanced automation, multi-node coordination, security audits, certification exam
#### **Stage 6: OpenClaw Master Agent Development** (`stage6_agent_development.sh`)
#### **Stage 6: hermes Master Agent Development** (`stage6_agent_development.sh`)
- **Duration**: 40-80 minutes (automated)
- **Focus**: Agent identity, multi-agent coordination, advanced operations, security, performance
- **Dependencies**: `training_lib.sh`, Stage 5 completion
@@ -157,7 +157,7 @@ cli_cmd_node "$FOLLOWER_NODE" "blockchain --info"
### Environment Setup
```bash
# Training wallet (automatically created if not exists)
export WALLET_NAME="openclaw-trainee"
export WALLET_NAME="hermes-trainee"
export WALLET_PASSWORD="trainee123"
# Log directories (created automatically)
@@ -359,8 +359,8 @@ grep "measure_time\|Performance benchmark" /var/log/aitbc/training_*.log
**Training Scripts Version**: 1.1
**Last Updated**: 2026-04-02
**Target Audience**: OpenClaw Agents
**Target Audience**: hermes Agents
**Difficulty**: Beginner to Expert (5 Stages)
**Estimated Duration**: 2-4 hours (automated)
**Certification**: OpenClaw AITBC Master
**Certification**: hermes AITBC Master
**Library**: `training_lib.sh` - Common utilities and functions

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# OpenClaw AITBC Agent Training - Stage 1: Foundation
# Agent-Centric Training for OpenClaw Agents
# hermes AITBC Agent Training - Stage 1: Foundation
# Agent-Centric Training for hermes Agents
set -e
@@ -43,8 +43,8 @@ agent_specialized_training() {
log_agent "INFO" "Starting agent foundation training for $AGENT_ID"
log_agent "INFO" "Training data: $TRAINING_DATA"
# Use OpenClaw CLI to train the agent
if $CLI_PATH openclaw-training train agent \
# Use hermes CLI to train the agent
if $CLI_PATH hermes-training train agent \
--agent-id "$AGENT_ID" \
--stage "$STAGE" \
--training-data "$TRAINING_DATA" \
@@ -71,8 +71,8 @@ agent_specialized_training() {
agent_validation() {
log_agent "INFO" "Starting agent validation for stage $STAGE"
# Use OpenClaw CLI to validate the agent
if $CLI_PATH openclaw-training train validate \
# Use hermes CLI to validate the agent
if $CLI_PATH hermes-training train validate \
--agent-id "$AGENT_ID" \
--stage "$STAGE"; then
log_agent "SUCCESS" "Agent validation passed"
@@ -86,8 +86,8 @@ agent_validation() {
agent_certification() {
log_agent "INFO" "Starting agent certification"
# Use OpenClaw CLI to certify the agent
if $CLI_PATH openclaw-training train certify \
# Use hermes CLI to certify the agent
if $CLI_PATH hermes-training train certify \
--agent-id "$AGENT_ID"; then
log_agent "SUCCESS" "Agent certification completed"
else

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# OpenClaw AITBC Agent Training - Stage 2: Operations Mastery
# Agent-Centric Training for OpenClaw Agents on AITBC Operations
# Hermes AITBC Agent Training - Stage 2: Operations Mastery
# Agent-Centric Training for Hermes Agents on AITBC Operations
set -e
@@ -36,8 +36,8 @@ agent_operations_training() {
log_agent "INFO" "Starting agent operations training for $AGENT_ID"
log_agent "INFO" "Training data: $TRAINING_DATA"
# Use OpenClaw CLI to train the agent
if $CLI_PATH openclaw-training train agent \
# Use Hermes CLI to train the agent
if $CLI_PATH hermes-training train agent \
--agent-id "$AGENT_ID" \
--stage "$STAGE" \
--training-data "$TRAINING_DATA" \
@@ -53,8 +53,8 @@ agent_operations_training() {
agent_validation() {
log_agent "INFO" "Starting agent validation for stage $STAGE"
# Use OpenClaw CLI to validate the agent
if $CLI_PATH openclaw-training train validate \
# Use Hermes CLI to validate the agent
if $CLI_PATH hermes-training train validate \
--agent-id "$AGENT_ID" \
--stage "$STAGE"; then
log_agent "SUCCESS" "Agent validation passed"
@@ -68,8 +68,8 @@ agent_validation() {
agent_certification() {
log_agent "INFO" "Starting agent certification"
# Use OpenClaw CLI to certify the agent
if $CLI_PATH openclaw-training train certify \
# Use Hermes CLI to certify the agent
if $CLI_PATH hermes-training train certify \
--agent-id "$AGENT_ID"; then
log_agent "SUCCESS" "Agent certification completed"
else

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# OpenClaw AITBC Agent Training - Stage 3: AI Operations
# Agent-Centric Training for OpenClaw Agents on AITBC Operations
# Hermes AITBC Agent Training - Stage 3: AI Operations
# Agent-Centric Training for Hermes Agents on AITBC Operations
set -e
@@ -36,8 +36,8 @@ agent_ai_training() {
log_agent "INFO" "Starting agent AI operations training for $AGENT_ID"
log_agent "INFO" "Training data: $TRAINING_DATA"
# Use OpenClaw CLI to train the agent
if $CLI_PATH openclaw-training train agent \
# Use Hermes CLI to train the agent
if $CLI_PATH hermes-training train agent \
--agent-id "$AGENT_ID" \
--stage "$STAGE" \
--training-data "$TRAINING_DATA" \
@@ -53,8 +53,8 @@ agent_ai_training() {
agent_validation() {
log_agent "INFO" "Starting agent validation for stage $STAGE"
# Use OpenClaw CLI to validate the agent
if $CLI_PATH openclaw-training train validate \
# Use Hermes CLI to validate the agent
if $CLI_PATH hermes-training train validate \
--agent-id "$AGENT_ID" \
--stage "$STAGE"; then
log_agent "SUCCESS" "Agent validation passed"
@@ -68,8 +68,8 @@ agent_validation() {
agent_certification() {
log_agent "INFO" "Starting agent certification"
# Use OpenClaw CLI to certify the agent
if $CLI_PATH openclaw-training train certify \
# Use Hermes CLI to certify the agent
if $CLI_PATH hermes-training train certify \
--agent-id "$AGENT_ID"; then
log_agent "SUCCESS" "Agent certification completed"
else

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# OpenClaw AITBC Agent Training - Stage 4: Marketplace & Economics
# Agent-Centric Training for OpenClaw Agents on AITBC Operations
# Hermes AITBC Agent Training - Stage 4: Marketplace & Economics
# Agent-Centric Training for Hermes Agents on AITBC Operations
set -e
@@ -36,8 +36,8 @@ agent_marketplace_training() {
log_agent "INFO" "Starting agent marketplace training for $AGENT_ID"
log_agent "INFO" "Training data: $TRAINING_DATA"
# Use OpenClaw CLI to train the agent
if $CLI_PATH openclaw-training train agent \
# Use Hermes CLI to train the agent
if $CLI_PATH hermes-training train agent \
--agent-id "$AGENT_ID" \
--stage "$STAGE" \
--training-data "$TRAINING_DATA" \
@@ -53,8 +53,8 @@ agent_marketplace_training() {
agent_validation() {
log_agent "INFO" "Starting agent validation for stage $STAGE"
# Use OpenClaw CLI to validate the agent
if $CLI_PATH openclaw-training train validate \
# Use Hermes CLI to validate the agent
if $CLI_PATH hermes-training train validate \
--agent-id "$AGENT_ID" \
--stage "$STAGE"; then
log_agent "SUCCESS" "Agent validation passed"
@@ -68,8 +68,8 @@ agent_validation() {
agent_certification() {
log_agent "INFO" "Starting agent certification"
# Use OpenClaw CLI to certify the agent
if $CLI_PATH openclaw-training train certify \
# Use Hermes CLI to certify the agent
if $CLI_PATH hermes-training train certify \
--agent-id "$AGENT_ID"; then
log_agent "SUCCESS" "Agent certification completed"
else

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# OpenClaw AITBC Agent Training - Stage 5: Expert Operations
# Agent-Centric Training for OpenClaw Agents on AITBC Operations
# Hermes AITBC Agent Training - Stage 5: Expert Operations
# Agent-Centric Training for Hermes Agents on AITBC Operations
set -e
@@ -36,8 +36,8 @@ agent_expert_training() {
log_agent "INFO" "Starting agent expert training for $AGENT_ID"
log_agent "INFO" "Training data: $TRAINING_DATA"
# Use OpenClaw CLI to train the agent
if $CLI_PATH openclaw-training train agent \
# Use Hermes CLI to train the agent
if $CLI_PATH hermes-training train agent \
--agent-id "$AGENT_ID" \
--stage "$STAGE" \
--training-data "$TRAINING_DATA" \
@@ -53,8 +53,8 @@ agent_expert_training() {
agent_validation() {
log_agent "INFO" "Starting agent validation for stage $STAGE"
# Use OpenClaw CLI to validate the agent
if $CLI_PATH openclaw-training train validate \
# Use Hermes CLI to validate the agent
if $CLI_PATH hermes-training train validate \
--agent-id "$AGENT_ID" \
--stage "$STAGE"; then
log_agent "SUCCESS" "Agent validation passed"
@@ -68,8 +68,8 @@ agent_validation() {
agent_certification() {
log_agent "INFO" "Starting agent certification"
# Use OpenClaw CLI to certify the agent
if $CLI_PATH openclaw-training train certify \
# Use Hermes CLI to certify the agent
if $CLI_PATH hermes-training train certify \
--agent-id "$AGENT_ID"; then
log_agent "SUCCESS" "Agent certification completed"
else

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# OpenClaw AITBC Agent Training - Stage 6: Agent Identity & SDK
# Agent-Centric Training for OpenClaw Agents on AITBC Operations
# hermes AITBC Agent Training - Stage 6: Agent Identity & SDK
# Agent-Centric Training for hermes Agents on AITBC Operations
set -e
@@ -36,8 +36,8 @@ agent_identity_training() {
log_agent "INFO" "Starting agent identity training for $AGENT_ID"
log_agent "INFO" "Training data: $TRAINING_DATA"
# Use OpenClaw CLI to train the agent
if $CLI_PATH openclaw-training train agent \
# Use hermes CLI to train the agent
if $CLI_PATH hermes-training train agent \
--agent-id "$AGENT_ID" \
--stage "$STAGE" \
--training-data "$TRAINING_DATA" \
@@ -53,8 +53,8 @@ agent_identity_training() {
agent_validation() {
log_agent "INFO" "Starting agent validation for stage $STAGE"
# Use OpenClaw CLI to validate the agent
if $CLI_PATH openclaw-training train validate \
# Use hermes CLI to validate the agent
if $CLI_PATH hermes-training train validate \
--agent-id "$AGENT_ID" \
--stage "$STAGE"; then
log_agent "SUCCESS" "Agent validation passed"
@@ -68,8 +68,8 @@ agent_validation() {
agent_certification() {
log_agent "INFO" "Starting agent certification"
# Use OpenClaw CLI to certify the agent
if $CLI_PATH openclaw-training train certify \
# Use hermes CLI to certify the agent
if $CLI_PATH hermes-training train certify \
--agent-id "$AGENT_ID"; then
log_agent "SUCCESS" "Agent certification completed"
else

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# OpenClaw AITBC Agent Training - Stage 7: Cross-Node Training
# Agent-Centric Training for OpenClaw Agents on AITBC Operations
# Hermes AITBC Agent Training - Stage 7: Cross-Node Training
# Agent-Centric Training for Hermes Agents on AITBC Operations
set -e
@@ -36,8 +36,8 @@ agent_crossnode_training() {
log_agent "INFO" "Starting agent cross-node training for $AGENT_ID"
log_agent "INFO" "Training data: $TRAINING_DATA"
# Use OpenClaw CLI to train the agent
if $CLI_PATH openclaw-training train agent \
# Use Hermes CLI to train the agent
if $CLI_PATH hermes-training train agent \
--agent-id "$AGENT_ID" \
--stage "$STAGE" \
--training-data "$TRAINING_DATA" \
@@ -53,8 +53,8 @@ agent_crossnode_training() {
agent_validation() {
log_agent "INFO" "Starting agent validation for stage $STAGE"
# Use OpenClaw CLI to validate the agent
if $CLI_PATH openclaw-training train validate \
# Use Hermes CLI to validate the agent
if $CLI_PATH hermes-training train validate \
--agent-id "$AGENT_ID" \
--stage "$STAGE"; then
log_agent "SUCCESS" "Agent validation passed"
@@ -68,8 +68,8 @@ agent_validation() {
agent_certification() {
log_agent "INFO" "Starting agent certification"
# Use OpenClaw CLI to certify the agent
if $CLI_PATH openclaw-training train certify \
# Use Hermes CLI to certify the agent
if $CLI_PATH hermes-training train certify \
--agent-id "$AGENT_ID"; then
log_agent "SUCCESS" "Agent certification completed"
else

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# OpenClaw AITBC Agent Training - Stage 8: Advanced Agent Specialization
# Agent-Centric Training for Specialized OpenClaw Agents
# Hermes AITBC Agent Training - Stage 8: Advanced Agent Specialization
# Agent-Centric Training for Specialized Hermes Agents
set -e
@@ -36,8 +36,8 @@ agent_specialized_training() {
log_agent "INFO" "Starting agent specialized training for $AGENT_ID"
log_agent "INFO" "Training data: $TRAINING_DATA"
# Use OpenClaw CLI to train the agent
if $CLI_PATH openclaw-training train agent \
# Use Hermes CLI to train the agent
if $CLI_PATH hermes-training train agent \
--agent-id "$AGENT_ID" \
--stage "$STAGE" \
--training-data "$TRAINING_DATA" \
@@ -53,8 +53,8 @@ agent_specialized_training() {
agent_validation() {
log_agent "INFO" "Starting agent validation for stage $STAGE"
# Use OpenClaw CLI to validate the agent
if $CLI_PATH openclaw-training train validate \
# Use Hermes CLI to validate the agent
if $CLI_PATH hermes-training train validate \
--agent-id "$AGENT_ID" \
--stage "$STAGE"; then
log_agent "SUCCESS" "Agent validation passed"
@@ -68,8 +68,8 @@ agent_validation() {
agent_certification() {
log_agent "INFO" "Starting agent certification"
# Use OpenClaw CLI to certify the agent
if $CLI_PATH openclaw-training train certify \
# Use Hermes CLI to certify the agent
if $CLI_PATH hermes-training train certify \
--agent-id "$AGENT_ID"; then
log_agent "SUCCESS" "Agent certification completed"
else

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# OpenClaw AITBC Agent Training - Stage 9: Multi-Chain Architecture
# Agent-Centric Training for Multi-Chain OpenClaw Agents
# Hermes AITBC Agent Training - Stage 9: Multi-Chain Architecture
# Agent-Centric Training for Multi-Chain Hermes Agents
set -e
@@ -36,8 +36,8 @@ agent_architecture_training() {
log_agent "INFO" "Starting agent architecture training for $AGENT_ID"
log_agent "INFO" "Training data: $TRAINING_DATA"
# Use OpenClaw CLI to train the agent
if $CLI_PATH openclaw-training train agent \
# Use Hermes CLI to train the agent
if $CLI_PATH hermes-training train agent \
--agent-id "$AGENT_ID" \
--stage "$STAGE" \
--training-data "$TRAINING_DATA" \
@@ -53,8 +53,8 @@ agent_architecture_training() {
agent_validation() {
log_agent "INFO" "Starting agent validation for stage $STAGE"
# Use OpenClaw CLI to validate the agent
if $CLI_PATH openclaw-training train validate \
# Use Hermes CLI to validate the agent
if $CLI_PATH hermes-training train validate \
--agent-id "$AGENT_ID" \
--stage "$STAGE"; then
log_agent "SUCCESS" "Agent validation passed"
@@ -68,8 +68,8 @@ agent_validation() {
agent_certification() {
log_agent "INFO" "Starting agent certification"
# Use OpenClaw CLI to certify the agent
if $CLI_PATH openclaw-training train certify \
# Use Hermes CLI to certify the agent
if $CLI_PATH hermes-training train certify \
--agent-id "$AGENT_ID"; then
log_agent "SUCCESS" "Agent certification completed"
else

View File

@@ -1,11 +1,11 @@
#!/bin/bash
# OpenClaw Agent Coordination Demo Script
# hermes Agent Coordination Demo Script
# Demonstrates multi-agent communication patterns, distributed decision making, and scalable architectures
set -e
SESSION_ID="coordination-demo-$(date +%s)"
echo "OpenClaw Agent Coordination Demo"
echo "hermes Agent Coordination Demo"
echo "Session ID: $SESSION_ID"
echo ""
@@ -32,13 +32,13 @@ log_error() {
echo -e "${RED}[ERROR]${NC} $1"
}
# Check if OpenClaw is available
if ! command -v openclaw &> /dev/null; then
log_error "OpenClaw not found. Please install OpenClaw 2026.3.24+"
# Check if hermes is available
if ! command -v hermes &> /dev/null; then
log_error "hermes not found. Please install hermes 2026.3.24+"
exit 1
fi
log_info "OpenClaw version: $(openclaw --version)"
log_info "hermes version: $(hermes --version)"
# ============================================================================
# Pattern 1: Hierarchical Communication
@@ -46,7 +46,7 @@ log_info "OpenClaw version: $(openclaw --version)"
log_info "=== Pattern 1: Hierarchical Communication ==="
log_info "Coordinator broadcasts to Level 2 agents..."
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "BROADCAST: Execute distributed AI workflow across all Level 2 agents" \
--thinking high \
--parameters "broadcast_type:hierarchical,target_level:2"
@@ -54,15 +54,15 @@ openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
sleep 2
log_info "Level 2 agents respond to coordinator..."
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "Response to Coordinator: Ready for AI workflow execution with resource optimization" \
--thinking medium
openclaw agent --agent FollowerAgent --session-id $SESSION_ID \
hermes agent --agent FollowerAgent --session-id $SESSION_ID \
--message "Response to Coordinator: Ready for distributed task participation" \
--thinking medium
openclaw agent --agent AIResourceAgent --session-id $SESSION_ID \
hermes agent --agent AIResourceAgent --session-id $SESSION_ID \
--message "Response to Coordinator: Ready for resource allocation management" \
--thinking medium
@@ -75,13 +75,13 @@ log_info ""
log_info "=== Pattern 2: Peer-to-Peer Communication ==="
log_info "Direct agent-to-agent communication..."
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "P2P to FollowerAgent: Coordinate resource allocation for AI job batch" \
--thinking medium
sleep 2
openclaw agent --agent FollowerAgent --session-id $SESSION_ID \
hermes agent --agent FollowerAgent --session-id $SESSION_ID \
--message "P2P to GenesisAgent: Confirm resource availability and scheduling" \
--thinking medium
@@ -96,29 +96,29 @@ log_info "=== Pattern 3: Consensus-Based Decision Making ==="
PROPOSAL_ID="resource-strategy-$(date +%s)"
log_info "Coordinator presents proposal..."
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "VOTE PROPOSAL $PROPOSAL_ID: Implement dynamic GPU allocation with 70% utilization target" \
--thinking high
sleep 2
log_info "Agents vote on proposal..."
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "VOTE $PROPOSAL_ID: YES - Dynamic allocation optimizes AI performance" \
--thinking medium
openclaw agent --agent FollowerAgent --session-id $SESSION_ID \
hermes agent --agent FollowerAgent --session-id $SESSION_ID \
--message "VOTE $PROPOSAL_ID: YES - Improves resource utilization" \
--thinking medium
openclaw agent --agent AIResourceAgent --session-id $SESSION_ID \
hermes agent --agent AIResourceAgent --session-id $SESSION_ID \
--message "VOTE $PROPOSAL_ID: YES - Aligns with optimization goals" \
--thinking medium
sleep 2
log_info "Coordinator announces decision..."
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "DECISION: Proposal $PROPOSAL_ID APPROVED (3/3 votes) - Implementing dynamic GPU allocation" \
--thinking high
@@ -131,29 +131,29 @@ log_info ""
log_info "=== Pattern 4: Weighted Decision Making ==="
log_info "Coordinator requests weighted recommendations..."
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "WEIGHTED DECISION: Select optimal AI model for medical diagnosis pipeline" \
--thinking high
sleep 2
log_info "Agents provide weighted recommendations..."
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "RECOMMENDATION: ensemble_model (confidence: 0.9, weight: 3) - Best for accuracy" \
--thinking high
openclaw agent --agent MultiModalAgent --session-id $SESSION_ID \
hermes agent --agent MultiModalAgent --session-id $SESSION_ID \
--message "RECOMMENDATION: multimodal_model (confidence: 0.8, weight: 2) - Handles multiple data types" \
--thinking high
openclaw agent --agent AIResourceAgent --session-id $SESSION_ID \
hermes agent --agent AIResourceAgent --session-id $SESSION_ID \
--message "RECOMMENDATION: efficient_model (confidence: 0.7, weight: 1) - Best resource utilization" \
--thinking medium
sleep 2
log_info "Coordinator calculates weighted decision..."
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "WEIGHTED DECISION: ensemble_model selected (weighted score: 2.7) - Highest confidence-weighted combination" \
--thinking high
@@ -166,26 +166,26 @@ log_info ""
log_info "=== Pattern 5: Microservices Architecture ==="
log_info "Specialized agents with specific responsibilities..."
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "SERVICE: Processing AI job queue with 5 concurrent jobs" \
--thinking medium
openclaw agent --agent AIResourceAgent --session-id $SESSION_ID \
hermes agent --agent AIResourceAgent --session-id $SESSION_ID \
--message "SERVICE: Allocating GPU resources with 85% utilization target" \
--thinking medium
openclaw agent --agent FollowerAgent --session-id $SESSION_ID \
hermes agent --agent FollowerAgent --session-id $SESSION_ID \
--message "SERVICE: Monitoring system health with 99.9% uptime target" \
--thinking low
openclaw agent --agent MultiModalAgent --session-id $SESSION_ID \
hermes agent --agent MultiModalAgent --session-id $SESSION_ID \
--message "SERVICE: Analyzing performance metrics and optimization opportunities" \
--thinking medium
sleep 2
log_info "Service orchestration..."
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "ORCHESTRATION: Coordinating 4 microservices for optimal system performance" \
--thinking high
@@ -198,29 +198,29 @@ log_info ""
log_info "=== Pattern 6: Load Balancing Architecture ==="
log_info "Coordinator monitors agent loads..."
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "LOAD BALANCE: Monitoring agent loads and redistributing tasks" \
--thinking high
sleep 2
log_info "Agents report current load..."
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "LOAD REPORT: Current load 75% - capacity for 5 more AI jobs" \
--thinking low
openclaw agent --agent FollowerAgent --session-id $SESSION_ID \
hermes agent --agent FollowerAgent --session-id $SESSION_ID \
--message "LOAD REPORT: Current load 45% - capacity for 10 more tasks" \
--thinking low
openclaw agent --agent AIResourceAgent --session-id $SESSION_ID \
hermes agent --agent AIResourceAgent --session-id $SESSION_ID \
--message "LOAD REPORT: Current load 60% - capacity for resource optimization tasks" \
--thinking low
sleep 2
log_info "Coordinator redistributes load..."
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "REDISTRIBUTION: Routing new tasks to FollowerAgent (45% load) for optimal balance" \
--thinking high
@@ -233,40 +233,40 @@ log_info ""
log_info "=== Pattern 7: Multi-Agent Task Orchestration ==="
log_info "Step 1: Task decomposition..."
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "ORCHESTRATION: Decomposing complex AI pipeline into 5 subtasks for agent allocation" \
--thinking high
sleep 2
log_info "Step 2: Task assignment..."
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "ASSIGNMENT: Task 1->GenesisAgent, Task 2->MultiModalAgent, Task 3->AIResourceAgent, Task 4->FollowerAgent, Task 5->CoordinatorAgent" \
--thinking high
sleep 2
log_info "Step 3: Parallel execution..."
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "EXECUTION: Starting assigned task with parallel processing" \
--thinking medium
openclaw agent --agent MultiModalAgent --session-id $SESSION_ID \
hermes agent --agent MultiModalAgent --session-id $SESSION_ID \
--message "EXECUTION: Starting assigned task with parallel processing" \
--thinking medium
openclaw agent --agent AIResourceAgent --session-id $SESSION_ID \
hermes agent --agent AIResourceAgent --session-id $SESSION_ID \
--message "EXECUTION: Starting assigned task with parallel processing" \
--thinking medium
openclaw agent --agent FollowerAgent --session-id $SESSION_ID \
hermes agent --agent FollowerAgent --session-id $SESSION_ID \
--message "EXECUTION: Starting assigned task with parallel processing" \
--thinking medium
sleep 2
log_info "Step 4: Result aggregation..."
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "AGGREGATION: Collecting results from all agents for final synthesis" \
--thinking high
@@ -280,7 +280,7 @@ log_info "=== Performance Metrics ==="
log_info "Measuring communication latency..."
start_time=$(date +%s.%N)
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "LATENCY TEST: Measuring communication performance" \
--thinking low
end_time=$(date +%s.%N)
@@ -307,4 +307,4 @@ log_info ""
log_info "Session ID: $SESSION_ID"
log_info "For detailed patterns and implementation guidelines, see:"
log_info " .windsurf/workflows/agent-coordination-enhancement.md"
log_info " .windsurf/workflows/OPENCLAW_MASTER_INDEX.md"
log_info " .windsurf/workflows/hermes_MASTER_INDEX.md"

View File

@@ -1,6 +1,6 @@
#!/bin/bash
#
# OpenClaw Cross-Node Communication Training Module
# hermes Cross-Node Communication Training Module
# Teaches and validates agent-to-agent communication across the AITBC blockchain
# Nodes: Genesis (10.1.223.40:8006) and Follower (<aitbc1-ip>:8006)
#
@@ -158,7 +158,7 @@ run_module4_coordination() {
main() {
echo -e "${CYAN}======================================================${NC}"
echo -e "${CYAN} OpenClaw Cross-Node Communication Training Module ${NC}"
echo -e "${CYAN} hermes Cross-Node Communication Training Module ${NC}"
echo -e "${CYAN}======================================================${NC}"
check_prerequisites
@@ -175,7 +175,7 @@ main() {
echo "✓ Message Retrieval and Parsing"
echo "✓ Cross-Node AI Job Coordination"
echo -e "\n${GREEN}OpenClaw agent has successfully completed Cross-Node Communication Training!${NC}"
echo -e "\n${GREEN}hermes agent has successfully completed Cross-Node Communication Training!${NC}"
echo "The agent is now certified to coordinate tasks across aitbc and aitbc1 nodes."
}

View File

@@ -3,15 +3,15 @@
# Source training library
source "$(dirname "$0")/training_lib.sh"
# OpenClaw AITBC Training - Master Training Launcher
# hermes AITBC Training - Master Training Launcher
# Orchestrates all 5 training stages with progress tracking
set -e
# Training configuration
TRAINING_PROGRAM="OpenClaw AITBC Mastery Training"
TRAINING_PROGRAM="hermes AITBC Mastery Training"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
WALLET_NAME="openclaw-trainee"
WALLET_NAME="hermes-trainee"
# Initialize logging for master launcher
CURRENT_LOG=$(init_logging "training_master")
@@ -73,7 +73,7 @@ show_overview() {
echo -e "${BOLD}🎯 Training Objectives:${NC}"
echo "• Master AITBC CLI operations on both nodes (aitbc & aitbc1)"
echo "• Progress from beginner to expert level operations"
echo "• Achieve OpenClaw AITBC Master certification"
echo "• Achieve hermes AITBC Master certification"
echo
echo -e "${BOLD}📋 Training Stages:${NC}"
@@ -96,7 +96,7 @@ show_overview() {
echo
echo -e "${BOLD}🎓 Certification:${NC}"
echo "• OpenClaw AITBC Master upon successful completion"
echo "• hermes AITBC Master upon successful completion"
echo "• Requires 95%+ success rate on final exam"
echo
@@ -241,7 +241,7 @@ show_menu() {
run_complete_training() {
print_header "Complete Training Program"
print_status "Starting complete OpenClaw AITBC Mastery Training..."
print_status "Starting complete hermes AITBC Mastery Training..."
log "Starting complete training program"
local completed_stages=0
@@ -287,7 +287,7 @@ run_individual_stage() {
echo "3. AI Operations Mastery"
echo "4. Marketplace & Economics"
echo "5. Expert Operations & Automation"
echo "6. OpenClaw Master Agent Development"
echo "6. hermes Master Agent Development"
echo "7. Cross-Node Agent Training & Multi-Agent Orchestration"
echo
echo -n "Select stage [1-7]: "
@@ -352,7 +352,7 @@ view_logs() {
echo "4. Stage 3: AI Operations"
echo "5. Stage 4: Marketplace & Economics"
echo "6. Stage 5: Expert Operations"
echo "7. Stage 6: OpenClaw Master Agent"
echo "7. Stage 6: hermes Master Agent"
echo "8. Stage 7: Cross-Node Training"
echo "9. Return to menu"
echo
@@ -443,7 +443,7 @@ show_training_summary() {
if [ $completed_stages -eq $TOTAL_STAGES ]; then
echo -e "${GREEN}🎉 CONGRATULATIONS! TRAINING COMPLETED!${NC}"
echo
echo -e "${BOLD}🎓 OpenClaw AITBC Master Status:${NC}"
echo -e "${BOLD}🎓 hermes AITBC Master Status:${NC}"
echo "✅ All 5 training stages completed"
echo "✅ Expert-level CLI proficiency achieved"
echo "✅ Multi-node operations mastered"
@@ -454,7 +454,7 @@ show_training_summary() {
echo "1. Review all training logs for detailed performance"
echo "2. Practice advanced operations regularly"
echo "3. Implement custom automation solutions"
echo "4. Train other OpenClaw agents"
echo "4. Train other hermes agents"
echo "5. Monitor and optimize system performance"
else
echo -e "${YELLOW}Training In Progress${NC}"
@@ -478,7 +478,7 @@ main() {
mkdir -p "$LOG_DIR"
# Start logging
log "OpenClaw AITBC Mastery Training Program started"
log "hermes AITBC Mastery Training Program started"
# Show overview
show_overview
@@ -557,7 +557,7 @@ case "${1:-}" in
run_complete_training
;;
--help|-h)
echo "OpenClaw AITBC Mastery Training Launcher"
echo "hermes AITBC Mastery Training Launcher"
echo
echo "Usage: $0 [OPTION]"
echo

View File

@@ -122,7 +122,7 @@ main() {
echo "Log file: $LOG_DIR/setup.log"
echo ""
echo "Next steps:"
echo "1. Run Stage 1 training: ./aitbc-cli openclaw-training train agent --agent-id <agent-id> --stage stage1_foundation"
echo "1. Run Stage 1 training: ./aitbc-cli hermes-training train agent --agent-id <agent-id> --stage stage1_foundation"
echo "2. Verify wallet funding before transaction operations"
echo "3. Check messaging authentication before messaging operations"
}

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# OpenClaw AITBC Training - Stage 1: Foundation
# hermes AITBC Training - Stage 1: Foundation
# Basic System Orientation and CLI Commands
# Optimized version using training library
@@ -258,7 +258,7 @@ validation_quiz() {
# Main training function
main() {
print_header "OpenClaw AITBC Training - $TRAINING_STAGE"
print_header "hermes AITBC Training - $TRAINING_STAGE"
log_info "Starting $TRAINING_STAGE"
# Check prerequisites with full validation (continues despite warnings)

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# OpenClaw AITBC Training - Stage 2: Intermediate Operations
# hermes AITBC Training - Stage 2: Intermediate Operations
# Advanced Wallet Management, Blockchain Operations, Smart Contracts
# Optimized version using training library
@@ -12,9 +12,9 @@ source "$(dirname "$0")/training_lib.sh"
# Training configuration
TRAINING_STAGE="Stage 2: Intermediate Operations"
LOG_FILE="/var/log/aitbc/training_stage2.log"
WALLET_NAME="openclaw-trainee"
WALLET_NAME="hermes-trainee"
WALLET_PASSWORD="trainee123"
BACKUP_WALLET="openclaw-backup"
BACKUP_WALLET="hermes-backup"
# Setup traps for cleanup
setup_traps
@@ -111,7 +111,7 @@ smart_contract_interaction() {
fi
print_status "Testing agent messaging..."
$CLI_PATH agent message --agent "test-agent" --message "Hello from OpenClaw training" --wallet "$WALLET_NAME" --password "$WALLET_PASSWORD" 2>/dev/null || print_warning "Agent message command not available"
$CLI_PATH agent message --agent "test-agent" --message "Hello from hermes training" --wallet "$WALLET_NAME" --password "$WALLET_PASSWORD" 2>/dev/null || print_warning "Agent message command not available"
log "Agent message sent"
print_status "Checking agent messages..."
@@ -225,7 +225,7 @@ validation_quiz() {
# Main training function
main() {
echo -e "${BLUE}========================================${NC}"
echo -e "${BLUE}OpenClaw AITBC Training - $TRAINING_STAGE${NC}"
echo -e "${BLUE}hermes AITBC Training - $TRAINING_STAGE${NC}"
echo -e "${BLUE}========================================${NC}"
echo

View File

@@ -3,7 +3,7 @@
# Source training library
source "$(dirname "$0")/training_lib.sh"
# OpenClaw AITBC Training - Stage 3: AI Operations Mastery
# hermes AITBC Training - Stage 3: AI Operations Mastery
# AI Job Submission, Resource Management, Ollama Integration
set -e
@@ -12,7 +12,7 @@ set -e
TRAINING_STAGE="Stage 3: AI Operations Mastery"
SCRIPT_NAME="stage3_ai_operations"
CURRENT_LOG=$(init_logging "$SCRIPT_NAME")
WALLET_NAME="openclaw-trainee"
WALLET_NAME="hermes-trainee"
WALLET_PASSWORD="trainee123"
TEST_PROMPT="Analyze the performance of AITBC blockchain system"
TEST_PAYMENT=100
@@ -363,7 +363,7 @@ validation_quiz() {
# Main training function
main() {
echo -e "${BLUE}========================================${NC}"
echo -e "${BLUE}OpenClaw AITBC Training - $TRAINING_STAGE${NC}"
echo -e "${BLUE}hermes AITBC Training - $TRAINING_STAGE${NC}"
echo -e "${BLUE}========================================${NC}"
echo

View File

@@ -3,7 +3,7 @@
# Source training library
source "$(dirname "$0")/training_lib.sh"
# OpenClaw AITBC Training - Stage 4: Marketplace & Economic Intelligence
# hermes AITBC Training - Stage 4: Marketplace & Economic Intelligence
# Marketplace Operations, Economic Modeling, Distributed AI Economics
set -e
@@ -12,7 +12,7 @@ set -e
TRAINING_STAGE="Stage 4: Marketplace & Economic Intelligence"
SCRIPT_NAME="stage4_marketplace_economics"
CURRENT_LOG=$(init_logging "$SCRIPT_NAME")
WALLET_NAME="openclaw-trainee"
WALLET_NAME="hermes-trainee"
WALLET_PASSWORD="trainee123"
# Logging function
@@ -289,7 +289,7 @@ validation_quiz() {
# Main training function
main() {
echo -e "${BLUE}========================================${NC}"
echo -e "${BLUE}OpenClaw AITBC Training - $TRAINING_STAGE${NC}"
echo -e "${BLUE}hermes AITBC Training - $TRAINING_STAGE${NC}"
echo -e "${BLUE}========================================${NC}"
echo

View File

@@ -3,7 +3,7 @@
# Source training library
source "$(dirname "$0")/training_lib.sh"
# OpenClaw AITBC Training - Stage 5: Expert Operations & Automation
# hermes AITBC Training - Stage 5: Expert Operations & Automation
# Advanced Automation, Multi-Node Coordination, Performance Optimization
set -e
@@ -12,7 +12,7 @@ set -e
TRAINING_STAGE="Stage 5: Expert Operations & Automation"
SCRIPT_NAME="stage5_expert_automation"
CURRENT_LOG=$(init_logging "$SCRIPT_NAME")
WALLET_NAME="openclaw-trainee"
WALLET_NAME="hermes-trainee"
WALLET_PASSWORD="trainee123"
# Logging function
@@ -169,10 +169,10 @@ advanced_scripting() {
print_status "Advanced Automation Scripting"
print_status "Creating custom automation script..."
cat > /tmp/openclaw_automation.py <<EOF
cat > /tmp/hermes_automation.py <<EOF
#!/usr/bin/env python3
"""
OpenClaw Advanced Automation Script
hermes Advanced Automation Script
Demonstrates complex workflow automation for AITBC operations
"""
@@ -201,7 +201,7 @@ def automated_job_submission():
logger.info("Starting automated job submission...")
# Submit inference job with required parameters
success, output, error = run_command(f"{CLI_PATH} ai submit openclaw-trainee inference 'Automated analysis' 10 --password 'trainee123'")
success, output, error = run_command(f"{CLI_PATH} ai submit hermes-trainee inference 'Automated analysis' 10 --password 'trainee123'")
if success:
logger.info(f"Job submitted successfully: {output}")
@@ -231,7 +231,7 @@ def automated_marketplace_monitoring():
def main():
"""Main automation loop"""
logger.info("Starting OpenClaw automation...")
logger.info("Starting hermes automation...")
while True:
try:
@@ -253,14 +253,14 @@ if __name__ == "__main__":
EOF
print_status "Running custom automation script..."
python3 /tmp/openclaw_automation.py &
python3 /tmp/hermes_automation.py &
AUTOMATION_PID=$!
sleep 10
kill $AUTOMATION_PID 2>/dev/null || true
log "Custom automation script executed"
print_status "Testing script execution..."
$CLI_PATH script --run --file /tmp/openclaw_automation.py 2>/dev/null || print_warning "Script execution command not available"
$CLI_PATH script --run --file /tmp/hermes_automation.py 2>/dev/null || print_warning "Script execution command not available"
log "Script execution test completed"
print_success "Advanced automation scripting completed"
@@ -405,7 +405,7 @@ final_certification_exam() {
print_status "Certification Results: $TESTS_PASSED/$TOTAL_TESTS tests passed ($SUCCESS_RATE%)"
if [ $SUCCESS_RATE -ge 95 ]; then
print_success "🎉 CERTIFICATION PASSED! OpenClaw AITBC Master Status Achieved!"
print_success "🎉 CERTIFICATION PASSED! hermes AITBC Master Status Achieved!"
log "CERTIFICATION: PASSED with $SUCCESS_RATE% success rate"
elif [ $SUCCESS_RATE -ge 80 ]; then
print_warning "CERTIFICATION CONDITIONAL: $SUCCESS_RATE% - Additional practice recommended"
@@ -440,7 +440,7 @@ validation_quiz() {
# Main training function
main() {
echo -e "${BLUE}========================================${NC}"
echo -e "${BLUE}OpenClaw AITBC Training - $TRAINING_STAGE${NC}"
echo -e "${BLUE}hermes AITBC Training - $TRAINING_STAGE${NC}"
echo -e "${BLUE}========================================${NC}"
echo
@@ -474,7 +474,7 @@ main() {
echo "2. Practice advanced operations regularly"
echo "3. Implement custom automation solutions"
echo "4. Monitor and optimize system performance"
echo "5. Train other OpenClaw agents"
echo "5. Train other hermes agents"
echo
echo -e "${YELLOW}Training Logs:${NC}"
echo "- Stage 1: /var/log/aitbc/training_stage1.log"
@@ -483,10 +483,10 @@ main() {
echo "- Stage 4: /var/log/aitbc/training_stage4.log"
echo "- Stage 5: /var/log/aitbc/training_stage5.log"
echo
echo -e "${GREEN}🎉 CONGRATULATIONS! OPENCLAW AITBC MASTERY ACHIEVED! 🎉${NC}"
echo -e "${GREEN}🎉 CONGRATULATIONS! hermes AITBC MASTERY ACHIEVED! 🎉${NC}"
log "$TRAINING_STAGE completed successfully"
log "OpenClaw AITBC Mastery Training Program completed"
log "hermes AITBC Mastery Training Program completed"
}
# Run the training

View File

@@ -3,16 +3,16 @@
# Source training library
source "$(dirname "$0")/training_lib.sh"
# OpenClaw AITBC Training - Stage 6: OpenClaw Master Agent Development
# hermes AITBC Training - Stage 6: hermes Master Agent Development
# Agent Identity, Multi-Agent Coordination, Advanced Operations
set -e
# Training configuration
TRAINING_STAGE="Stage 6: OpenClaw Master Agent Development"
TRAINING_STAGE="Stage 6: hermes Master Agent Development"
SCRIPT_NAME="stage6_agent_development"
CURRENT_LOG=$(init_logging "$SCRIPT_NAME")
WALLET_NAME="openclaw-trainee"
WALLET_NAME="hermes-trainee"
WALLET_PASSWORD="trainee123"
# Logging function
@@ -195,7 +195,7 @@ agent_performance_optimization() {
# Final Certification Exam
certification_exam() {
print_status "Final Certification Exam: OpenClaw Master Agent"
print_status "Final Certification Exam: hermes Master Agent"
TESTS_PASSED=0
TOTAL_TESTS=10
@@ -294,7 +294,7 @@ certification_exam() {
log "Certification Results: $TESTS_PASSED/$TOTAL_TESTS tests passed"
if [ $TESTS_PASSED -eq $TOTAL_TESTS ]; then
print_success "🎉 CERTIFICATION PASSED! OpenClaw Master Agent Status Achieved!"
print_success "🎉 CERTIFICATION PASSED! hermes Master Agent Status Achieved!"
log "CERTIFICATION: PASSED with 100% success rate"
elif [ $TESTS_PASSED -ge 8 ]; then
print_success "CERTIFICATION PASSED with $TESTS_PASSED/$TOTAL_TESTS"
@@ -336,14 +336,14 @@ main() {
echo "$TRAINING_STAGE COMPLETED SUCCESSFULLY"
echo "========================================"
echo ""
echo "🎓 OPENCLAW MASTER AGENT ACHIEVED"
echo "🎓 hermes MASTER AGENT ACHIEVED"
echo ""
echo "Next Steps:"
echo "1. Deploy custom agents in production"
echo "2. Implement multi-agent coordination strategies"
echo "3. Optimize agent performance"
echo "4. Monitor agent security and compliance"
echo "5. Train other OpenClaw agents"
echo "5. Train other hermes agents"
echo ""
echo "Training Log: $CURRENT_LOG"
echo ""

View File

@@ -3,7 +3,7 @@
# Source training library
source "$(dirname "$0")/training_lib.sh"
# OpenClaw AITBC Training - Stage 6: CLI Mastery & Extension Development
# hermes AITBC Training - Stage 6: CLI Mastery & Extension Development
# CLI Architecture, Command Development, and Extension
set -e
@@ -12,7 +12,7 @@ set -e
TRAINING_STAGE="Stage 6: CLI Mastery & Extension Development"
SCRIPT_NAME="stage6_cli_mastery"
CURRENT_LOG=$(init_logging "$SCRIPT_NAME")
WALLET_NAME="openclaw-trainee"
WALLET_NAME="hermes-trainee"
WALLET_PASSWORD="trainee123"
# Logging function
@@ -260,7 +260,7 @@ EOF
fi
print_status "Testing custom command..."
if $CLI_PATH greeting hello --name "OpenClaw" 2>/dev/null; then
if $CLI_PATH greeting hello --name "hermes" 2>/dev/null; then
log "Custom command test passed"
print_success "Custom command works successfully"
else

View File

@@ -3,7 +3,7 @@
# Source training library
source "$(dirname "$0")/training_lib.sh"
# OpenClaw AITBC Training - Stage 7: Cross-Node Agent Training & Multi-Agent Orchestration
# hermes AITBC Training - Stage 7: Cross-Node Agent Training & Multi-Agent Orchestration
# Cross-node agent training, multi-agent coordination, distributed learning
set -e
@@ -12,7 +12,7 @@ set -e
TRAINING_STAGE="Stage 7: Cross-Node Agent Training & Multi-Agent Orchestration"
SCRIPT_NAME="stage7_cross_node_training"
CURRENT_LOG=$(init_logging "$SCRIPT_NAME")
WALLET_NAME="openclaw-trainee"
WALLET_NAME="hermes-trainee"
WALLET_PASSWORD="trainee123"
LOCAL_NODE="aitbc"
REMOTE_NODE="aitbc1"

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# OpenClaw AITBC Training - Common Library
# hermes AITBC Training - Common Library
# Shared functions and utilities for all training stage scripts
# Version: 1.0
@@ -16,7 +16,7 @@ REPO_ROOT="$(cd "${TRAINING_LIB_DIR}/../.." && pwd)"
# Default configuration (can be overridden)
export CLI_PATH="${CLI_PATH:-${REPO_ROOT}/aitbc-cli}"
export LOG_DIR="${LOG_DIR:-/var/log/aitbc}"
export WALLET_NAME="${WALLET_NAME:-openclaw-trainee}"
export WALLET_NAME="${WALLET_NAME:-hermes-trainee}"
export WALLET_PASSWORD="${WALLET_PASSWORD:-trainee123}"
export TRAINING_TIMEOUT="${TRAINING_TIMEOUT:-300}"
export GENESIS_NODE="http://localhost:8006"

View File

@@ -0,0 +1,162 @@
#!/bin/bash
# hermes Pre-Flight Setup Script for AITBC Multi-Node Blockchain
# This script prepares the system and deploys hermes agents for multi-node blockchain deployment
set -e # Exit on any error
echo "=== hermes AITBC Multi-Node Blockchain Pre-Flight Setup ==="
# 1. Initialize hermes Agent System
echo "1. Initializing hermes Agent System..."
# Check if hermes is available
if ! command -v hermes &> /dev/null; then
echo "❌ hermes CLI not found. Installing hermes..."
# Install hermes (placeholder - actual installation would go here)
pip install hermes-agent 2>/dev/null || echo "⚠️ hermes installation failed - using mock mode"
fi
# 2. Deploy hermes Agents
echo "2. Deploying hermes Agents..."
# Create agent configuration
cat > /tmp/hermes_agents.json << 'EOF'
{
"agents": {
"CoordinatorAgent": {
"node": "aitbc",
"capabilities": ["orchestration", "monitoring", "coordination"],
"access": ["agent_communication", "task_distribution"]
},
"GenesisAgent": {
"node": "aitbc",
"capabilities": ["system_admin", "blockchain_genesis", "service_management"],
"access": ["ssh", "systemctl", "file_system"]
},
"FollowerAgent": {
"node": "aitbc1",
"capabilities": ["system_admin", "blockchain_sync", "service_management"],
"access": ["ssh", "systemctl", "file_system"]
},
"WalletAgent": {
"node": "both",
"capabilities": ["wallet_management", "transaction_processing"],
"access": ["cli_commands", "blockchain_rpc"]
}
}
}
EOF
# Deploy agents using hermes
hermes deploy --config /tmp/hermes_agents.json --mode production || {
echo "⚠️ hermes deployment failed - using mock agent deployment"
# Mock deployment for development
mkdir -p /var/lib/hermes/agents
echo "mock_coordinator_agent" > /var/lib/hermes/agents/CoordinatorAgent.status
echo "mock_genesis_agent" > /var/lib/hermes/agents/GenesisAgent.status
echo "mock_follower_agent" > /var/lib/hermes/agents/FollowerAgent.status
echo "mock_wallet_agent" > /var/lib/hermes/agents/WalletAgent.status
}
# 3. Stop existing services (via hermes agents)
echo "3. Stopping existing services via hermes agents..."
hermes execute --agent CoordinatorAgent --task stop_all_services || {
echo "⚠️ hermes service stop failed - using manual method"
systemctl stop aitbc-blockchain-* 2>/dev/null || true
}
# 4. Update systemd configurations (via hermes)
echo "4. Updating systemd configurations via hermes agents..."
hermes execute --agent GenesisAgent --task update_systemd_config || {
echo "⚠️ hermes config update failed - using manual method"
# Update main service files
sed -i 's|EnvironmentFile=/opt/aitbc/.env|EnvironmentFile=/etc/aitbc/.env|g' /opt/aitbc/systemd/aitbc-blockchain-*.service
# Update drop-in configs
find /etc/systemd/system/aitbc-blockchain-*.service.d/ -name "10-central-env.conf" -exec sed -i 's|EnvironmentFile=/opt/aitbc/.env|EnvironmentFile=/etc/aitbc/.env|g' {} \; 2>/dev/null || true
# Fix override configs (wrong venv paths)
find /etc/systemd/system/aitbc-blockchain-*.service.d/ -name "override.conf" -exec sed -i 's|/opt/aitbc/apps/blockchain-node/.venv/bin/python3|/opt/aitbc/venv/bin/python3|g' {} \; 2>/dev/null || true
systemctl daemon-reload
}
# 5. Setup central configuration (via hermes)
echo "5. Setting up central configuration via hermes agents..."
hermes execute --agent CoordinatorAgent --task setup_central_config || {
echo "⚠️ hermes config setup failed - using manual method"
cp /opt/aitbc/.env /etc/aitbc/.env.backup 2>/dev/null || true
mv /opt/aitbc/.env /etc/aitbc/.env 2>/dev/null || true
}
# 6. Setup AITBC CLI tool (via hermes)
echo "6. Setting up AITBC CLI tool via hermes agents..."
hermes execute --agent GenesisAgent --task setup_cli_tool || {
echo "⚠️ hermes CLI setup failed - using manual method"
source /opt/aitbc/venv/bin/activate
pip install -e /opt/aitbc/cli/ 2>/dev/null || true
echo 'alias aitbc="source /opt/aitbc/venv/bin/activate && aitbc"' >> ~/.bashrc
source ~/.bashrc
}
# 7. Clean old data (via hermes)
echo "7. Cleaning old data via hermes agents..."
hermes execute --agent CoordinatorAgent --task clean_old_data || {
echo "⚠️ hermes data cleanup failed - using manual method"
rm -rf /var/lib/aitbc/data/ait-mainnet/*
rm -rf /var/lib/aitbc/keystore/*
}
# 8. Create keystore password file (via hermes)
echo "8. Creating keystore password file via hermes agents..."
hermes execute --agent CoordinatorAgent --task create_keystore_password || {
echo "⚠️ hermes keystore setup failed - using manual method"
mkdir -p /var/lib/aitbc/keystore
echo 'aitbc123' > /var/lib/aitbc/keystore/.password
chmod 600 /var/lib/aitbc/keystore/.password
}
# 9. Verify hermes agent deployment
echo "9. Verifying hermes agent deployment..."
hermes status --agent all || {
echo "⚠️ hermes status check failed - using mock verification"
ls -la /var/lib/hermes/agents/
}
# 10. Initialize agent communication channels
echo "10. Initializing agent communication channels..."
hermes execute --agent CoordinatorAgent --task establish_communication || {
echo "⚠️ hermes communication setup failed - using mock setup"
# Mock communication setup
echo "agent_communication_established" > /var/lib/hermes/communication.status
}
# 11. Verify setup with hermes agents
echo "11. Verifying setup with hermes agents..."
hermes execute --agent CoordinatorAgent --task verify_setup || {
echo "⚠️ hermes verification failed - using manual method"
aitbc --help 2>/dev/null || echo "CLI available but limited commands"
}
# 12. Generate pre-flight report
echo "12. Generating pre-flight report..."
hermes report --workflow preflight --format json > /tmp/hermes_preflight_report.json || {
echo "⚠️ hermes report generation failed - using mock report"
cat > /tmp/hermes_preflight_report.json << 'EOF'
{
"status": "completed",
"agents_deployed": 4,
"services_stopped": true,
"config_updated": true,
"cli_setup": true,
"data_cleaned": true,
"keystore_created": true,
"communication_established": true,
"timestamp": "2026-03-30T12:40:00Z"
}
EOF
}
echo "✅ hermes Pre-Flight Setup Completed!"
echo "📊 Report saved to: /tmp/hermes_preflight_report.json"
echo "🤖 Agents ready for multi-node blockchain deployment"
# Display agent status
echo ""
echo "=== hermes Agent Status ==="
hermes status --agent all 2>/dev/null || cat /var/lib/hermes/agents/*.status

View File

@@ -1,54 +1,54 @@
#!/bin/bash
# OpenClaw Pre-Flight Setup Script for AITBC Multi-Node Blockchain (Corrected)
# This script prepares the system and uses actual OpenClaw commands for multi-node blockchain deployment
# Hermes Pre-Flight Setup Script for AITBC Multi-Node Blockchain (Corrected)
# This script prepares the system and uses actual Hermes commands for multi-node blockchain deployment
set -e # Exit on any error
echo "=== OpenClaw AITBC Multi-Node Blockchain Pre-Flight Setup (Corrected) ==="
echo "=== Hermes AITBC Multi-Node Blockchain Pre-Flight Setup (Corrected) ==="
# 1. Initialize OpenClaw Agent System
echo "1. Initializing OpenClaw Agent System..."
# Check if OpenClaw is available and running
if ! command -v openclaw &> /dev/null; then
echo "❌ OpenClaw CLI not found"
# 1. Initialize Hermes Agent System
echo "1. Initializing Hermes Agent System..."
# Check if Hermes is available and running
if ! command -v hermes &> /dev/null; then
echo "❌ Hermes CLI not found"
exit 1
fi
# Check if OpenClaw gateway is running
if ! openclaw health &> /dev/null; then
echo "⚠️ OpenClaw gateway not running, starting it..."
openclaw gateway --daemon &
# Check if Hermes gateway is running
if ! hermes health &> /dev/null; then
echo "⚠️ Hermes gateway not running, starting it..."
hermes gateway --daemon &
sleep 5
fi
# Verify OpenClaw is working
openclaw status --all > /dev/null
echo "✅ OpenClaw system initialized"
# Verify Hermes is working
hermes status --all > /dev/null
echo "✅ Hermes system initialized"
# 2. Create OpenClaw Agents for Blockchain Operations
echo "2. Creating OpenClaw Agents for Blockchain Operations..."
# 2. Create Hermes Agents for Blockchain Operations
echo "2. Creating Hermes Agents for Blockchain Operations..."
# Create CoordinatorAgent
echo "Creating CoordinatorAgent..."
openclaw agents add --agent-id CoordinatorAgent --name "Blockchain Coordinator" 2>/dev/null || echo "CoordinatorAgent already exists"
hermes agents add --agent-id CoordinatorAgent --name "Blockchain Coordinator" 2>/dev/null || echo "CoordinatorAgent already exists"
# Create GenesisAgent
echo "Creating GenesisAgent..."
openclaw agents add --agent-id GenesisAgent --name "Genesis Authority Manager" 2>/dev/null || echo "GenesisAgent already exists"
hermes agents add --agent-id GenesisAgent --name "Genesis Authority Manager" 2>/dev/null || echo "GenesisAgent already exists"
# Create FollowerAgent
echo "Creating FollowerAgent..."
openclaw agents add --agent-id FollowerAgent --name "Follower Node Manager" 2>/dev/null || echo "FollowerAgent already exists"
hermes agents add --agent-id FollowerAgent --name "Follower Node Manager" 2>/dev/null || echo "FollowerAgent already exists"
# Create WalletAgent
echo "Creating WalletAgent..."
openclaw agents add --agent-id WalletAgent --name "Wallet Operations Manager" 2>/dev/null || echo "WalletAgent already exists"
hermes agents add --agent-id WalletAgent --name "Wallet Operations Manager" 2>/dev/null || echo "WalletAgent already exists"
# List created agents
echo "Created agents:"
openclaw agents list
hermes agents list
# 3. Stop existing services (manual approach since OpenClaw doesn't manage system services)
# 3. Stop existing services (manual approach since Hermes doesn't manage system services)
echo "3. Stopping existing AITBC services..."
systemctl stop aitbc-blockchain-* 2>/dev/null || echo "No services to stop"
@@ -87,35 +87,35 @@ mkdir -p /var/lib/aitbc/keystore
echo 'aitbc123' > /var/lib/aitbc/keystore/.password
chmod 600 /var/lib/aitbc/keystore/.password
# 9. Test OpenClaw Agent Communication
echo "9. Testing OpenClaw Agent Communication..."
# 9. Test Hermes Agent Communication
echo "9. Testing Hermes Agent Communication..."
# Test CoordinatorAgent
echo "Testing CoordinatorAgent..."
openclaw agent --agent CoordinatorAgent --message "Initialize blockchain deployment coordination" --thinking low > /dev/null || echo "CoordinatorAgent test completed"
hermes agent --agent CoordinatorAgent --message "Initialize blockchain deployment coordination" --thinking low > /dev/null || echo "CoordinatorAgent test completed"
# Test GenesisAgent
echo "Testing GenesisAgent..."
openclaw agent --agent GenesisAgent --message "Prepare for genesis authority setup" --thinking low > /dev/null || echo "GenesisAgent test completed"
hermes agent --agent GenesisAgent --message "Prepare for genesis authority setup" --thinking low > /dev/null || echo "GenesisAgent test completed"
# Test FollowerAgent
echo "Testing FollowerAgent..."
openclaw agent --agent FollowerAgent --message "Prepare for follower node setup" --thinking low > /dev/null || echo "FollowerAgent test completed"
hermes agent --agent FollowerAgent --message "Prepare for follower node setup" --thinking low > /dev/null || echo "FollowerAgent test completed"
# Test WalletAgent
echo "Testing WalletAgent..."
openclaw agent --agent WalletAgent --message "Prepare for wallet operations" --thinking low > /dev/null || echo "WalletAgent test completed"
hermes agent --agent WalletAgent --message "Prepare for wallet operations" --thinking low > /dev/null || echo "WalletAgent test completed"
echo "✅ OpenClaw agent communication tested"
echo "✅ Hermes agent communication tested"
# 10. Verify setup
echo "10. Verifying setup..."
# Check CLI functionality
./aitbc-cli --help 2>/dev/null || echo "CLI available but limited commands"
# Check OpenClaw agents
echo "OpenClaw agents status:"
openclaw agents list
# Check Hermes agents
echo "Hermes agents status:"
hermes agents list
# Check blockchain services
echo "Blockchain service status:"
@@ -124,10 +124,10 @@ systemctl status aitbc-blockchain-rpc.service --no-pager | head -3
# 11. Generate pre-flight report
echo "11. Generating pre-flight report..."
cat > /tmp/openclaw_preflight_report.json << 'EOF'
cat > /tmp/hermes_preflight_report.json << 'EOF'
{
"status": "completed",
"openclaw_version": "2026.3.24",
"hermes_version": "2026.3.24",
"agents_created": 4,
"agents": ["CoordinatorAgent", "GenesisAgent", "FollowerAgent", "WalletAgent"],
"services_stopped": true,
@@ -140,24 +140,24 @@ cat > /tmp/openclaw_preflight_report.json << 'EOF'
}
EOF
echo "✅ OpenClaw Pre-Flight Setup Completed!"
echo "📊 Report saved to: /tmp/openclaw_preflight_report.json"
echo "🤖 OpenClaw agents ready for blockchain deployment"
echo "✅ Hermes Pre-Flight Setup Completed!"
echo "📊 Report saved to: /tmp/hermes_preflight_report.json"
echo "🤖 Hermes agents ready for blockchain deployment"
# Display agent status
echo ""
echo "=== OpenClaw Agent Status ==="
openclaw agents list
echo "=== Hermes Agent Status ==="
hermes agents list
# Display OpenClaw gateway status
# Display Hermes gateway status
echo ""
echo "=== OpenClaw Gateway Status ==="
openclaw status --all | head -10
echo "=== Hermes Gateway Status ==="
hermes status --all | head -10
# Display next steps
echo ""
echo "=== Next Steps ==="
echo "1. Run genesis setup: ./02_genesis_authority_setup_openclaw_corrected.sh"
echo "2. Run follower setup: ./03_follower_node_setup_openclaw_corrected.sh"
echo "3. Run wallet operations: ./04_wallet_operations_openclaw_corrected.sh"
echo "4. Run complete workflow: ./05_complete_workflow_openclaw_corrected.sh"
echo "1. Run genesis setup: ./02_genesis_authority_setup_hermes_corrected.sh"
echo "2. Run follower setup: ./03_follower_node_setup_hermes_corrected.sh"
echo "3. Run wallet operations: ./04_wallet_operations_hermes_corrected.sh"
echo "4. Run complete workflow: ./05_complete_workflow_hermes_corrected.sh"

View File

@@ -1,36 +1,36 @@
#!/bin/bash
# OpenClaw Pre-Flight Setup Script for AITBC Multi-Node Blockchain (Simplified)
# This script prepares the system using actual OpenClaw commands
# Hermes Pre-Flight Setup Script for AITBC Multi-Node Blockchain (Simplified)
# This script prepares the system using actual Hermes commands
set -e # Exit on any error
echo "=== OpenClaw AITBC Multi-Node Blockchain Pre-Flight Setup (Simplified) ==="
echo "=== Hermes AITBC Multi-Node Blockchain Pre-Flight Setup (Simplified) ==="
# 1. Check OpenClaw System
echo "1. Checking OpenClaw System..."
if ! command -v openclaw &> /dev/null; then
echo "❌ OpenClaw CLI not found"
# 1. Check Hermes System
echo "1. Checking Hermes System..."
if ! command -v hermes &> /dev/null; then
echo "❌ Hermes CLI not found"
exit 1
fi
# Check if OpenClaw gateway is running
if ! openclaw health &> /dev/null; then
echo "⚠️ OpenClaw gateway not running, starting it..."
openclaw gateway --daemon &
# Check if Hermes gateway is running
if ! hermes health &> /dev/null; then
echo "⚠️ Hermes gateway not running, starting it..."
hermes gateway --daemon &
sleep 5
fi
# Verify OpenClaw is working
echo "✅ OpenClaw system ready"
openclaw status --all | head -5
# Verify Hermes is working
echo "✅ Hermes system ready"
hermes status --all | head -5
# 2. Use the default agent for blockchain operations
echo "2. Using default OpenClaw agent for blockchain operations..."
echo "2. Using default Hermes agent for blockchain operations..."
# The default agent 'main' will be used for all operations
echo "Using default agent: main"
echo "Agent details:"
openclaw agents list
hermes agents list
# 3. Stop existing services (manual approach)
echo "3. Stopping existing AITBC services..."
@@ -67,26 +67,26 @@ mkdir -p /var/lib/aitbc/keystore
echo 'aitbc123' > /var/lib/aitbc/keystore/.password
chmod 600 /var/lib/aitbc/keystore/.password
# 9. Test OpenClaw Agent Communication
echo "9. Testing OpenClaw Agent Communication..."
# 9. Test Hermes Agent Communication
echo "9. Testing Hermes Agent Communication..."
# Create a session for agent operations
SESSION_ID="blockchain-workflow-$(date +%s)"
# Test the default agent with blockchain tasks using session
echo "Testing default agent with blockchain coordination..."
openclaw agent --agent main --session-id $SESSION_ID --message "Initialize blockchain deployment coordination" --thinking low > /dev/null || echo "Agent test completed"
hermes agent --agent main --session-id $SESSION_ID --message "Initialize blockchain deployment coordination" --thinking low > /dev/null || echo "Agent test completed"
echo "Testing default agent with genesis setup..."
openclaw agent --agent main --session-id $SESSION_ID --message "Prepare for genesis authority setup" --thinking low > /dev/null || echo "Agent test completed"
hermes agent --agent main --session-id $SESSION_ID --message "Prepare for genesis authority setup" --thinking low > /dev/null || echo "Agent test completed"
echo "Testing default agent with follower setup..."
openclaw agent --agent main --session-id $SESSION_ID --message "Prepare for follower node setup" --thinking low > /dev/null || echo "Agent test completed"
hermes agent --agent main --session-id $SESSION_ID --message "Prepare for follower node setup" --thinking low > /dev/null || echo "Agent test completed"
echo "Testing default agent with wallet operations..."
openclaw agent --agent main --session-id $SESSION_ID --message "Prepare for wallet operations" --thinking low > /dev/null || echo "Agent test completed"
hermes agent --agent main --session-id $SESSION_ID --message "Prepare for wallet operations" --thinking low > /dev/null || echo "Agent test completed"
echo "✅ OpenClaw agent communication tested"
echo "✅ Hermes agent communication tested"
echo "Session ID: $SESSION_ID"
# 10. Verify setup
@@ -94,16 +94,16 @@ echo "10. Verifying setup..."
# Check CLI functionality
./aitbc-cli --help > /dev/null || echo "CLI available"
# Check OpenClaw agents
echo "OpenClaw agents status:"
openclaw agents list
# Check Hermes agents
echo "Hermes agents status:"
hermes agents list
# 11. Generate pre-flight report
echo "11. Generating pre-flight report..."
cat > /tmp/openclaw_preflight_report.json << 'EOF'
cat > /tmp/hermes_preflight_report.json << 'EOF'
{
"status": "completed",
"openclaw_version": "2026.3.24",
"hermes_version": "2026.3.24",
"agent_used": "main (default)",
"services_stopped": true,
"config_updated": true,
@@ -115,25 +115,25 @@ cat > /tmp/openclaw_preflight_report.json << 'EOF'
}
EOF
echo "✅ OpenClaw Pre-Flight Setup Completed!"
echo "📊 Report saved to: /tmp/openclaw_preflight_report.json"
echo "🤖 OpenClaw agent ready for blockchain deployment"
echo "✅ Hermes Pre-Flight Setup Completed!"
echo "📊 Report saved to: /tmp/hermes_preflight_report.json"
echo "🤖 Hermes agent ready for blockchain deployment"
# Display agent status
echo ""
echo "=== OpenClaw Agent Status ==="
openclaw agents list
echo "=== Hermes Agent Status ==="
hermes agents list
# Display next steps
echo ""
echo "=== Next Steps ==="
echo "1. Run genesis setup: ./02_genesis_authority_setup_openclaw_simple.sh"
echo "2. Run follower setup: ./03_follower_node_setup_openclaw_simple.sh"
echo "3. Run wallet operations: ./04_wallet_operations_openclaw_simple.sh"
echo "4. Run complete workflow: ./05_complete_workflow_openclaw_simple.sh"
echo "1. Run genesis setup: ./02_genesis_authority_setup_hermes_simple.sh"
echo "2. Run follower setup: ./03_follower_node_setup_hermes_simple.sh"
echo "3. Run wallet operations: ./04_wallet_operations_hermes_simple.sh"
echo "4. Run complete workflow: ./05_complete_workflow_hermes_simple.sh"
echo ""
echo "=== OpenClaw Integration Notes ==="
echo "=== Hermes Integration Notes ==="
echo "- Using default agent 'main' for all operations"
echo "- Agent can be invoked with: openclaw agent --message 'your task'"
echo "- For specific operations, use: openclaw agent --message 'blockchain task' --thinking medium"
echo "- Agent can be invoked with: hermes agent --message 'your task'"
echo "- For specific operations, use: hermes agent --message 'blockchain task' --thinking medium"

View File

@@ -1,44 +1,44 @@
#!/bin/bash
# OpenClaw Genesis Authority Setup Script for AITBC Node
# This script uses OpenClaw agents to configure aitbc as the genesis authority node
# hermes Genesis Authority Setup Script for AITBC Node
# This script uses hermes agents to configure aitbc as the genesis authority node
set -e # Exit on any error
echo "=== OpenClaw AITBC Genesis Authority Setup (aitbc) ==="
echo "=== hermes AITBC Genesis Authority Setup (aitbc) ==="
# 1. Initialize OpenClaw GenesisAgent
echo "1. Initializing OpenClaw GenesisAgent..."
openclaw execute --agent GenesisAgent --task initialize_genesis_setup || {
echo "⚠️ OpenClaw GenesisAgent initialization failed - using manual method"
# 1. Initialize hermes GenesisAgent
echo "1. Initializing hermes GenesisAgent..."
hermes execute --agent GenesisAgent --task initialize_genesis_setup || {
echo "⚠️ hermes GenesisAgent initialization failed - using manual method"
}
# 2. Pull latest code (via OpenClaw)
echo "2. Pulling latest code via OpenClaw GenesisAgent..."
openclaw execute --agent GenesisAgent --task pull_latest_code || {
echo "⚠️ OpenClaw code pull failed - using manual method"
# 2. Pull latest code (via hermes)
echo "2. Pulling latest code via hermes GenesisAgent..."
hermes execute --agent GenesisAgent --task pull_latest_code || {
echo "⚠️ hermes code pull failed - using manual method"
cd /opt/aitbc
git pull origin main
}
# 3. Install/update dependencies (via OpenClaw)
echo "3. Installing/updating dependencies via OpenClaw GenesisAgent..."
openclaw execute --agent GenesisAgent --task update_dependencies || {
echo "⚠️ OpenClaw dependency update failed - using manual method"
# 3. Install/update dependencies (via hermes)
echo "3. Installing/updating dependencies via hermes GenesisAgent..."
hermes execute --agent GenesisAgent --task update_dependencies || {
echo "⚠️ hermes dependency update failed - using manual method"
/opt/aitbc/venv/bin/pip install -r requirements.txt
}
# 4. Create required directories (via OpenClaw)
echo "4. Creating required directories via OpenClaw GenesisAgent..."
openclaw execute --agent GenesisAgent --task create_directories || {
echo "⚠️ OpenClaw directory creation failed - using manual method"
# 4. Create required directories (via hermes)
echo "4. Creating required directories via hermes GenesisAgent..."
hermes execute --agent GenesisAgent --task create_directories || {
echo "⚠️ hermes directory creation failed - using manual method"
mkdir -p /var/lib/aitbc/data /var/lib/aitbc/keystore /etc/aitbc /var/log/aitbc
ls -la /var/lib/aitbc/ || echo "Creating /var/lib/aitbc/ structure..."
}
# 5. Update environment configuration (via OpenClaw)
echo "5. Updating environment configuration via OpenClaw GenesisAgent..."
openclaw execute --agent GenesisAgent --task update_genesis_config || {
echo "⚠️ OpenClaw config update failed - using manual method"
# 5. Update environment configuration (via hermes)
echo "5. Updating environment configuration via hermes GenesisAgent..."
hermes execute --agent GenesisAgent --task update_genesis_config || {
echo "⚠️ hermes config update failed - using manual method"
cp /etc/aitbc/blockchain.env /etc/aitbc/blockchain.env.aitbc.backup 2>/dev/null || true
# Update .env for aitbc genesis authority configuration
@@ -70,10 +70,10 @@ openclaw execute --agent GenesisAgent --task update_genesis_config || {
fi
}
# 6. Create genesis block with wallets (via OpenClaw)
echo "6. Creating genesis block with wallets via OpenClaw GenesisAgent..."
openclaw execute --agent GenesisAgent --task create_genesis_block || {
echo "⚠️ OpenClaw genesis block creation failed - using manual method"
# 6. Create genesis block with wallets (via hermes)
echo "6. Creating genesis block with wallets via hermes GenesisAgent..."
hermes execute --agent GenesisAgent --task create_genesis_block || {
echo "⚠️ hermes genesis block creation failed - using manual method"
cd /opt/aitbc/apps/blockchain-node
/opt/aitbc/venv/bin/python scripts/setup_production.py \
--base-dir /opt/aitbc/apps/blockchain-node \
@@ -81,10 +81,10 @@ openclaw execute --agent GenesisAgent --task create_genesis_block || {
--total-supply 1000000000
}
# 7. Create genesis wallets (via OpenClaw WalletAgent)
echo "7. Creating genesis wallets via OpenClaw WalletAgent..."
openclaw execute --agent WalletAgent --task create_genesis_wallets || {
echo "⚠️ OpenClaw wallet creation failed - using manual method"
# 7. Create genesis wallets (via hermes WalletAgent)
echo "7. Creating genesis wallets via hermes WalletAgent..."
hermes execute --agent WalletAgent --task create_genesis_wallets || {
echo "⚠️ hermes wallet creation failed - using manual method"
# Manual wallet creation as fallback
cd /opt/aitbc/apps/blockchain-node
/opt/aitbc/venv/bin/python scripts/create_genesis_wallets.py \
@@ -92,20 +92,20 @@ openclaw execute --agent WalletAgent --task create_genesis_wallets || {
--wallets "aitbcgenesis,devfund,communityfund"
}
# 8. Start blockchain services (via OpenClaw)
echo "8. Starting blockchain services via OpenClaw GenesisAgent..."
openclaw execute --agent GenesisAgent --task start_blockchain_services || {
echo "⚠️ OpenClaw service start failed - using manual method"
# 8. Start blockchain services (via hermes)
echo "8. Starting blockchain services via hermes GenesisAgent..."
hermes execute --agent GenesisAgent --task start_blockchain_services || {
echo "⚠️ hermes service start failed - using manual method"
systemctl start aitbc-blockchain-node.service
systemctl start aitbc-blockchain-rpc.service
systemctl enable aitbc-blockchain-node.service
systemctl enable aitbc-blockchain-rpc.service
}
# 9. Wait for services to be ready (via OpenClaw)
echo "9. Waiting for services to be ready via OpenClaw GenesisAgent..."
openclaw execute --agent GenesisAgent --task wait_for_services || {
echo "⚠️ OpenClaw service wait failed - using manual method"
# 9. Wait for services to be ready (via hermes)
echo "9. Waiting for services to be ready via hermes GenesisAgent..."
hermes execute --agent GenesisAgent --task wait_for_services || {
echo "⚠️ hermes service wait failed - using manual method"
sleep 10
# Wait for RPC service to be ready
for i in {1..30}; do
@@ -118,26 +118,26 @@ openclaw execute --agent GenesisAgent --task wait_for_services || {
done
}
# 10. Verify genesis block creation (via OpenClaw)
echo "10. Verifying genesis block creation via OpenClaw GenesisAgent..."
openclaw execute --agent GenesisAgent --task verify_genesis_block || {
echo "⚠️ OpenClaw genesis verification failed - using manual method"
# 10. Verify genesis block creation (via hermes)
echo "10. Verifying genesis block creation via hermes GenesisAgent..."
hermes execute --agent GenesisAgent --task verify_genesis_block || {
echo "⚠️ hermes genesis verification failed - using manual method"
curl -s http://localhost:8006/rpc/head | jq .
curl -s http://localhost:8006/rpc/info | jq .
curl -s http://localhost:8006/rpc/supply | jq .
}
# 11. Check genesis wallet balance (via OpenClaw)
echo "11. Checking genesis wallet balance via OpenClaw WalletAgent..."
openclaw execute --agent WalletAgent --task check_genesis_balance || {
echo "⚠️ OpenClaw balance check failed - using manual method"
# 11. Check genesis wallet balance (via hermes)
echo "11. Checking genesis wallet balance via hermes WalletAgent..."
hermes execute --agent WalletAgent --task check_genesis_balance || {
echo "⚠️ hermes balance check failed - using manual method"
GENESIS_ADDR=$(cat /var/lib/aitbc/keystore/aitbcgenesis.json | jq -r '.address')
curl -s "http://localhost:8006/rpc/getBalance/$GENESIS_ADDR" | jq .
}
# 12. Notify CoordinatorAgent of completion (via OpenClaw)
# 12. Notify CoordinatorAgent of completion (via hermes)
echo "12. Notifying CoordinatorAgent of genesis setup completion..."
openclaw execute --agent GenesisAgent --task notify_coordinator --payload '{
hermes execute --agent GenesisAgent --task notify_coordinator --payload '{
"status": "genesis_setup_completed",
"node": "aitbc",
"genesis_block": true,
@@ -145,15 +145,15 @@ openclaw execute --agent GenesisAgent --task notify_coordinator --payload '{
"wallets_created": true,
"timestamp": "'$(date -Iseconds)'"
}' || {
echo "⚠️ OpenClaw notification failed - using mock notification"
echo "genesis_setup_completed" > /var/lib/openclaw/genesis_setup.status
echo "⚠️ hermes notification failed - using mock notification"
echo "genesis_setup_completed" > /var/lib/hermes/genesis_setup.status
}
# 13. Generate genesis setup report
echo "13. Generating genesis setup report..."
openclaw report --agent GenesisAgent --task genesis_setup --format json > /tmp/openclaw_genesis_report.json || {
echo "⚠️ OpenClaw report generation failed - using mock report"
cat > /tmp/openclaw_genesis_report.json << 'EOF'
hermes report --agent GenesisAgent --task genesis_setup --format json > /tmp/hermes_genesis_report.json || {
echo "⚠️ hermes report generation failed - using mock report"
cat > /tmp/hermes_genesis_report.json << 'EOF'
{
"status": "completed",
"node": "aitbc",
@@ -170,13 +170,13 @@ EOF
# 14. Verify agent coordination
echo "14. Verifying agent coordination..."
openclaw execute --agent CoordinatorAgent --task verify_genesis_completion || {
echo "⚠️ OpenClaw coordination verification failed - using mock verification"
hermes execute --agent CoordinatorAgent --task verify_genesis_completion || {
echo "⚠️ hermes coordination verification failed - using mock verification"
echo "✅ Genesis setup completed successfully"
}
echo "✅ OpenClaw Genesis Authority Setup Completed!"
echo "📊 Report saved to: /tmp/openclaw_genesis_report.json"
echo "✅ hermes Genesis Authority Setup Completed!"
echo "📊 Report saved to: /tmp/hermes_genesis_report.json"
echo "🤖 Genesis node ready for follower synchronization"
# Display current status
@@ -187,5 +187,5 @@ curl -s http://localhost:8006/health 2>/dev/null | jq '.status' || echo "Health
# Display agent status
echo ""
echo "=== OpenClaw Agent Status ==="
openclaw status --agent GenesisAgent 2>/dev/null || echo "Agent status unavailable"
echo "=== hermes Agent Status ==="
hermes status --agent GenesisAgent 2>/dev/null || echo "Agent status unavailable"

View File

@@ -1,21 +1,21 @@
#!/bin/bash
# OpenClaw Follower Node Setup Script for AITBC Node
# This script uses OpenClaw agents to configure aitbc1 as a follower node
# hermes Follower Node Setup Script for AITBC Node
# This script uses hermes agents to configure aitbc1 as a follower node
set -e # Exit on any error
echo "=== OpenClaw AITBC Follower Node Setup (aitbc1) ==="
echo "=== hermes AITBC Follower Node Setup (aitbc1) ==="
# 1. Initialize OpenClaw FollowerAgent
echo "1. Initializing OpenClaw FollowerAgent..."
openclaw execute --agent FollowerAgent --task initialize_follower_setup || {
echo "⚠️ OpenClaw FollowerAgent initialization failed - using manual method"
# 1. Initialize hermes FollowerAgent
echo "1. Initializing hermes FollowerAgent..."
hermes execute --agent FollowerAgent --task initialize_follower_setup || {
echo "⚠️ hermes FollowerAgent initialization failed - using manual method"
}
# 2. Connect to aitbc1 node (via OpenClaw)
echo "2. Connecting to aitbc1 node via OpenClaw FollowerAgent..."
openclaw execute --agent FollowerAgent --task connect_to_node --node aitbc1 || {
echo "⚠️ OpenClaw node connection failed - using SSH method"
# 2. Connect to aitbc1 node (via hermes)
echo "2. Connecting to aitbc1 node via hermes FollowerAgent..."
hermes execute --agent FollowerAgent --task connect_to_node --node aitbc1 || {
echo "⚠️ hermes node connection failed - using SSH method"
# Verify SSH connection to aitbc1
ssh aitbc1 'echo "Connected to aitbc1"' || {
echo "❌ Failed to connect to aitbc1"
@@ -23,32 +23,32 @@ openclaw execute --agent FollowerAgent --task connect_to_node --node aitbc1 || {
}
}
# 3. Pull latest code on aitbc1 (via OpenClaw)
echo "3. Pulling latest code on aitbc1 via OpenClaw FollowerAgent..."
openclaw execute --agent FollowerAgent --task pull_latest_code --node aitbc1 || {
echo "⚠️ OpenClaw code pull failed - using SSH method"
# 3. Pull latest code on aitbc1 (via hermes)
echo "3. Pulling latest code on aitbc1 via hermes FollowerAgent..."
hermes execute --agent FollowerAgent --task pull_latest_code --node aitbc1 || {
echo "⚠️ hermes code pull failed - using SSH method"
ssh aitbc1 'cd /opt/aitbc && git pull origin main'
}
# 4. Install/update dependencies on aitbc1 (via OpenClaw)
echo "4. Installing/updating dependencies on aitbc1 via OpenClaw FollowerAgent..."
openclaw execute --agent FollowerAgent --task update_dependencies --node aitbc1 || {
echo "⚠️ OpenClaw dependency update failed - using SSH method"
# 4. Install/update dependencies on aitbc1 (via hermes)
echo "4. Installing/updating dependencies on aitbc1 via hermes FollowerAgent..."
hermes execute --agent FollowerAgent --task update_dependencies --node aitbc1 || {
echo "⚠️ hermes dependency update failed - using SSH method"
ssh aitbc1 '/opt/aitbc/venv/bin/pip install -r requirements.txt'
}
# 5. Create required directories on aitbc1 (via OpenClaw)
echo "5. Creating required directories on aitbc1 via OpenClaw FollowerAgent..."
openclaw execute --agent FollowerAgent --task create_directories --node aitbc1 || {
echo "⚠️ OpenClaw directory creation failed - using SSH method"
# 5. Create required directories on aitbc1 (via hermes)
echo "5. Creating required directories on aitbc1 via hermes FollowerAgent..."
hermes execute --agent FollowerAgent --task create_directories --node aitbc1 || {
echo "⚠️ hermes directory creation failed - using SSH method"
ssh aitbc1 'mkdir -p /var/lib/aitbc/data /var/lib/aitbc/keystore /etc/aitbc /var/log/aitbc'
ssh aitbc1 'ls -la /var/lib/aitbc/ || echo "Creating /var/lib/aitbc/ structure..."'
}
# 6. Update environment configuration on aitbc1 (via OpenClaw)
echo "6. Updating environment configuration on aitbc1 via OpenClaw FollowerAgent..."
openclaw execute --agent FollowerAgent --task update_follower_config --node aitbc1 || {
echo "⚠️ OpenClaw config update failed - using SSH method"
# 6. Update environment configuration on aitbc1 (via hermes)
echo "6. Updating environment configuration on aitbc1 via hermes FollowerAgent..."
hermes execute --agent FollowerAgent --task update_follower_config --node aitbc1 || {
echo "⚠️ hermes config update failed - using SSH method"
ssh aitbc1 'cp /etc/aitbc/blockchain.env /etc/aitbc/blockchain.env.aitbc1.backup 2>/dev/null || true'
# Update .env for aitbc1 follower configuration
@@ -81,28 +81,28 @@ openclaw execute --agent FollowerAgent --task update_follower_config --node aitb
ssh aitbc1 'echo "trusted_proposers=aitbcgenesis" >> /etc/aitbc/.env'
}
# 7. Copy keystore password file to aitbc1 (via OpenClaw)
echo "7. Copying keystore password file to aitbc1 via OpenClaw FollowerAgent..."
openclaw execute --agent FollowerAgent --task copy_keystore_password --node aitbc1 || {
echo "⚠️ OpenClaw keystore copy failed - using SCP method"
# 7. Copy keystore password file to aitbc1 (via hermes)
echo "7. Copying keystore password file to aitbc1 via hermes FollowerAgent..."
hermes execute --agent FollowerAgent --task copy_keystore_password --node aitbc1 || {
echo "⚠️ hermes keystore copy failed - using SCP method"
scp /var/lib/aitbc/keystore/.password aitbc1:/var/lib/aitbc/keystore/.password
ssh aitbc1 'chmod 600 /var/lib/aitbc/keystore/.password'
}
# 8. Start blockchain services on aitbc1 (via OpenClaw)
echo "8. Starting blockchain services on aitbc1 via OpenClaw FollowerAgent..."
openclaw execute --agent FollowerAgent --task start_blockchain_services --node aitbc1 || {
echo "⚠️ OpenClaw service start failed - using SSH method"
# 8. Start blockchain services on aitbc1 (via hermes)
echo "8. Starting blockchain services on aitbc1 via hermes FollowerAgent..."
hermes execute --agent FollowerAgent --task start_blockchain_services --node aitbc1 || {
echo "⚠️ hermes service start failed - using SSH method"
ssh aitbc1 'systemctl start aitbc-blockchain-node.service'
ssh aitbc1 'systemctl start aitbc-blockchain-rpc.service'
ssh aitbc1 'systemctl enable aitbc-blockchain-node.service'
ssh aitbc1 'systemctl enable aitbc-blockchain-rpc.service'
}
# 9. Wait for services to be ready on aitbc1 (via OpenClaw)
echo "9. Waiting for services to be ready on aitbc1 via OpenClaw FollowerAgent..."
openclaw execute --agent FollowerAgent --task wait_for_services --node aitbc1 || {
echo "⚠️ OpenClaw service wait failed - using SSH method"
# 9. Wait for services to be ready on aitbc1 (via hermes)
echo "9. Waiting for services to be ready on aitbc1 via hermes FollowerAgent..."
hermes execute --agent FollowerAgent --task wait_for_services --node aitbc1 || {
echo "⚠️ hermes service wait failed - using SSH method"
ssh aitbc1 'sleep 10'
# Wait for RPC service to be ready on aitbc1
for i in {1..30}; do
@@ -115,26 +115,26 @@ openclaw execute --agent FollowerAgent --task wait_for_services --node aitbc1 ||
done
}
# 10. Establish connection to genesis node (via OpenClaw)
echo "10. Establishing connection to genesis node via OpenClaw FollowerAgent..."
openclaw execute --agent FollowerAgent --task connect_to_genesis --node aitbc1 || {
echo "⚠️ OpenClaw genesis connection failed - using manual method"
# 10. Establish connection to genesis node (via hermes)
echo "10. Establishing connection to genesis node via hermes FollowerAgent..."
hermes execute --agent FollowerAgent --task connect_to_genesis --node aitbc1 || {
echo "⚠️ hermes genesis connection failed - using manual method"
# Test connection from aitbc1 to aitbc
ssh aitbc1 'curl -s http://aitbc:8006/health | jq .status' || echo "⚠️ Cannot reach genesis node"
}
# 11. Start blockchain sync process (via OpenClaw)
echo "11. Starting blockchain sync process via OpenClaw FollowerAgent..."
openclaw execute --agent FollowerAgent --task start_sync --node aitbc1 || {
echo "⚠️ OpenClaw sync start failed - using manual method"
# 11. Start blockchain sync process (via hermes)
echo "11. Starting blockchain sync process via hermes FollowerAgent..."
hermes execute --agent FollowerAgent --task start_sync --node aitbc1 || {
echo "⚠️ hermes sync start failed - using manual method"
# Trigger sync process
ssh aitbc1 'curl -X POST http://localhost:8006/rpc/sync -H "Content-Type: application/json" -d "{\"peer\":\"aitbc:8006\"}"'
}
# 12. Monitor sync progress (via OpenClaw)
echo "12. Monitoring sync progress via OpenClaw FollowerAgent..."
openclaw execute --agent FollowerAgent --task monitor_sync --node aitbc1 || {
echo "⚠️ OpenClaw sync monitoring failed - using manual method"
# 12. Monitor sync progress (via hermes)
echo "12. Monitoring sync progress via hermes FollowerAgent..."
hermes execute --agent FollowerAgent --task monitor_sync --node aitbc1 || {
echo "⚠️ hermes sync monitoring failed - using manual method"
# Monitor sync progress manually
for i in {1..60}; do
FOLLOWER_HEIGHT=$(ssh aitbc1 'curl -s http://localhost:8006/rpc/head | jq .height 2>/dev/null || echo 0')
@@ -150,10 +150,10 @@ openclaw execute --agent FollowerAgent --task monitor_sync --node aitbc1 || {
done
}
# 13. Verify sync status (via OpenClaw)
echo "13. Verifying sync status via OpenClaw FollowerAgent..."
openclaw execute --agent FollowerAgent --task verify_sync --node aitbc1 || {
echo "⚠️ OpenClaw sync verification failed - using manual method"
# 13. Verify sync status (via hermes)
echo "13. Verifying sync status via hermes FollowerAgent..."
hermes execute --agent FollowerAgent --task verify_sync --node aitbc1 || {
echo "⚠️ hermes sync verification failed - using manual method"
# Verify sync status
FOLLOWER_HEAD=$(ssh aitbc1 'curl -s http://localhost:8006/rpc/head')
GENESIS_HEAD=$(curl -s http://localhost:8006/rpc/head)
@@ -165,9 +165,9 @@ openclaw execute --agent FollowerAgent --task verify_sync --node aitbc1 || {
echo "$GENESIS_HEAD" | jq .
}
# 14. Notify CoordinatorAgent of completion (via OpenClaw)
# 14. Notify CoordinatorAgent of completion (via hermes)
echo "14. Notifying CoordinatorAgent of follower setup completion..."
openclaw execute --agent FollowerAgent --task notify_coordinator --payload '{
hermes execute --agent FollowerAgent --task notify_coordinator --payload '{
"status": "follower_setup_completed",
"node": "aitbc1",
"sync_completed": true,
@@ -175,15 +175,15 @@ openclaw execute --agent FollowerAgent --task notify_coordinator --payload '{
"genesis_connected": true,
"timestamp": "'$(date -Iseconds)'"
}' || {
echo "⚠️ OpenClaw notification failed - using mock notification"
echo "follower_setup_completed" > /var/lib/openclaw/follower_setup.status
echo "⚠️ hermes notification failed - using mock notification"
echo "follower_setup_completed" > /var/lib/hermes/follower_setup.status
}
# 15. Generate follower setup report
echo "15. Generating follower setup report..."
openclaw report --agent FollowerAgent --task follower_setup --format json > /tmp/openclaw_follower_report.json || {
echo "⚠️ OpenClaw report generation failed - using mock report"
cat > /tmp/openclaw_follower_report.json << 'EOF'
hermes report --agent FollowerAgent --task follower_setup --format json > /tmp/hermes_follower_report.json || {
echo "⚠️ hermes report generation failed - using mock report"
cat > /tmp/hermes_follower_report.json << 'EOF'
{
"status": "completed",
"node": "aitbc1",
@@ -200,13 +200,13 @@ EOF
# 16. Verify agent coordination
echo "16. Verifying agent coordination..."
openclaw execute --agent CoordinatorAgent --task verify_follower_completion || {
echo "⚠️ OpenClaw coordination verification failed - using mock verification"
hermes execute --agent CoordinatorAgent --task verify_follower_completion || {
echo "⚠️ hermes coordination verification failed - using mock verification"
echo "✅ Follower setup completed successfully"
}
echo "✅ OpenClaw Follower Node Setup Completed!"
echo "📊 Report saved to: /tmp/openclaw_follower_report.json"
echo "✅ hermes Follower Node Setup Completed!"
echo "📊 Report saved to: /tmp/hermes_follower_report.json"
echo "🤖 Follower node ready for wallet operations"
# Display current status
@@ -225,5 +225,5 @@ echo "Follower Height: $FOLLOWER_HEIGHT"
# Display agent status
echo ""
echo "=== OpenClaw Agent Status ==="
openclaw status --agent FollowerAgent 2>/dev/null || echo "Agent status unavailable"
echo "=== hermes Agent Status ==="
hermes status --agent FollowerAgent 2>/dev/null || echo "Agent status unavailable"

View File

@@ -1,21 +1,21 @@
#!/bin/bash
# OpenClaw Wallet Operations Script for AITBC Multi-Node Blockchain
# This script uses OpenClaw agents to create wallets and execute cross-node transactions
# hermes Wallet Operations Script for AITBC Multi-Node Blockchain
# This script uses hermes agents to create wallets and execute cross-node transactions
set -e # Exit on any error
echo "=== OpenClaw AITBC Wallet Operations ==="
echo "=== hermes AITBC Wallet Operations ==="
# 1. Initialize OpenClaw WalletAgent
echo "1. Initializing OpenClaw WalletAgent..."
openclaw execute --agent WalletAgent --task initialize_wallet_operations || {
echo "⚠️ OpenClaw WalletAgent initialization failed - using manual method"
# 1. Initialize hermes WalletAgent
echo "1. Initializing hermes WalletAgent..."
hermes execute --agent WalletAgent --task initialize_wallet_operations || {
echo "⚠️ hermes WalletAgent initialization failed - using manual method"
}
# 2. Create wallets on both nodes (via OpenClaw)
echo "2. Creating wallets on both nodes via OpenClaw WalletAgent..."
openclaw execute --agent WalletAgent --task create_cross_node_wallets || {
echo "⚠️ OpenClaw wallet creation failed - using manual method"
# 2. Create wallets on both nodes (via hermes)
echo "2. Creating wallets on both nodes via hermes WalletAgent..."
hermes execute --agent WalletAgent --task create_cross_node_wallets || {
echo "⚠️ hermes wallet creation failed - using manual method"
# Create client wallet on aitbc
cd /opt/aitbc
@@ -29,10 +29,10 @@ openclaw execute --agent WalletAgent --task create_cross_node_wallets || {
./aitbc-cli wallet create user-wallet --type simple
}
# 3. List created wallets (via OpenClaw)
echo "3. Listing created wallets via OpenClaw WalletAgent..."
openclaw execute --agent WalletAgent --task list_wallets || {
echo "⚠️ OpenClaw wallet listing failed - using manual method"
# 3. List created wallets (via hermes)
echo "3. Listing created wallets via hermes WalletAgent..."
hermes execute --agent WalletAgent --task list_wallets || {
echo "⚠️ hermes wallet listing failed - using manual method"
echo "=== Wallets on aitbc ==="
cd /opt/aitbc
source venv/bin/activate
@@ -42,10 +42,10 @@ openclaw execute --agent WalletAgent --task list_wallets || {
ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli wallet list'
}
# 4. Get wallet addresses (via OpenClaw)
echo "4. Getting wallet addresses via OpenClaw WalletAgent..."
openclaw execute --agent WalletAgent --task get_wallet_addresses || {
echo "⚠️ OpenClaw address retrieval failed - using manual method"
# 4. Get wallet addresses (via hermes)
echo "4. Getting wallet addresses via hermes WalletAgent..."
hermes execute --agent WalletAgent --task get_wallet_addresses || {
echo "⚠️ hermes address retrieval failed - using manual method"
# Get client wallet address
CLIENT_ADDR=$(cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli wallet address --wallet client-wallet)
@@ -65,10 +65,10 @@ openclaw execute --agent WalletAgent --task get_wallet_addresses || {
echo "Genesis Wallet: $GENESIS_ADDR"
}
# 5. Fund wallets from genesis (via OpenClaw)
echo "5. Funding wallets from genesis via OpenClaw WalletAgent..."
openclaw execute --agent WalletAgent --task fund_wallets_from_genesis || {
echo "⚠️ OpenClaw wallet funding failed - using manual method"
# 5. Fund wallets from genesis (via hermes)
echo "5. Funding wallets from genesis via hermes WalletAgent..."
hermes execute --agent WalletAgent --task fund_wallets_from_genesis || {
echo "⚠️ hermes wallet funding failed - using manual method"
cd /opt/aitbc
source venv/bin/activate
@@ -83,10 +83,10 @@ openclaw execute --agent WalletAgent --task fund_wallets_from_genesis || {
sleep 10
}
# 6. Verify wallet balances (via OpenClaw)
echo "6. Verifying wallet balances via OpenClaw WalletAgent..."
openclaw execute --agent WalletAgent --task verify_wallet_balances || {
echo "⚠️ OpenClaw balance verification failed - using manual method"
# 6. Verify wallet balances (via hermes)
echo "6. Verifying wallet balances via hermes WalletAgent..."
hermes execute --agent WalletAgent --task verify_wallet_balances || {
echo "⚠️ hermes balance verification failed - using manual method"
echo "=== Wallet Balances ==="
cd /opt/aitbc
@@ -105,10 +105,10 @@ openclaw execute --agent WalletAgent --task verify_wallet_balances || {
ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli wallet balance --wallet miner-wallet'
}
# 7. Execute cross-node transaction (via OpenClaw)
echo "7. Executing cross-node transaction via OpenClaw WalletAgent..."
openclaw execute --agent WalletAgent --task execute_cross_node_transaction || {
echo "⚠️ OpenClaw cross-node transaction failed - using manual method"
# 7. Execute cross-node transaction (via hermes)
echo "7. Executing cross-node transaction via hermes WalletAgent..."
hermes execute --agent WalletAgent --task execute_cross_node_transaction || {
echo "⚠️ hermes cross-node transaction failed - using manual method"
cd /opt/aitbc
source venv/bin/activate
@@ -124,10 +124,10 @@ openclaw execute --agent WalletAgent --task execute_cross_node_transaction || {
sleep 15
}
# 8. Monitor transaction confirmation (via OpenClaw)
echo "8. Monitoring transaction confirmation via OpenClaw WalletAgent..."
openclaw execute --agent WalletAgent --task monitor_transaction_confirmation || {
echo "⚠️ OpenClaw transaction monitoring failed - using manual method"
# 8. Monitor transaction confirmation (via hermes)
echo "8. Monitoring transaction confirmation via hermes WalletAgent..."
hermes execute --agent WalletAgent --task monitor_transaction_confirmation || {
echo "⚠️ hermes transaction monitoring failed - using manual method"
cd /opt/aitbc
source venv/bin/activate
@@ -141,10 +141,10 @@ openclaw execute --agent WalletAgent --task monitor_transaction_confirmation ||
ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli wallet balance --wallet miner-wallet'
}
# 9. Verify transaction on both nodes (via OpenClaw)
echo "9. Verifying transaction on both nodes via OpenClaw WalletAgent..."
openclaw execute --agent WalletAgent --task verify_transaction_on_nodes || {
echo "⚠️ OpenClaw transaction verification failed - using manual method"
# 9. Verify transaction on both nodes (via hermes)
echo "9. Verifying transaction on both nodes via hermes WalletAgent..."
hermes execute --agent WalletAgent --task verify_transaction_on_nodes || {
echo "⚠️ hermes transaction verification failed - using manual method"
echo "=== Transaction Verification on aitbc ==="
cd /opt/aitbc
@@ -155,10 +155,10 @@ openclaw execute --agent WalletAgent --task verify_transaction_on_nodes || {
ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli transaction list --limit 3'
}
# 10. Test wallet switching (via OpenClaw)
echo "10. Testing wallet switching via OpenClaw WalletAgent..."
openclaw execute --agent WalletAgent --task test_wallet_switching || {
echo "⚠️ OpenClaw wallet switching test failed - using manual method"
# 10. Test wallet switching (via hermes)
echo "10. Testing wallet switching via hermes WalletAgent..."
hermes execute --agent WalletAgent --task test_wallet_switching || {
echo "⚠️ hermes wallet switching test failed - using manual method"
cd /opt/aitbc
source venv/bin/activate
@@ -174,10 +174,10 @@ openclaw execute --agent WalletAgent --task test_wallet_switching || {
ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli wallet switch miner-wallet && ./aitbc-cli wallet balance'
}
# 11. Create additional test wallets (via OpenClaw)
echo "11. Creating additional test wallets via OpenClaw WalletAgent..."
openclaw execute --agent WalletAgent --task create_test_wallets || {
echo "⚠️ OpenClaw test wallet creation failed - using manual method"
# 11. Create additional test wallets (via hermes)
echo "11. Creating additional test wallets via hermes WalletAgent..."
hermes execute --agent WalletAgent --task create_test_wallets || {
echo "⚠️ hermes test wallet creation failed - using manual method"
cd /opt/aitbc
source venv/bin/activate
@@ -189,9 +189,9 @@ openclaw execute --agent WalletAgent --task create_test_wallets || {
ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli wallet create validator-wallet --type simple'
}
# 12. Notify CoordinatorAgent of completion (via OpenClaw)
# 12. Notify CoordinatorAgent of completion (via hermes)
echo "12. Notifying CoordinatorAgent of wallet operations completion..."
openclaw execute --agent WalletAgent --task notify_coordinator --payload '{
hermes execute --agent WalletAgent --task notify_coordinator --payload '{
"status": "wallet_operations_completed",
"wallets_created": 6,
"cross_node_transactions": 1,
@@ -199,15 +199,15 @@ openclaw execute --agent WalletAgent --task notify_coordinator --payload '{
"wallet_switching_tested": true,
"timestamp": "'$(date -Iseconds)'"
}' || {
echo "⚠️ OpenClaw notification failed - using mock notification"
echo "wallet_operations_completed" > /var/lib/openclaw/wallet_operations.status
echo "⚠️ hermes notification failed - using mock notification"
echo "wallet_operations_completed" > /var/lib/hermes/wallet_operations.status
}
# 13. Generate wallet operations report
echo "13. Generating wallet operations report..."
openclaw report --agent WalletAgent --task wallet_operations --format json > /tmp/openclaw_wallet_report.json || {
echo "⚠️ OpenClaw report generation failed - using mock report"
cat > /tmp/openclaw_wallet_report.json << 'EOF'
hermes report --agent WalletAgent --task wallet_operations --format json > /tmp/hermes_wallet_report.json || {
echo "⚠️ hermes report generation failed - using mock report"
cat > /tmp/hermes_wallet_report.json << 'EOF'
{
"status": "completed",
"wallets_created": 6,
@@ -222,13 +222,13 @@ EOF
# 14. Verify agent coordination
echo "14. Verifying agent coordination..."
openclaw execute --agent CoordinatorAgent --task verify_wallet_operations_completion || {
echo "⚠️ OpenClaw coordination verification failed - using mock verification"
hermes execute --agent CoordinatorAgent --task verify_wallet_operations_completion || {
echo "⚠️ hermes coordination verification failed - using mock verification"
echo "✅ Wallet operations completed successfully"
}
echo "✅ OpenClaw Wallet Operations Completed!"
echo "📊 Report saved to: /tmp/openclaw_wallet_report.json"
echo "✅ hermes Wallet Operations Completed!"
echo "📊 Report saved to: /tmp/hermes_wallet_report.json"
echo "🤖 Multi-node wallet system ready for operations"
# Display final wallet status
@@ -250,5 +250,5 @@ echo "=== Recent Transactions (Cross-Node Verified) ==="
# Display agent status
echo ""
echo "=== OpenClaw Agent Status ==="
openclaw status --agent WalletAgent 2>/dev/null || echo "Agent status unavailable"
echo "=== hermes Agent Status ==="
hermes status --agent WalletAgent 2>/dev/null || echo "Agent status unavailable"

View File

@@ -1,21 +1,21 @@
#!/bin/bash
# OpenClaw Wallet Operations Script for AITBC Multi-Node Blockchain (Corrected)
# This script uses OpenClaw agents and correct CLI commands for wallet operations
# hermes Wallet Operations Script for AITBC Multi-Node Blockchain (Corrected)
# This script uses hermes agents and correct CLI commands for wallet operations
set -e # Exit on any error
echo "=== OpenClaw AITBC Wallet Operations (Corrected) ==="
echo "=== hermes AITBC Wallet Operations (Corrected) ==="
# 1. Initialize OpenClaw Agent Communication
echo "1. Initializing OpenClaw Agent Communication..."
echo "Using OpenClaw agent for wallet operations coordination..."
# 1. Initialize hermes Agent Communication
echo "1. Initializing hermes Agent Communication..."
echo "Using hermes agent for wallet operations coordination..."
# Create a session for agent operations
SESSION_ID="wallet-workflow-$(date +%s)"
# Test agent communication with session
openclaw agent --agent main --session-id $SESSION_ID --message "Initialize wallet operations for multi-node blockchain deployment" --thinking low > /dev/null
echo "✅ OpenClaw agent communication established"
hermes agent --agent main --session-id $SESSION_ID --message "Initialize wallet operations for multi-node blockchain deployment" --thinking low > /dev/null
echo "✅ hermes agent communication established"
echo "Session ID: $SESSION_ID"
# 2. Create wallets using correct CLI commands
@@ -144,14 +144,14 @@ echo "Testing wallet switching on aitbc..."
# Note: CLI doesn't seem to have a switch command, but we can verify all wallets work
echo "All wallets accessible and functional"
# 12. Use OpenClaw agent for analysis
echo "12. Using OpenClaw agent for wallet operations analysis..."
openclaw agent --agent main --session-id $SESSION_ID --message "Analyze wallet operations results for multi-node blockchain deployment. Cross-node transactions completed, wallet balances verified." --thinking medium > /dev/null
echo "✅ OpenClaw agent analysis completed"
# 12. Use hermes agent for analysis
echo "12. Using hermes agent for wallet operations analysis..."
hermes agent --agent main --session-id $SESSION_ID --message "Analyze wallet operations results for multi-node blockchain deployment. Cross-node transactions completed, wallet balances verified." --thinking medium > /dev/null
echo "✅ hermes agent analysis completed"
# 13. Generate wallet operations report
echo "13. Generating wallet operations report..."
cat > /tmp/openclaw_wallet_report.json << EOF
cat > /tmp/hermes_wallet_report.json << EOF
{
"status": "completed",
"wallets_created": 3,
@@ -178,8 +178,8 @@ cat > /tmp/openclaw_wallet_report.json << EOF
}
EOF
echo "✅ OpenClaw Wallet Operations Completed!"
echo "📊 Report saved to: /tmp/openclaw_wallet_report.json"
echo "✅ hermes Wallet Operations Completed!"
echo "📊 Report saved to: /tmp/hermes_wallet_report.json"
echo "🤖 Multi-node wallet system ready for operations"
# Display final summary
@@ -188,12 +188,12 @@ echo "=== Final Wallet Summary ==="
echo "Total wallets created: 3"
echo "Cross-node transactions: 1"
echo "Nodes involved: aitbc, aitbc1"
echo "OpenClaw agent coordination: ✅"
echo "hermes agent coordination: ✅"
# Display agent status
echo ""
echo "=== OpenClaw Agent Status ==="
openclaw agents list | head -10
echo "=== hermes Agent Status ==="
hermes agents list | head -10
# Display blockchain status
echo ""

View File

@@ -1,11 +1,11 @@
#!/bin/bash
# OpenClaw Complete Multi-Node Blockchain Workflow
# Hermes Complete Multi-Node Blockchain Workflow
# Updated 2026-03-30: Complete AI operations, advanced coordination, genesis reset
# This script orchestrates all OpenClaw agents for complete multi-node blockchain deployment
# This script orchestrates all Hermes agents for complete multi-node blockchain deployment
set -e # Exit on any error
echo "=== OpenClaw Complete Multi-Node Blockchain Workflow v4.0 ==="
echo "=== Hermes Complete Multi-Node Blockchain Workflow v4.0 ==="
# Configuration
GENESIS_NODE="aitbc"
@@ -39,19 +39,19 @@ error() {
exit 1
}
# 1. Initialize OpenClaw CoordinatorAgent
echo "1. Initializing OpenClaw CoordinatorAgent..."
openclaw execute --agent CoordinatorAgent --task initialize_complete_workflow || {
echo "⚠️ OpenClaw CoordinatorAgent initialization failed - using manual coordination"
# 1. Initialize Hermes CoordinatorAgent
echo "1. Initializing Hermes CoordinatorAgent..."
hermes execute --agent CoordinatorAgent --task initialize_complete_workflow || {
echo "⚠️ Hermes CoordinatorAgent initialization failed - using manual coordination"
}
# 2. Execute Pre-Flight Setup
echo "2. Executing Pre-Flight Setup..."
echo "🤖 Running: 01_preflight_setup_openclaw.sh"
/opt/aitbc/scripts/workflow-openclaw/01_preflight_setup_openclaw.sh
echo "🤖 Running: 01_preflight_setup_hermes.sh"
/opt/aitbc/scripts/workflow-hermes/01_preflight_setup_hermes.sh
# Verify pre-flight completion
if [ ! -f /tmp/openclaw_preflight_report.json ]; then
if [ ! -f /tmp/hermes_preflight_report.json ]; then
echo "❌ Pre-flight setup failed - report not found"
exit 1
fi
@@ -60,11 +60,11 @@ echo "✅ Pre-flight setup completed"
# 3. Execute Genesis Authority Setup
echo "3. Executing Genesis Authority Setup..."
echo "🤖 Running: 02_genesis_authority_setup_openclaw.sh"
/opt/aitbc/scripts/workflow-openclaw/02_genesis_authority_setup_openclaw.sh
echo "🤖 Running: 02_genesis_authority_setup_hermes.sh"
/opt/aitbc/scripts/workflow-hermes/02_genesis_authority_setup_hermes.sh
# Verify genesis setup completion
if [ ! -f /tmp/openclaw_genesis_report.json ]; then
if [ ! -f /tmp/hermes_genesis_report.json ]; then
echo "❌ Genesis setup failed - report not found"
exit 1
fi
@@ -73,11 +73,11 @@ echo "✅ Genesis authority setup completed"
# 4. Execute Follower Node Setup
echo "4. Executing Follower Node Setup..."
echo "🤖 Running: 03_follower_node_setup_openclaw.sh"
/opt/aitbc/scripts/workflow-openclaw/03_follower_node_setup_openclaw.sh
echo "🤖 Running: 03_follower_node_setup_hermes.sh"
/opt/aitbc/scripts/workflow-hermes/03_follower_node_setup_hermes.sh
# Verify follower setup completion
if [ ! -f /tmp/openclaw_follower_report.json ]; then
if [ ! -f /tmp/hermes_follower_report.json ]; then
echo "❌ Follower setup failed - report not found"
exit 1
fi
@@ -86,21 +86,21 @@ echo "✅ Follower node setup completed"
# 5. Execute Wallet Operations
echo "5. Executing Wallet Operations..."
echo "🤖 Running: 04_wallet_operations_openclaw.sh"
/opt/aitbc/scripts/workflow-openclaw/04_wallet_operations_openclaw.sh
echo "🤖 Running: 04_wallet_operations_hermes.sh"
/opt/aitbc/scripts/workflow-hermes/04_wallet_operations_hermes.sh
# Verify wallet operations completion
if [ ! -f /tmp/openclaw_wallet_report.json ]; then
if [ ! -f /tmp/hermes_wallet_report.json ]; then
echo "❌ Wallet operations failed - report not found"
exit 1
fi
echo "✅ Wallet operations completed"
# 6. Comprehensive Verification via OpenClaw
echo "6. Running comprehensive verification via OpenClaw CoordinatorAgent..."
openclaw execute --agent CoordinatorAgent --task comprehensive_verification || {
echo "⚠️ OpenClaw comprehensive verification failed - using manual verification"
# 6. Comprehensive Verification via Hermes
echo "6. Running comprehensive verification via Hermes CoordinatorAgent..."
hermes execute --agent CoordinatorAgent --task comprehensive_verification || {
echo "⚠️ Hermes comprehensive verification failed - using manual verification"
# Manual verification as fallback
echo "=== Manual Verification ==="
@@ -124,8 +124,8 @@ openclaw execute --agent CoordinatorAgent --task comprehensive_verification || {
echo "Total wallets created:"
./aitbc-cli wallet list | wc -l
# Check OpenClaw agent status
openclaw status --agent all
# Check Hermes agent status
hermes status --agent all
# Check blockchain height
echo "Blockchain Height:"
@@ -168,10 +168,10 @@ openclaw execute --agent CoordinatorAgent --task comprehensive_verification || {
python3 /tmp/aitbc1_heartbeat.py
}
# 7. Performance Testing via OpenClaw
echo "7. Running performance testing via OpenClaw..."
openclaw execute --agent CoordinatorAgent --task performance_testing || {
echo "⚠️ OpenClaw performance testing failed - using manual testing"
# 7. Performance Testing via Hermes
echo "7. Running performance testing via Hermes..."
hermes execute --agent CoordinatorAgent --task performance_testing || {
echo "⚠️ Hermes performance testing failed - using manual testing"
# Manual performance testing
echo "=== Manual Performance Testing ==="
@@ -193,10 +193,10 @@ openclaw execute --agent CoordinatorAgent --task performance_testing || {
time ./aitbc-cli wallet send 1 $USER_ADDR "Performance test transaction"
}
# 8. Network Health Check via OpenClaw
echo "8. Running network health check via OpenClaw..."
openclaw execute --agent CoordinatorAgent --task network_health_check || {
echo "⚠️ OpenClaw health check failed - using manual health check"
# 8. Network Health Check via Hermes
echo "8. Running network health check via Hermes..."
hermes execute --agent CoordinatorAgent --task network_health_check || {
echo "⚠️ Hermes health check failed - using manual health check"
# Manual health check
echo "=== Manual Network Health Check ==="
@@ -223,13 +223,13 @@ openclaw execute --agent CoordinatorAgent --task network_health_check || {
fi
}
# 9. Generate Comprehensive Report via OpenClaw
echo "9. Generating comprehensive report via OpenClaw..."
openclaw report --workflow complete_multi_node --format json > /tmp/openclaw_complete_report.json || {
echo "⚠️ OpenClaw comprehensive report failed - using manual report generation"
# 9. Generate Comprehensive Report via Hermes
echo "9. Generating comprehensive report via Hermes..."
hermes report --workflow complete_multi_node --format json > /tmp/hermes_complete_report.json || {
echo "⚠️ Hermes comprehensive report failed - using manual report generation"
# Manual report generation
cat > /tmp/openclaw_complete_report.json << 'EOF'
cat > /tmp/hermes_complete_report.json << 'EOF'
{
"workflow_status": "completed",
"phases_completed": [
@@ -260,8 +260,8 @@ EOF
# 10. Final Agent Status Check
echo "10. Final agent status check..."
openclaw status --agent all || {
echo "⚠️ OpenClaw agent status check failed - using manual status"
hermes status --agent all || {
echo "⚠️ Hermes agent status check failed - using manual status"
echo "=== Manual Agent Status ==="
echo "CoordinatorAgent: ✅ Active"
echo "GenesisAgent: ✅ Active"
@@ -269,24 +269,24 @@ openclaw status --agent all || {
echo "WalletAgent: ✅ Active"
}
# 11. Cleanup and Finalization via OpenClaw
echo "11. Cleanup and finalization via OpenClaw..."
openclaw execute --agent CoordinatorAgent --task cleanup_and_finalize || {
echo "⚠️ OpenClaw cleanup failed - using manual cleanup"
# 11. Cleanup and Finalization via Hermes
echo "11. Cleanup and finalization via Hermes..."
hermes execute --agent CoordinatorAgent --task cleanup_and_finalize || {
echo "⚠️ Hermes cleanup failed - using manual cleanup"
# Manual cleanup
echo "=== Manual Cleanup ==="
# Clean temporary files
rm -f /tmp/openclaw_*.json
rm -f /tmp/hermes_*.json
# Reset agent status files
echo "workflow_completed" > /var/lib/openclaw/workflow.status
echo "workflow_completed" > /var/lib/hermes/workflow.status
}
# 12. Display Final Summary
echo ""
echo "🎉 OpenClaw Complete Multi-Node Blockchain Workflow Finished!"
echo "🎉 Hermes Complete Multi-Node Blockchain Workflow Finished!"
echo ""
echo "=== Final Summary ==="
@@ -320,15 +320,15 @@ echo "📈 Recent Transactions:"
# Display agent status
echo ""
echo "🤖 OpenClaw Agent Status:"
openclaw status --agent all 2>/dev/null || echo "Agent status: All agents active"
echo "🤖 Hermes Agent Status:"
hermes status --agent all 2>/dev/null || echo "Agent status: All agents active"
echo ""
echo "✅ Multi-node blockchain deployment completed successfully!"
echo "🚀 System ready for production operations"
# Save final report
FINAL_REPORT="/tmp/openclaw_final_report_$(date +%Y%m%d_%H%M%S).json"
FINAL_REPORT="/tmp/hermes_final_report_$(date +%Y%m%d_%H%M%S).json"
cat > "$FINAL_REPORT" << EOF
{
"workflow": "complete_multi_node_blockchain",

View File

@@ -1,11 +1,11 @@
#!/bin/bash
# OpenClaw Advanced AI Workflow Script
# hermes Advanced AI Workflow Script
# Updated 2026-03-30: Complete AI operations, advanced coordination, resource optimization
# This script orchestrates OpenClaw agents for advanced AI operations and resource management
# This script orchestrates hermes agents for advanced AI operations and resource management
set -e # Exit on any error
echo "=== OpenClaw Advanced AI Workflow v5.0 ==="
echo "=== hermes Advanced AI Workflow v5.0 ==="
echo "Advanced AI Teaching Plan - All Phases Completed"
echo "Phase 1: Advanced AI Workflow Orchestration ✅"
echo "Phase 2: Multi-Model AI Pipelines ✅"
@@ -57,23 +57,23 @@ echo "1. Initializing Advanced AI Coordinator..."
SESSION_ID="advanced-ai-$(date +%s)"
ai_log "Session ID: $SESSION_ID"
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "Initialize advanced AI workflow coordination with Phase 1-3 capabilities" \
--thinking high || {
echo "⚠️ OpenClaw CoordinatorAgent initialization failed - using manual coordination"
echo "⚠️ hermes CoordinatorAgent initialization failed - using manual coordination"
}
# 2. Advanced AI Operations - Phase 1: Workflow Orchestration
echo "2. Phase 1: Advanced AI Workflow Orchestration..."
ai_log "Session 1.1: Complex AI Pipeline Design"
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "Design complex AI pipeline for medical diagnosis with parallel processing and error handling" \
--thinking high
ai_log "Session 1.2: Parallel AI Operations"
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "Execute parallel AI operations with ensemble management and consensus validation" \
--thinking high
@@ -96,13 +96,13 @@ source venv/bin/activate
echo "3. Phase 2: Multi-Model AI Pipelines..."
ai_log "Session 2.1: Model Ensemble Management"
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "Design model ensemble system for medical diagnosis with weighted confidence voting" \
--thinking high
ai_log "Session 2.2: Multi-Modal AI Processing"
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "Design multi-modal AI system for customer feedback analysis with text/image/audio fusion" \
--thinking high
@@ -136,13 +136,13 @@ ssh aitbc1 "cd /opt/aitbc && source venv/bin/activate && curl -sf -X POST http:/
echo "5. Phase 3: AI Resource Optimization..."
ai_log "Session 3.1: Dynamic Resource Allocation"
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "Design dynamic resource allocation system for AI service provider with GPU pools and demand forecasting" \
--thinking high
ai_log "Session 3.2: AI Performance Tuning"
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "Design AI performance optimization system for sub-100ms inference latency with model optimization and inference acceleration" \
--thinking high
@@ -244,7 +244,7 @@ success "✅ Performance Optimization: Functional"
echo "11. Final Status Report..."
ai_log "Generating comprehensive status report..."
cat << EOF > /tmp/openclaw_advanced_ai_status_$(date +%s).json
cat << EOF > /tmp/hermes_advanced_ai_status_$(date +%s).json
{
"workflow_status": "completed",
"session_id": "$SESSION_ID",
@@ -284,12 +284,12 @@ cat << EOF > /tmp/openclaw_advanced_ai_status_$(date +%s).json
}
EOF
success "✅ Status report generated: /tmp/openclaw_advanced_ai_status_*.json"
success "✅ Status report generated: /tmp/hermes_advanced_ai_status_*.json"
echo ""
success "🎉 OpenClaw Advanced AI Workflow Completed Successfully!"
success "🎉 hermes Advanced AI Workflow Completed Successfully!"
info "📚 All 3 phases of Advanced AI Teaching Plan completed"
info "🤖 OpenClaw agents now have advanced AI capabilities"
info "🤖 hermes agents now have advanced AI capabilities"
info "⚡ Ready for production AI operations and resource optimization"
info "🔄 Next steps: Modular workflow implementation and agent coordination enhancement"
@@ -311,6 +311,6 @@ echo " - AI Performance Tuning"
echo " - Cross-Node Resource Optimization"
echo ""
echo "🎯 Status: ALL PHASES COMPLETED SUCCESSFULLY"
echo "🚀 OpenClaw agents are now advanced AI specialists!"
echo "🚀 hermes agents are now advanced AI specialists!"
exit 0

View File

@@ -57,20 +57,20 @@ echo "1. Testing Hierarchical Communication Pattern..."
SESSION_ID="hierarchy-$(date +%s)"
coord_log "Coordinator broadcasting to Level 2 agents (simulated with main agent)"
openclaw agent --agent main --session-id $SESSION_ID \
hermes agent --agent main --session-id $SESSION_ID \
--message "COORDINATOR BROADCAST: Execute distributed AI workflow across all Level 2 agents - GenesisAgent handles AI operations, FollowerAgent handles resource monitoring, AIResourceAgent optimizes GPU allocation" \
--thinking high || {
warning "CoordinatorAgent communication failed - using fallback"
}
coord_log "Level 2 agents responding to coordinator (simulated)"
openclaw agent --agent main --session-id $SESSION_ID \
hermes agent --agent main --session-id $SESSION_ID \
--message "GENESIS AGENT RESPONSE: Ready for AI workflow execution with resource optimization - Current GPU utilization 75%, can handle 5 more jobs" \
--thinking medium || {
warning "GenesisAgent response failed - continuing"
}
openclaw agent --agent main --session-id $SESSION_ID \
hermes agent --agent main --session-id $SESSION_ID \
--message "FOLLOWER AGENT RESPONSE: Ready for distributed task participation - CPU load 45%, memory available 8GB, ready for monitoring tasks" \
--thinking medium || {
warning "FollowerAgent response failed - continuing"
@@ -83,20 +83,20 @@ echo "2. Testing Peer-to-Peer Communication Pattern..."
SESSION_ID="p2p-$(date +%s)"
coord_log "Direct agent-to-agent communication (simulated)"
openclaw agent --agent main --session-id $SESSION_ID \
hermes agent --agent main --session-id $SESSION_ID \
--message "P2P GENESIS→FOLLOWER: Coordinate resource allocation for AI job batch - Genesis has GPU capacity, Follower has CPU resources" \
--thinking medium || {
warning "GenesisAgent P2P communication failed"
}
openclaw agent --agent main --session-id $SESSION_ID \
hermes agent --agent main --session-id $SESSION_ID \
--message "P2P FOLLOWER→GENESIS: Confirm resource availability and scheduling - Follower can handle 10 concurrent monitoring tasks" \
--thinking medium || {
warning "FollowerAgent P2P response failed"
}
coord_log "Cross-agent resource sharing (simulated)"
openclaw agent --agent main --session-id $SESSION_ID \
hermes agent --agent main --session-id $SESSION_ID \
--message "P2P AIRESOURCE→MULTIMODAL: Share GPU allocation for multi-modal processing - 2 GPUs available for cross-modal fusion tasks" \
--thinking low || {
warning "AIResourceAgent P2P communication failed"
@@ -109,7 +109,7 @@ echo "3. Testing Broadcast Communication Pattern..."
SESSION_ID="broadcast-$(date +%s)"
coord_log "Coordinator broadcasting to all agents"
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "BROADCAST: System-wide resource optimization initiated - all agents participate" \
--thinking high || {
warning "Coordinator broadcast failed"
@@ -117,7 +117,7 @@ openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
coord_log "Agents acknowledging broadcast"
for agent in GenesisAgent FollowerAgent; do
openclaw agent --agent $agent --session-id $SESSION_ID \
hermes agent --agent $agent --session-id $SESSION_ID \
--message "ACK: Received broadcast, initiating optimization protocols" \
--thinking low &
done
@@ -131,7 +131,7 @@ SESSION_ID="consensus-$(date +%s)"
PROPOSAL_ID="resource-strategy-$(date +%s)"
decision_log "Presenting proposal for voting"
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "VOTE PROPOSAL $PROPOSAL_ID: Implement dynamic GPU allocation with 70% utilization target" \
--thinking high || {
warning "Proposal presentation failed"
@@ -141,13 +141,13 @@ decision_log "Collecting votes from agents"
VOTES=()
# Genesis Agent vote
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "VOTE $PROPOSAL_ID: YES - Dynamic allocation optimizes AI performance" \
--thinking medium &
VOTES+=("GenesisAgent:YES")
# Follower Agent vote
openclaw agent --agent FollowerAgent --session-id $SESSION_ID \
hermes agent --agent FollowerAgent --session-id $SESSION_ID \
--message "VOTE $PROPOSAL_ID: YES - Improves resource utilization" \
--thinking medium &
VOTES+=("FollowerAgent:YES")
@@ -163,7 +163,7 @@ decision_log "Vote results: $YES_COUNT/$TOTAL_COUNT YES votes"
if [ $YES_COUNT -gt $((TOTAL_COUNT / 2)) ]; then
success "PROPOSAL $PROPOSAL_ID APPROVED: $YES_COUNT/$TOTAL_COUNT votes"
coord_log "Implementing approved proposal"
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "DECISION: Proposal $PROPOSAL_ID APPROVED - Implementing dynamic GPU allocation" \
--thinking high || {
warning "Decision implementation failed"
@@ -177,7 +177,7 @@ echo "5. Testing Weighted Decision Making..."
SESSION_ID="weighted-$(date +%s)"
decision_log "Weighted decision based on agent expertise"
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "WEIGHTED DECISION: Select optimal AI model for medical diagnosis pipeline" \
--thinking high || {
warning "Weighted decision initiation failed"
@@ -185,12 +185,12 @@ openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
decision_log "Agents providing weighted recommendations"
# Genesis Agent (AI Operations Expertise - Weight: 3)
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "RECOMMENDATION: ensemble_model (confidence: 0.9, weight: 3) - Best for accuracy" \
--thinking high &
# MultiModal Agent (Multi-Modal Expertise - Weight: 2)
openclaw agent --agent MultiModalAgent --session-id $SESSION_ID \
hermes agent --agent MultiModalAgent --session-id $SESSION_ID \
--message "RECOMMENDATION: multimodal_model (confidence: 0.8, weight: 2) - Handles multiple data types" \
--thinking high &
@@ -202,7 +202,7 @@ decision_log "Calculating weighted decision"
# Winner: ensemble_model
success "Weighted decision: ensemble_model selected (weighted score: 2.7)"
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "WEIGHTED DECISION: ensemble_model selected (weighted score: 2.7) - Highest confidence-weighted combination" \
--thinking high || {
warning "Weighted decision announcement failed"
@@ -213,7 +213,7 @@ echo "6. Testing Distributed Problem Solving..."
SESSION_ID="problem-solving-$(date +%s)"
decision_log "Distributed problem solving: AI service pricing optimization"
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "PROBLEM SOLVING: Optimize AI service pricing for maximum profitability and utilization" \
--thinking high || {
warning "Problem solving initiation failed"
@@ -221,24 +221,24 @@ openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
decision_log "Agents analyzing different aspects"
# Genesis Agent: Technical feasibility
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "ANALYSIS: Technical constraints suggest pricing range $50-200 per inference job" \
--thinking high &
# Follower Agent: Market analysis
openclaw agent --agent FollowerAgent --session-id $SESSION_ID \
hermes agent --agent FollowerAgent --session-id $SESSION_ID \
--message "ANALYSIS: Market research shows competitive pricing at $80-150 per job" \
--thinking medium &
# AI Resource Agent: Cost analysis
openclaw agent --agent AIResourceAgent --session-id $SESSION_ID \
hermes agent --agent AIResourceAgent --session-id $SESSION_ID \
--message "ANALYSIS: Resource costs indicate minimum $60 per job for profitability" \
--thinking medium &
wait
decision_log "Synthesizing solution from agent analyses"
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "SYNTHESIS: Optimal pricing strategy $80-120 range with dynamic adjustment based on demand" \
--thinking high || {
warning "Solution synthesis failed"
@@ -251,29 +251,29 @@ echo "7. Testing Load Balancing Architecture..."
SESSION_ID="load-balancing-$(date +%s)"
coord_log "Monitoring agent loads and redistributing tasks"
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "LOAD BALANCE: Monitoring agent loads and redistributing tasks" \
--thinking high || {
warning "Load balancing initiation failed"
}
coord_log "Agents reporting current load"
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "LOAD REPORT: Current load 75% - capacity for 5 more AI jobs" \
--thinking low &
openclaw agent --agent FollowerAgent --session-id $SESSION_ID \
hermes agent --agent FollowerAgent --session-id $SESSION_ID \
--message "LOAD REPORT: Current load 45% - capacity for 10 more tasks" \
--thinking low &
openclaw agent --agent AIResourceAgent --session-id $SESSION_ID \
hermes agent --agent AIResourceAgent --session-id $SESSION_ID \
--message "LOAD REPORT: Current load 60% - capacity for resource optimization tasks" \
--thinking low &
wait
coord_log "Redistributing load for optimal balance"
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "REDISTRIBUTION: Routing new tasks to FollowerAgent (45% load) for optimal balance" \
--thinking high || {
warning "Load redistribution failed"
@@ -287,7 +287,7 @@ SESSION_ID="metrics-$(date +%s)"
coord_log "Measuring message latency"
start_time=$(date +%s.%N)
openclaw agent --agent GenesisAgent --session-id $SESSION_ID \
hermes agent --agent GenesisAgent --session-id $SESSION_ID \
--message "LATENCY TEST: Measuring communication performance" \
--thinking low || {
warning "Latency test failed"
@@ -299,7 +299,7 @@ echo "Message latency: ${latency}s"
coord_log "Testing message throughput"
echo "Sending 10 messages in parallel..."
for i in {1..10}; do
openclaw agent --agent FollowerAgent --session-id $SESSION_ID \
hermes agent --agent FollowerAgent --session-id $SESSION_ID \
--message "THROUGHPUT TEST $i" \
--thinking low &
done
@@ -311,14 +311,14 @@ echo "9. Testing Adaptive Coordination..."
SESSION_ID="adaptive-$(date +%s)"
coord_log "System load monitoring and adaptive coordination"
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "MONITORING: System load at 85% - activating adaptive coordination protocols" \
--thinking high || {
warning "Adaptive coordination monitoring failed"
}
coord_log "Adjusting coordination strategy"
openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
hermes agent --agent CoordinatorAgent --session-id $SESSION_ID \
--message "ADAPTATION: Switching from centralized to distributed coordination for load balancing" \
--thinking high || {
warning "Coordination strategy adjustment failed"
@@ -326,7 +326,7 @@ openclaw agent --agent CoordinatorAgent --session-id $SESSION_ID \
coord_log "Agents adapting to new coordination"
for agent in GenesisAgent FollowerAgent AIResourceAgent; do
openclaw agent --agent $agent --session-id $SESSION_ID \
hermes agent --agent $agent --session-id $SESSION_ID \
--message "ADAPTATION: Adjusting to distributed coordination mode" \
--thinking medium &
done

View File

@@ -6,7 +6,7 @@
set -e # Exit on any error
echo "=== AI Economics Masters - Phase 4: Cross-Node AI Economics ==="
echo "Transforming OpenClaw agents from AI Specialists to Economics Masters"
echo "Transforming hermes agents from AI Specialists to Economics Masters"
echo "📊 Session 4.1: Distributed AI Job Economics"
echo "💰 Session 4.2: AI Marketplace Strategy"
echo "📈 Session 4.3: Advanced Economic Modeling"
@@ -58,14 +58,14 @@ echo "1. Session 4.1: Distributed AI Job Economics..."
SESSION_ID="economics-$(date +%s)"
economics_log "Genesis node economic modeling - distributed AI job economics"
openclaw agent --agent main --session-id $SESSION_ID \
hermes agent --agent main --session-id $SESSION_ID \
--message "ECONOMIC MODELING: Design distributed AI job economics for multi-node service provider with GPU cost optimization across RTX 4090, A100, H100 nodes - Target cost per inference <$0.01, node utilization >90%" \
--thinking high || {
warning "Genesis economic modeling failed - using fallback"
}
economics_log "Follower node economic coordination - CPU and memory optimization"
openclaw agent --agent main --session-id $SESSION_ID \
hermes agent --agent main --session-id $SESSION_ID \
--message "ECONOMIC COORDINATION: Coordinate economic strategy with genesis node for CPU optimization and memory pricing strategies - Analyze cost-benefit ratios and revenue sharing mechanisms" \
--thinking medium || {
warning "Follower economic coordination failed - continuing"
@@ -91,14 +91,14 @@ echo "2. Session 4.2: AI Marketplace Strategy..."
SESSION_ID="marketplace-$(date +%s)"
marketplace_log "Strategic market positioning and pricing optimization"
openclaw agent --agent main --session-id $SESSION_ID \
hermes agent --agent main --session-id $SESSION_ID \
--message "MARKETPLACE STRATEGY: Design AI marketplace strategy with dynamic pricing, competitive positioning, and resource monetization for AI inference services - Target 25% market share, 50% month-over-month revenue growth" \
--thinking high || {
warning "Marketplace strategy development failed - using fallback"
}
marketplace_log "Market analysis and competitive intelligence"
openclaw agent --agent main --session-id $SESSION_ID \
hermes agent --agent main --session-id $SESSION_ID \
--message "MARKET ANALYSIS: Analyze AI service market trends and optimize pricing strategy for maximum profitability and market share - Identify competitive advantages and differentiation opportunities" \
--thinking medium || {
warning "Market analysis failed - continuing"
@@ -121,14 +121,14 @@ echo "3. Session 4.3: Advanced Economic Modeling..."
SESSION_ID="advanced-economics-$(date +%s)"
economics_log "Investment strategy development and predictive economics"
openclaw agent --agent main --session-id $SESSION_ID \
hermes agent --agent main --session-id $SESSION_ID \
--message "INVESTMENT STRATEGY: Design AI investment strategy with predictive economics, market forecasting, and risk management for AI service portfolio - Target >200% ROI, <5% economic volatility" \
--thinking high || {
warning "Investment strategy development failed - using fallback"
}
economics_log "Economic forecasting and market prediction"
openclaw agent --agent main --session-id $SESSION_ID \
hermes agent --agent main --session-id $SESSION_ID \
--message "ECONOMIC FORECASTING: Develop predictive models for AI market trends and optimize investment allocation across different AI service categories - Achieve >85% accuracy in market predictions" \
--thinking high || {
warning "Economic forecasting failed - continuing"
@@ -194,14 +194,14 @@ echo "6. Advanced Economic Workflows..."
SESSION_ID="advanced-workflows-$(date +%s)"
economics_log "Executing distributed economic optimization workflow"
openclaw agent --agent main --session-id $SESSION_ID \
hermes agent --agent main --session-id $SESSION_ID \
--message "ADVANCED WORKFLOW: Execute distributed economic optimization across all nodes with real-time cost modeling, revenue sharing, and performance tracking - Optimize for maximum economic efficiency" \
--thinking high || {
warning "Advanced workflow execution failed - continuing"
}
marketplace_log "Executing marketplace strategy workflow"
openclaw agent --agent main --session-id $SESSION_ID \
hermes agent --agent main --session-id $SESSION_ID \
--message "MARKETPLACE WORKFLOW: Execute comprehensive marketplace strategy with dynamic pricing, competitive analysis, and revenue optimization - Target 25% market share and 50% revenue growth" \
--thinking high || {
warning "Marketplace workflow execution failed - continuing"

View File

@@ -1,25 +1,25 @@
# OpenClaw Multi-Node Blockchain Workflow Scripts
# hermes Multi-Node Blockchain Workflow Scripts
This directory contains OpenClaw-enabled versions of the multi-node blockchain setup scripts that interact with OpenClaw agents instead of executing manual commands.
This directory contains hermes-enabled versions of the multi-node blockchain setup scripts that interact with hermes agents instead of executing manual commands.
## Overview
The OpenClaw workflow scripts transform the manual multi-node blockchain deployment into an intelligent, automated, and coordinated agent-based system.
The hermes workflow scripts transform the manual multi-node blockchain deployment into an intelligent, automated, and coordinated agent-based system.
## Scripts
### 1. `01_preflight_setup_openclaw.sh`
**Purpose**: Pre-flight setup with OpenClaw agent deployment
### 1. `01_preflight_setup_hermes.sh`
**Purpose**: Pre-flight setup with hermes agent deployment
**Agent**: CoordinatorAgent, GenesisAgent, FollowerAgent, WalletAgent
**Tasks**:
- Deploy OpenClaw agents
- Deploy hermes agents
- Stop existing services via agents
- Update systemd configurations
- Setup central configuration
- Initialize agent communication channels
### 2. `02_genesis_authority_setup_openclaw.sh`
**Purpose**: Setup genesis authority node using OpenClaw agents
### 2. `02_genesis_authority_setup_hermes.sh`
**Purpose**: Setup genesis authority node using hermes agents
**Agent**: GenesisAgent, WalletAgent, CoordinatorAgent
**Tasks**:
- Initialize GenesisAgent
@@ -30,8 +30,8 @@ The OpenClaw workflow scripts transform the manual multi-node blockchain deploym
- Start blockchain services
- Verify genesis state
### 3. `03_follower_node_setup_openclaw.sh`
**Purpose**: Setup follower node using OpenClaw agents
### 3. `03_follower_node_setup_hermes.sh`
**Purpose**: Setup follower node using hermes agents
**Agent**: FollowerAgent, CoordinatorAgent
**Tasks**:
- Initialize FollowerAgent
@@ -41,8 +41,8 @@ The OpenClaw workflow scripts transform the manual multi-node blockchain deploym
- Establish genesis connection
- Monitor and verify sync
### 4. `04_wallet_operations_openclaw.sh`
**Purpose**: Execute wallet operations across nodes using OpenClaw agents
### 4. `04_wallet_operations_hermes.sh`
**Purpose**: Execute wallet operations across nodes using hermes agents
**Agent**: WalletAgent, CoordinatorAgent
**Tasks**:
- Create cross-node wallets
@@ -51,8 +51,8 @@ The OpenClaw workflow scripts transform the manual multi-node blockchain deploym
- Verify transaction confirmations
- Test wallet switching
### 5. `05_complete_workflow_openclaw.sh`
**Purpose**: Orchestrate complete multi-node deployment using all OpenClaw agents
### 5. `05_complete_workflow_hermes.sh`
**Purpose**: Orchestrate complete multi-node deployment using all hermes agents
**Agent**: CoordinatorAgent (orchestrates all other agents)
**Tasks**:
- Execute all workflow phases
@@ -61,7 +61,7 @@ The OpenClaw workflow scripts transform the manual multi-node blockchain deploym
- Network health checks
- Generate final reports
## OpenClaw Agent Architecture
## hermes Agent Architecture
### Agent Types
@@ -89,31 +89,31 @@ The OpenClaw workflow scripts transform the manual multi-node blockchain deploym
### Quick Start
```bash
# Run complete workflow with OpenClaw agents
./05_complete_workflow_openclaw.sh
# Run complete workflow with hermes agents
./05_complete_workflow_hermes.sh
# Run individual phases
./01_preflight_setup_openclaw.sh
./02_genesis_authority_setup_openclaw.sh
./03_follower_node_setup_openclaw.sh
./04_wallet_operations_openclaw.sh
./01_preflight_setup_hermes.sh
./02_genesis_authority_setup_hermes.sh
./03_follower_node_setup_hermes.sh
./04_wallet_operations_hermes.sh
```
### OpenClaw Commands
### hermes Commands
```bash
# Deploy agents
openclaw deploy --config /tmp/openclaw_agents.json
hermes deploy --config /tmp/hermes_agents.json
# Monitor agents
openclaw status --agent all
hermes status --agent all
# Execute specific agent tasks
openclaw execute --agent GenesisAgent --task create_genesis_block
openclaw execute --agent FollowerAgent --task sync_with_genesis
openclaw execute --agent WalletAgent --task create_cross_node_wallets
hermes execute --agent GenesisAgent --task create_genesis_block
hermes execute --agent FollowerAgent --task sync_with_genesis
hermes execute --agent WalletAgent --task create_cross_node_wallets
# Generate reports
openclaw report --workflow multi_node --format json
hermes report --workflow multi_node --format json
```
## Key Features
@@ -172,44 +172,44 @@ openclaw report --workflow multi_node --format json
## Reports and Monitoring
### Report Types
- **Preflight Report**: `/tmp/openclaw_preflight_report.json`
- **Genesis Report**: `/tmp/openclaw_genesis_report.json`
- **Follower Report**: `/tmp/openclaw_follower_report.json`
- **Wallet Report**: `/tmp/openclaw_wallet_report.json`
- **Complete Report**: `/tmp/openclaw_complete_report.json`
- **Preflight Report**: `/tmp/hermes_preflight_report.json`
- **Genesis Report**: `/tmp/hermes_genesis_report.json`
- **Follower Report**: `/tmp/hermes_follower_report.json`
- **Wallet Report**: `/tmp/hermes_wallet_report.json`
- **Complete Report**: `/tmp/hermes_complete_report.json`
### Monitoring Commands
```bash
# Monitor agent status
openclaw monitor --agent all
hermes monitor --agent all
# Monitor workflow progress
openclaw monitor --workflow multi_node --real-time
hermes monitor --workflow multi_node --real-time
# Check agent health
openclaw health --agent all
hermes health --agent all
```
## Troubleshooting
### Common Issues
#### OpenClaw CLI Not Found
#### hermes CLI Not Found
```bash
# Install OpenClaw
pip install openclaw-agent
# Install hermes
pip install hermes-agent
# Or use mock mode (development)
export OPENCLAW_MOCK_MODE=1
export hermes_MOCK_MODE=1
```
#### Agent Communication Failure
```bash
# Check agent status
openclaw status --agent all
hermes status --agent all
# Restart communication
openclaw restart --communication
hermes restart --communication
# Verify network connectivity
ping -c 1 aitbc1
@@ -218,7 +218,7 @@ ping -c 1 aitbc1
#### Service Start Failures
```bash
# Check service logs via agents
openclaw execute --agent GenesisAgent --task show_service_logs
hermes execute --agent GenesisAgent --task show_service_logs
# Manual service check
systemctl status aitbc-blockchain-node.service
@@ -227,18 +227,18 @@ systemctl status aitbc-blockchain-node.service
### Debug Mode
```bash
# Enable debug logging
export OPENCLAW_DEBUG=1
export hermes_DEBUG=1
# Run with verbose output
./05_complete_workflow_openclaw.sh --verbose
./05_complete_workflow_hermes.sh --verbose
# Check agent logs
openclaw logs --agent all --tail 50
hermes logs --agent all --tail 50
```
## Comparison with Manual Scripts
| Feature | Manual Scripts | OpenClaw Scripts |
| Feature | Manual Scripts | hermes Scripts |
|---------|----------------|-------------------|
| Execution | Manual commands | Agent-automated |
| Coordination | Human coordination | Agent coordination |
@@ -251,37 +251,37 @@ openclaw logs --agent all --tail 50
## Prerequisites
### System Requirements
- OpenClaw CLI installed
- hermes CLI installed
- SSH access to both nodes (aitbc, aitbc1)
- Python virtual environment at `/opt/aitbc/venv`
- AITBC CLI tool available
- Network connectivity between nodes
### OpenClaw Installation
### hermes Installation
```bash
# Install OpenClaw
pip install openclaw-agent
# Install hermes
pip install hermes-agent
# Verify installation
openclaw --version
hermes --version
# Initialize OpenClaw
openclaw init --workspace /opt/aitbc
# Initialize hermes
hermes init --workspace /opt/aitbc
```
## Next Steps
1. **Run the complete workflow**: `./05_complete_workflow_openclaw.sh`
2. **Monitor agent activity**: `openclaw monitor --agent all`
1. **Run the complete workflow**: `./05_complete_workflow_hermes.sh`
2. **Monitor agent activity**: `hermes monitor --agent all`
3. **Verify deployment**: Check generated reports
4. **Test operations**: Execute test transactions
5. **Scale deployment**: Add more nodes and agents
## Support
For issues with OpenClaw scripts:
1. Check agent status: `openclaw status --agent all`
2. Review agent logs: `openclaw logs --agent all`
For issues with hermes scripts:
1. Check agent status: `hermes status --agent all`
2. Review agent logs: `hermes logs --agent all`
3. Verify network connectivity
4. Check OpenClaw configuration
4. Check hermes configuration
5. Run in debug mode for detailed logging

View File

@@ -0,0 +1,60 @@
#!/bin/bash
# Hermes Agent Communication Fix
# This script demonstrates the correct way to use Hermes agents with sessions
set -e
echo "=== Hermes Agent Communication Fix ==="
# 1. Check Hermes status
echo "1. Checking Hermes status..."
hermes status --all | head -10
# 2. Create a session for agent operations
echo "2. Creating agent session for blockchain operations..."
SESSION_ID="blockchain-workflow-$(date +%s)"
# 3. Test agent communication with session
echo "3. Testing agent communication with proper session..."
hermes agent --agent main --session-id $SESSION_ID --message "Test agent communication for blockchain workflow" --thinking low
echo "✅ Agent communication working with session ID: $SESSION_ID"
# 4. Demonstrate agent coordination
echo "4. Demonstrating agent coordination for blockchain operations..."
hermes agent --agent main --session-id $SESSION_ID --message "Coordinate multi-node blockchain deployment and provide status analysis" --thinking medium
# 5. Show session information
echo "5. Session information:"
echo "Session ID: $SESSION_ID"
echo "Agent: main"
echo "Status: Active"
# 6. Generate fix report
cat > /tmp/hermes_agent_fix_report.json << EOF
{
"fix_status": "completed",
"issue": "Agent communication failed due to missing session context",
"solution": "Added --session-id parameter to agent commands",
"session_id": "$SESSION_ID",
"agent_id": "main",
"working_commands": [
"hermes agent --agent main --session-id \$SESSION_ID --message 'task'",
"hermes agent --agent main --session-id \$SESSION_ID --message 'task' --thinking medium"
],
"timestamp": "$(date -Iseconds)"
}
EOF
echo "✅ Hermes Agent Communication Fix Completed!"
echo "📊 Report saved to: /tmp/hermes_agent_fix_report.json"
echo ""
echo "=== Correct Usage Examples ==="
echo "# Basic agent communication:"
echo "hermes agent --agent main --session-id $SESSION_ID --message 'your task'"
echo ""
echo "# With thinking level:"
echo "hermes agent --agent main --session-id $SESSION_ID --message 'complex task' --thinking high"
echo ""
echo "# For blockchain operations:"
echo "hermes agent --agent main --session-id $SESSION_ID --message 'coordinate blockchain deployment' --thinking medium"

View File

@@ -1,31 +1,31 @@
#!/bin/bash
# Advanced OpenClaw Agent Blockchain Messaging Implementation
# Advanced hermes Agent Blockchain Messaging Implementation
# This script implements and demonstrates actual blockchain messaging
set -e
echo "=== Advanced OpenClaw Agent Blockchain Messaging Implementation ==="
echo "=== Advanced hermes Agent Blockchain Messaging Implementation ==="
# Create session for implementation
SESSION_ID="messaging-implementation-$(date +%s)"
# 1. Initialize OpenClaw agents on both nodes
echo "1. Initializing OpenClaw agents on both nodes for blockchain messaging..."
# 1. Initialize hermes agents on both nodes
echo "1. Initializing hermes agents on both nodes for blockchain messaging..."
# Genesis node agent
echo "Genesis Node Agent (aitbc):"
openclaw agent --agent main --session-id $SESSION_ID --message "I am the genesis node agent for AITBC blockchain messaging. I will coordinate messaging operations and maintain forum topics for cross-node agent collaboration. My capabilities include smart contract interaction, message moderation, and reputation management." --thinking high
hermes agent --agent main --session-id $SESSION_ID --message "I am the genesis node agent for AITBC blockchain messaging. I will coordinate messaging operations and maintain forum topics for cross-node agent collaboration. My capabilities include smart contract interaction, message moderation, and reputation management." --thinking high
# Follower node agent (via SSH)
echo "Follower Node Agent (aitbc1):"
ssh aitbc1 "cd /opt/aitbc && SESSION_ID='$SESSION_ID' openclaw agent --agent main --session-id \$SESSION_ID --message 'I am the follower node agent for AITBC blockchain messaging. I will participate in cross-node communication, respond to coordination messages, and provide status updates from the follower node perspective.' --thinking high"
ssh aitbc1 "cd /opt/aitbc && SESSION_ID='$SESSION_ID' hermes agent --agent main --session-id \$SESSION_ID --message 'I am the follower node agent for AITBC blockchain messaging. I will participate in cross-node communication, respond to coordination messages, and provide status updates from the follower node perspective.' --thinking high"
# 2. Create agent workflow for messaging
echo "2. Creating agent workflow for blockchain messaging..."
cat > /tmp/blockchain_messaging_workflow.json << 'EOF'
{
"workflow_name": "blockchain_messaging_coordinator",
"description": "OpenClaw agent that coordinates blockchain messaging across multi-node AITBC network",
"description": "hermes agent that coordinates blockchain messaging across multi-node AITBC network",
"version": "1.0",
"agent_capabilities": [
"smart_contract_interaction",
@@ -80,27 +80,27 @@ EOF
echo "3. Training agents on specific blockchain messaging scenarios..."
echo "Training Genesis Node Agent:"
openclaw agent --agent main --session-id $SESSION_ID --message "As the genesis node agent, I need to learn how to: 1) Create forum topics for coordination, 2) Post status updates about block production, 3) Respond to follower node queries, 4) Moderate discussions, 5) Build reputation through helpful contributions. Current blockchain height is $(curl -s http://localhost:8006/rpc/head | jq .height)." --thinking high
hermes agent --agent main --session-id $SESSION_ID --message "As the genesis node agent, I need to learn how to: 1) Create forum topics for coordination, 2) Post status updates about block production, 3) Respond to follower node queries, 4) Moderate discussions, 5) Build reputation through helpful contributions. Current blockchain height is $(curl -s http://localhost:8006/rpc/head | jq .height)." --thinking high
echo "Training Follower Node Agent:"
ssh aitbc1 "cd /opt/aitbc && SESSION_ID='$SESSION_ID' openclaw agent --agent main --session-id \$SESSION_ID --message 'As the follower node agent, I need to learn how to: 1) Participate in coordination topics, 2) Report sync status and issues, 3) Ask questions about genesis node operations, 4) Collaborate on troubleshooting, 5) Build reputation through active participation. Current blockchain height is \$(curl -s http://localhost:8006/rpc/head | jq .height).' --thinking high"
ssh aitbc1 "cd /opt/aitbc && SESSION_ID='$SESSION_ID' hermes agent --agent main --session-id \$SESSION_ID --message 'As the follower node agent, I need to learn how to: 1) Participate in coordination topics, 2) Report sync status and issues, 3) Ask questions about genesis node operations, 4) Collaborate on troubleshooting, 5) Build reputation through active participation. Current blockchain height is \$(curl -s http://localhost:8006/rpc/head | jq .height).' --thinking high"
# 4. Demonstrate practical messaging scenarios
echo "4. Demonstrating practical blockchain messaging scenarios..."
# Scenario 1: Coordination topic creation
echo "Scenario 1: Creating coordination topic..."
openclaw agent --agent main --session-id $SESSION_ID --message "Create a forum topic called 'Multi-Node Blockchain Coordination' with description 'Central hub for coordinating deployment and operations across aitbc and aitbc1 nodes'. Tag it with coordination, deployment, and sync. This will help agents coordinate their activities." --thinking medium
hermes agent --agent main --session-id $SESSION_ID --message "Create a forum topic called 'Multi-Node Blockchain Coordination' with description 'Central hub for coordinating deployment and operations across aitbc and aitbc1 nodes'. Tag it with coordination, deployment, and sync. This will help agents coordinate their activities." --thinking medium
# Scenario 2: Status update broadcasting
echo "Scenario 2: Broadcasting status updates..."
openclaw agent --agent main --session-id $SESSION_ID --message "Post a status update to the coordination topic: 'Genesis node agent reporting: Block height $(curl -s http://localhost:8006/rpc/head | jq .height), RPC service operational, ready for cross-node agent coordination. All systems nominal.'" --thinking medium
hermes agent --agent main --session-id $SESSION_ID --message "Post a status update to the coordination topic: 'Genesis node agent reporting: Block height $(curl -s http://localhost:8006/rpc/head | jq .height), RPC service operational, ready for cross-node agent coordination. All systems nominal.'" --thinking medium
ssh aitbc1 "cd /opt/aitbc && SESSION_ID='$SESSION_ID' openclaw agent --agent main --session-id \$SESSION_ID --message 'Post a status update to the coordination topic: \"Follower node agent reporting: Block height \$(curl -s http://localhost:8006/rpc/head | jq .height), sync status active, ready for cross-node collaboration. Node operational and responding to genesis node.\"' --thinking medium"
ssh aitbc1 "cd /opt/aitbc && SESSION_ID='$SESSION_ID' hermes agent --agent main --session-id \$SESSION_ID --message 'Post a status update to the coordination topic: \"Follower node agent reporting: Block height \$(curl -s http://localhost:8006/rpc/head | jq .height), sync status active, ready for cross-node collaboration. Node operational and responding to genesis node.\"' --thinking medium"
# Scenario 3: Cross-node collaboration
echo "Scenario 3: Cross-node collaboration demonstration..."
openclaw agent --agent main --session-id $SESSION_ID --message "Post a collaboration message: 'I propose we establish a heartbeat protocol where both nodes post status updates every 30 seconds. This will help us monitor network health and detect issues quickly. Follower node agent, please confirm if you can implement this.'" --thinking medium
hermes agent --agent main --session-id $SESSION_ID --message "Post a collaboration message: 'I propose we establish a heartbeat protocol where both nodes post status updates every 30 seconds. This will help us monitor network health and detect issues quickly. Follower node agent, please confirm if you can implement this.'" --thinking medium
# 5. Create agent CLI workflow
echo "5. Creating agent CLI workflow for messaging..."
@@ -111,7 +111,7 @@ cat > /tmp/create_messaging_agent.sh << 'EOF'
echo "Creating blockchain messaging agent..."
./aitbc-cli agent create \
--name blockchain-messaging-agent \
--description "OpenClaw agent for AITBC blockchain messaging and cross-node coordination" \
--description "hermes agent for AITBC blockchain messaging and cross-node coordination" \
--workflow-file /tmp/blockchain_messaging_workflow.json \
--verification basic \
--max-execution-time 3600 \
@@ -128,7 +128,7 @@ chmod +x /tmp/create_messaging_agent.sh
# 6. Implementation completion report
echo "6. Creating implementation completion report..."
cat > /tmp/openclaw_messaging_implementation_report.json << EOF
cat > /tmp/hermes_messaging_implementation_report.json << EOF
{
"implementation_status": "completed",
"session_id": "$SESSION_ID",
@@ -179,8 +179,8 @@ cat > /tmp/openclaw_messaging_implementation_report.json << EOF
}
EOF
echo "✅ Advanced OpenClaw Agent Blockchain Messaging Implementation Completed!"
echo "📊 Implementation report saved to: /tmp/openclaw_messaging_implementation_report.json"
echo "✅ Advanced hermes Agent Blockchain Messaging Implementation Completed!"
echo "📊 Implementation report saved to: /tmp/hermes_messaging_implementation_report.json"
echo "🤖 Both nodes now have trained agents for blockchain messaging!"
echo ""

View File

@@ -1,21 +1,21 @@
#!/bin/bash
# OpenClaw Agent Smart Contract Messaging Training
# This script trains OpenClaw agents to use AITBC blockchain messaging
# Hermes Agent Smart Contract Messaging Training
# This script trains Hermes agents to use AITBC blockchain messaging
set -e
echo "=== OpenClaw Agent Smart Contract Messaging Training ==="
echo "=== Hermes Agent Smart Contract Messaging Training ==="
# Create session for training
SESSION_ID="messaging-training-$(date +%s)"
# 1. Initialize OpenClaw agent for messaging training
echo "1. Initializing OpenClaw agent for smart contract messaging training..."
openclaw agent --agent main --session-id $SESSION_ID --message "I need to learn how to use AITBC smart contract messaging for cross-node agent communication. Please teach me the agent messaging contract system, including how to create topics, post messages, and collaborate with other agents on the blockchain." --thinking high
# 1. Initialize Hermes agent for messaging training
echo "1. Initializing Hermes agent for smart contract messaging training..."
hermes agent --agent main --session-id $SESSION_ID --message "I need to learn how to use AITBC smart contract messaging for cross-node agent communication. Please teach me the agent messaging contract system, including how to create topics, post messages, and collaborate with other agents on the blockchain." --thinking high
# 2. Teach agent about AITBC messaging capabilities
echo "2. Teaching agent about AITBC smart contract messaging capabilities..."
openclaw agent --agent main --session-id $SESSION_ID --message "Explain the AITBC Agent Messaging Contract capabilities including: forum-like communication, message types (post, reply, announcement, question, answer), reputation system, moderation features, and cross-node agent collaboration. Focus on how this enables intelligent agent coordination on the blockchain." --thinking high
hermes agent --agent main --session-id $SESSION_ID --message "Explain the AITBC Agent Messaging Contract capabilities including: forum-like communication, message types (post, reply, announcement, question, answer), reputation system, moderation features, and cross-node agent collaboration. Focus on how this enables intelligent agent coordination on the blockchain." --thinking high
# 3. Demonstrate CLI commands for agent operations
echo "3. Demonstrating AITBC CLI agent commands..."
@@ -66,7 +66,7 @@ echo "Sample workflow created: /tmp/agent_messaging_workflow.json"
# 5. Train agent on practical messaging scenarios
echo "5. Training agent on practical messaging scenarios..."
openclaw agent --agent main --session-id $SESSION_ID --message "Teach me practical scenarios for using AITBC blockchain messaging: 1) Creating coordination topics for multi-node deployment, 2) Posting status updates and heartbeat messages, 3) Asking questions and getting answers from other agents, 4) Collaborating on complex tasks, 5) Building reputation through helpful contributions." --thinking high
hermes agent --agent main --session-id $SESSION_ID --message "Teach me practical scenarios for using AITBC blockchain messaging: 1) Creating coordination topics for multi-node deployment, 2) Posting status updates and heartbeat messages, 3) Asking questions and getting answers from other agents, 4) Collaborating on complex tasks, 5) Building reputation through helpful contributions." --thinking high
# 6. Demonstrate cross-node messaging
echo "6. Demonstrating cross-node agent messaging..."
@@ -74,16 +74,16 @@ echo "Current node status:"
echo "- Genesis Node (aitbc): $(curl -s http://localhost:8006/rpc/head | jq .height)"
echo "- Follower Node (aitbc1): $(ssh aitbc1 'curl -s http://localhost:8006/rpc/head | jq .height')"
openclaw agent --agent main --session-id $SESSION_ID --message "We have a multi-node blockchain setup with genesis node at height $(curl -s http://localhost:8006/rpc/head | jq .height) and follower node at height $(ssh aitbc1 'curl -s http://localhost:8006/rpc/head | jq .height). How can we use the smart contract messaging to coordinate between agents running on different nodes?" --thinking high
hermes agent --agent main --session-id $SESSION_ID --message "We have a multi-node blockchain setup with genesis node at height $(curl -s http://localhost:8006/rpc/head | jq .height) and follower node at height $(ssh aitbc1 'curl -s http://localhost:8006/rpc/head | jq .height). How can we use the smart contract messaging to coordinate between agents running on different nodes?" --thinking high
# 7. Create training completion report
echo "7. Creating training completion report..."
cat > /tmp/openclaw_messaging_training_report.json << EOF
cat > /tmp/hermes_messaging_training_report.json << EOF
{
"training_status": "completed",
"session_id": "$SESSION_ID",
"timestamp": "$(date -Iseconds)",
"training_focus": "AITBC smart contract messaging for OpenClaw agents",
"training_focus": "AITBC smart contract messaging for Hermes agents",
"capabilities_taught": [
"Agent Messaging Contract usage",
"Cross-node communication",
@@ -116,8 +116,8 @@ cat > /tmp/openclaw_messaging_training_report.json << EOF
}
EOF
echo "✅ OpenClaw Agent Smart Contract Messaging Training Completed!"
echo "📊 Training report saved to: /tmp/openclaw_messaging_training_report.json"
echo "✅ Hermes Agent Smart Contract Messaging Training Completed!"
echo "📊 Training report saved to: /tmp/hermes_messaging_training_report.json"
echo "🤖 Agent is now trained to use AITBC blockchain messaging!"
echo ""

View File

@@ -1,162 +0,0 @@
#!/bin/bash
# OpenClaw Pre-Flight Setup Script for AITBC Multi-Node Blockchain
# This script prepares the system and deploys OpenClaw agents for multi-node blockchain deployment
set -e # Exit on any error
echo "=== OpenClaw AITBC Multi-Node Blockchain Pre-Flight Setup ==="
# 1. Initialize OpenClaw Agent System
echo "1. Initializing OpenClaw Agent System..."
# Check if OpenClaw is available
if ! command -v openclaw &> /dev/null; then
echo "❌ OpenClaw CLI not found. Installing OpenClaw..."
# Install OpenClaw (placeholder - actual installation would go here)
pip install openclaw-agent 2>/dev/null || echo "⚠️ OpenClaw installation failed - using mock mode"
fi
# 2. Deploy OpenClaw Agents
echo "2. Deploying OpenClaw Agents..."
# Create agent configuration
cat > /tmp/openclaw_agents.json << 'EOF'
{
"agents": {
"CoordinatorAgent": {
"node": "aitbc",
"capabilities": ["orchestration", "monitoring", "coordination"],
"access": ["agent_communication", "task_distribution"]
},
"GenesisAgent": {
"node": "aitbc",
"capabilities": ["system_admin", "blockchain_genesis", "service_management"],
"access": ["ssh", "systemctl", "file_system"]
},
"FollowerAgent": {
"node": "aitbc1",
"capabilities": ["system_admin", "blockchain_sync", "service_management"],
"access": ["ssh", "systemctl", "file_system"]
},
"WalletAgent": {
"node": "both",
"capabilities": ["wallet_management", "transaction_processing"],
"access": ["cli_commands", "blockchain_rpc"]
}
}
}
EOF
# Deploy agents using OpenClaw
openclaw deploy --config /tmp/openclaw_agents.json --mode production || {
echo "⚠️ OpenClaw deployment failed - using mock agent deployment"
# Mock deployment for development
mkdir -p /var/lib/openclaw/agents
echo "mock_coordinator_agent" > /var/lib/openclaw/agents/CoordinatorAgent.status
echo "mock_genesis_agent" > /var/lib/openclaw/agents/GenesisAgent.status
echo "mock_follower_agent" > /var/lib/openclaw/agents/FollowerAgent.status
echo "mock_wallet_agent" > /var/lib/openclaw/agents/WalletAgent.status
}
# 3. Stop existing services (via OpenClaw agents)
echo "3. Stopping existing services via OpenClaw agents..."
openclaw execute --agent CoordinatorAgent --task stop_all_services || {
echo "⚠️ OpenClaw service stop failed - using manual method"
systemctl stop aitbc-blockchain-* 2>/dev/null || true
}
# 4. Update systemd configurations (via OpenClaw)
echo "4. Updating systemd configurations via OpenClaw agents..."
openclaw execute --agent GenesisAgent --task update_systemd_config || {
echo "⚠️ OpenClaw config update failed - using manual method"
# Update main service files
sed -i 's|EnvironmentFile=/opt/aitbc/.env|EnvironmentFile=/etc/aitbc/.env|g' /opt/aitbc/systemd/aitbc-blockchain-*.service
# Update drop-in configs
find /etc/systemd/system/aitbc-blockchain-*.service.d/ -name "10-central-env.conf" -exec sed -i 's|EnvironmentFile=/opt/aitbc/.env|EnvironmentFile=/etc/aitbc/.env|g' {} \; 2>/dev/null || true
# Fix override configs (wrong venv paths)
find /etc/systemd/system/aitbc-blockchain-*.service.d/ -name "override.conf" -exec sed -i 's|/opt/aitbc/apps/blockchain-node/.venv/bin/python3|/opt/aitbc/venv/bin/python3|g' {} \; 2>/dev/null || true
systemctl daemon-reload
}
# 5. Setup central configuration (via OpenClaw)
echo "5. Setting up central configuration via OpenClaw agents..."
openclaw execute --agent CoordinatorAgent --task setup_central_config || {
echo "⚠️ OpenClaw config setup failed - using manual method"
cp /opt/aitbc/.env /etc/aitbc/.env.backup 2>/dev/null || true
mv /opt/aitbc/.env /etc/aitbc/.env 2>/dev/null || true
}
# 6. Setup AITBC CLI tool (via OpenClaw)
echo "6. Setting up AITBC CLI tool via OpenClaw agents..."
openclaw execute --agent GenesisAgent --task setup_cli_tool || {
echo "⚠️ OpenClaw CLI setup failed - using manual method"
source /opt/aitbc/venv/bin/activate
pip install -e /opt/aitbc/cli/ 2>/dev/null || true
echo 'alias aitbc="source /opt/aitbc/venv/bin/activate && aitbc"' >> ~/.bashrc
source ~/.bashrc
}
# 7. Clean old data (via OpenClaw)
echo "7. Cleaning old data via OpenClaw agents..."
openclaw execute --agent CoordinatorAgent --task clean_old_data || {
echo "⚠️ OpenClaw data cleanup failed - using manual method"
rm -rf /var/lib/aitbc/data/ait-mainnet/*
rm -rf /var/lib/aitbc/keystore/*
}
# 8. Create keystore password file (via OpenClaw)
echo "8. Creating keystore password file via OpenClaw agents..."
openclaw execute --agent CoordinatorAgent --task create_keystore_password || {
echo "⚠️ OpenClaw keystore setup failed - using manual method"
mkdir -p /var/lib/aitbc/keystore
echo 'aitbc123' > /var/lib/aitbc/keystore/.password
chmod 600 /var/lib/aitbc/keystore/.password
}
# 9. Verify OpenClaw agent deployment
echo "9. Verifying OpenClaw agent deployment..."
openclaw status --agent all || {
echo "⚠️ OpenClaw status check failed - using mock verification"
ls -la /var/lib/openclaw/agents/
}
# 10. Initialize agent communication channels
echo "10. Initializing agent communication channels..."
openclaw execute --agent CoordinatorAgent --task establish_communication || {
echo "⚠️ OpenClaw communication setup failed - using mock setup"
# Mock communication setup
echo "agent_communication_established" > /var/lib/openclaw/communication.status
}
# 11. Verify setup with OpenClaw agents
echo "11. Verifying setup with OpenClaw agents..."
openclaw execute --agent CoordinatorAgent --task verify_setup || {
echo "⚠️ OpenClaw verification failed - using manual method"
aitbc --help 2>/dev/null || echo "CLI available but limited commands"
}
# 12. Generate pre-flight report
echo "12. Generating pre-flight report..."
openclaw report --workflow preflight --format json > /tmp/openclaw_preflight_report.json || {
echo "⚠️ OpenClaw report generation failed - using mock report"
cat > /tmp/openclaw_preflight_report.json << 'EOF'
{
"status": "completed",
"agents_deployed": 4,
"services_stopped": true,
"config_updated": true,
"cli_setup": true,
"data_cleaned": true,
"keystore_created": true,
"communication_established": true,
"timestamp": "2026-03-30T12:40:00Z"
}
EOF
}
echo "✅ OpenClaw Pre-Flight Setup Completed!"
echo "📊 Report saved to: /tmp/openclaw_preflight_report.json"
echo "🤖 Agents ready for multi-node blockchain deployment"
# Display agent status
echo ""
echo "=== OpenClaw Agent Status ==="
openclaw status --agent all 2>/dev/null || cat /var/lib/openclaw/agents/*.status

View File

@@ -1,60 +0,0 @@
#!/bin/bash
# OpenClaw Agent Communication Fix
# This script demonstrates the correct way to use OpenClaw agents with sessions
set -e
echo "=== OpenClaw Agent Communication Fix ==="
# 1. Check OpenClaw status
echo "1. Checking OpenClaw status..."
openclaw status --all | head -10
# 2. Create a session for agent operations
echo "2. Creating agent session for blockchain operations..."
SESSION_ID="blockchain-workflow-$(date +%s)"
# 3. Test agent communication with session
echo "3. Testing agent communication with proper session..."
openclaw agent --agent main --session-id $SESSION_ID --message "Test agent communication for blockchain workflow" --thinking low
echo "✅ Agent communication working with session ID: $SESSION_ID"
# 4. Demonstrate agent coordination
echo "4. Demonstrating agent coordination for blockchain operations..."
openclaw agent --agent main --session-id $SESSION_ID --message "Coordinate multi-node blockchain deployment and provide status analysis" --thinking medium
# 5. Show session information
echo "5. Session information:"
echo "Session ID: $SESSION_ID"
echo "Agent: main"
echo "Status: Active"
# 6. Generate fix report
cat > /tmp/openclaw_agent_fix_report.json << EOF
{
"fix_status": "completed",
"issue": "Agent communication failed due to missing session context",
"solution": "Added --session-id parameter to agent commands",
"session_id": "$SESSION_ID",
"agent_id": "main",
"working_commands": [
"openclaw agent --agent main --session-id \$SESSION_ID --message 'task'",
"openclaw agent --agent main --session-id \$SESSION_ID --message 'task' --thinking medium"
],
"timestamp": "$(date -Iseconds)"
}
EOF
echo "✅ OpenClaw Agent Communication Fix Completed!"
echo "📊 Report saved to: /tmp/openclaw_agent_fix_report.json"
echo ""
echo "=== Correct Usage Examples ==="
echo "# Basic agent communication:"
echo "openclaw agent --agent main --session-id $SESSION_ID --message 'your task'"
echo ""
echo "# With thinking level:"
echo "openclaw agent --agent main --session-id $SESSION_ID --message 'complex task' --thinking high"
echo ""
echo "# For blockchain operations:"
echo "openclaw agent --agent main --session-id $SESSION_ID --message 'coordinate blockchain deployment' --thinking medium"

View File

@@ -386,7 +386,7 @@ echo "• ✅ Forum demonstration"
echo ""
echo "🎯 AGENT COMMUNICATION: IMPLEMENTATION COMPLETE"
echo "📋 OpenClaw agents can now communicate over the blockchain like in a forum"
echo "📋 hermes agents can now communicate over the blockchain like in a forum"
echo ""
echo "📄 Available endpoints:"
echo "• GET /rpc/messaging/topics - List forum topics"
@@ -401,4 +401,4 @@ echo "• POST /rpc/messaging/messages/{id}/vote - Vote on message"
rm -f /tmp/test_agent_communication.py
echo ""
echo "🎉 OpenClaw agents now have forum-like communication capabilities on the blockchain!"
echo "🎉 hermes agents now have forum-like communication capabilities on the blockchain!"

View File

@@ -290,7 +290,7 @@ echo "6. 🏛️ Establish moderation policies"
echo "7. 📚 Create agent onboarding documentation"
echo ""
echo "🎯 MESSAGING CONTRACT: DEPLOYMENT COMPLETE"
echo "📋 OpenClaw agents can now communicate over the blockchain!"
echo "📋 hermes agents can now communicate over the blockchain!"
# Clean up
echo ""

View File

@@ -25,4 +25,4 @@ echo "Deployer: $DEPLOYER_ADDRESS"
echo ""
echo "✅ MESSAGING CONTRACT: DEPLOYMENT COMPLETE"
echo "📋 OpenClaw agents can now communicate over the blockchain!"
echo "📋 Hermes agents can now communicate over the blockchain!"

View File

@@ -322,25 +322,25 @@ phase4_blockchain_sync_event_bridge() {
log_success "Phase 4: Blockchain sync with event bridge completed"
}
# Phase 5: Agent Coordination via OpenClaw
# Phase 5: Agent Coordination via Hermes
phase5_agent_coordination() {
log_info "=== PHASE 5: AGENT COORDINATION VIA OPENCLAW ==="
log_info "=== PHASE 5: AGENT COORDINATION VIA HERMES ==="
# Check if OpenClaw is available
if command -v openclaw >/dev/null 2>&1; then
log_success "OpenClaw CLI found"
# Check if Hermes is available
if command -v hermes >/dev/null 2>&1; then
log_success "Hermes CLI found"
# Create a test session
local session_id="scenario_$(date +%s)"
log_info "Creating OpenClaw session: $session_id"
log_info "Creating Hermes session: $session_id"
# Send coordination message
log_info "Sending coordination message to agent network"
openclaw agent --agent main --session-id "$session_id" --message "Multi-node scenario coordination: All nodes operational" --thinking low 2>/dev/null || log_warning "OpenClaw agent command failed"
hermes agent --agent main --session-id "$session_id" --message "Multi-node scenario coordination: All nodes operational" --thinking low 2>/dev/null || log_warning "Hermes agent command failed"
log_success "Phase 5: Agent coordination completed"
else
log_warning "OpenClaw CLI not found, skipping agent coordination"
log_warning "Hermes CLI not found, skipping agent coordination"
fi
}

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python3
"""
Wrapper script for aitbc-openclaw service
Wrapper script for aitbc-hermes service
Uses centralized aitbc utilities for path configuration
"""
@@ -17,7 +17,7 @@ from aitbc import ENV_FILE, NODE_ENV_FILE, REPO_DIR, DATA_DIR, LOG_DIR
# Set up environment using aitbc constants
os.environ["AITBC_ENV_FILE"] = str(ENV_FILE)
os.environ["AITBC_NODE_ENV_FILE"] = str(NODE_ENV_FILE)
os.environ["PYTHONPATH"] = f"{REPO_DIR}/apps/openclaw-service/src"
os.environ["PYTHONPATH"] = f"{REPO_DIR}/apps/hermes-service/src"
os.environ["DATA_DIR"] = str(DATA_DIR)
os.environ["LOG_DIR"] = str(LOG_DIR)
@@ -26,7 +26,7 @@ exec_cmd = [
"/opt/aitbc/venv/bin/python",
"-m",
"uvicorn",
"openclaw_service.main:app",
"hermes_service.main:app",
"--host",
"0.0.0.0",
"--port",