- Import MessageStorage and PeerStorage in lifespan
- Initialize message_storage and peer_storage with Redis URL
- Add start/stop lifecycle management for storage services
- Add protocol field to MessageRequest model with validation
- Add BroadcastRequest model with agent_type and capabilities filters
- Store sent messages in Redis with metadata (message_id, sender, receiver, type, priority, protocol, timestamp)
- Add /
- Replace stub agent list data with real /agents/discover API call
- Transform coordinator response to CLI format with agent_id, status, type, capabilities, and services
- Add status filter query parameter support
- Implement fallback to stub data on API failure or connection error
- Add count field to response for consistency
- _least_connections_selection() was checking active_connections
(never updated) instead of pending_tasks (incremented by assign_task)
- Now tasks are properly distributed across all available agents
- Verified with 4 agents and 12 tasks - all agents receive tasks
- Created generate_certificates.py:
- Generates shields.io markdown badges for each completed stage
- Creates HTML certificates with styled formatting
- Generates summary certificate for completing all stages
- Produces Markdown summary with all badges
- Updated master_training_launcher.sh:
- Added BADGE_DIR and HTML_CERT_DIR variables
- Enhanced view_certificates() to display badges and HTML cert paths
- Added option to start HTTP server for viewing HTML certificates
- Shows badges summary in certificate viewer
- Generated badges and HTML certificates for stages 1-10
- Fixed async test fixtures (pytest-asyncio compatibility)
- Updated tests to match actual API response formats
- All 25 integration tests now passing
- Added pytest and pytest-asyncio to dependencies
- Read REDIS_URL from environment variable with default fallback to redis://localhost:6379/1
- Pass redis_url parameter to AgentRegistry initialization
- Add logging for Redis URL being used
- Add /agents/{agent_id}/heartbeat endpoint to receive and process agent heartbeats
- Add /tasks/queues endpoint to retrieve task queue sizes across all priorities
- Add /tasks/queues/{priority}/clear endpoint to clear specific priority queues
- Add /tasks/queues/stats endpoint to get detailed queue and distribution statistics
- Implement get_queue_sizes() method in TaskDistributor to return queue sizes by priority
- Implement clear_queue() method in TaskDistributor to drain
- Add handle_ai_distribution_stats() to query task distribution statistics from coordinator
- Update handle_agent_sdk_action() register to call /agents/register endpoint with full registration data
- Update handle_agent_sdk_action() list to call /agents/discover endpoint with filtering
- Update handle_agent_sdk_action() status to call /agents/{agent_id} endpoint
- Add handle_agent_sdk_action() update-status to call /agents/{agent_id}/status endpoint
- Add CLI
- Use /var/lib/aitbc/agent_coordinator.db for persistent storage
- Add agents and agent_assignments tables to database schema
- Implement agent registration endpoint with capabilities and services
- Add agent discovery endpoint with filtering by type, capabilities, and services
- Implement agent status updates and heartbeat mechanism
- Add task-to-agent assignment with least_connections load balancing strategy
- Update
- Add comprehensive changelog section with versions 1.0, 1.1, and 2.0
- Document Hermes framework migration in Version 2.0 (2026-05-07)
- Update OpenClaw reference to Hermes in overview
- Add version history: initial release (1.0), April update (1.1), Hermes integration (2.0)
- Document system architecture alignment and service integration updates
- Use .get() with default value instead of direct dictionary access
- Default title: 'Stage {stage_number}'
- Fixes Stage 10 and other JSON stages without 'title' field
- Tested: Stage 10 now loads successfully
- TOTAL_STAGES=11
- Added Stage 10 to get_stage_name() and menus
- Updated for loops to {0..10}
- Updated usage messages to [0-10]
- Fixed regex to match stage 10: ^(10|[0-9])$
Add real-time AITBC service log monitoring command to Stage 10:
- Added journalctl -fu aitbc-* to JSON examples (monitors all AITBC services)
- Added to output_stage_learnings() commands list
- Updated pitfalls to mention journalctl as primary log monitoring tool
This command provides real-time monitoring of all AITBC services
(blockchain-node, agent-coordinator, etc.) in a single view.
Address Hermes-identified training gaps with new advanced stage:
Stage 10 covers:
- Transaction failure debugging (nonce too low, insufficient funds)
- Node failure recovery procedures
- Wallet backup and restore operations
- Production monitoring (metrics, logs, health checks)
- Advanced debugging tools (mempool inspection, transaction tracing)
- Backup and restore procedures (database, configuration)
- Network partition handling
Implementation:
- Created stage10_failure_recovery.sh with output_stage_learnings()
- Created stage10_failure_recovery.json with 7 sections covering failure scenarios
- Updated master_training_launcher.sh to include stage10 in get_stage_name()
- Updated stage selection prompts to allow [0-10]
- Updated --stage and --with-skill-update validation for stage 10
- Added stage 10 to playground menu stage list
Training-to-skill pipeline verified:
- Learnings JSON created successfully
- Certificate generated
- capture_learnings() validates and reports to Hermes agent
Note: Python training setup JSON execution has structure mismatch
(missing 'title' field), but stage completes successfully and
learnings are captured via output_stage_learnings().
- Fix REPO_ROOT path in stage8 and stage9 scripts
- Remove --json flag from Python command (use positional arg)
- Stages 8-9 now run successfully with --with-skill-update
- All 9 stages now generate learnings files correctly
Bug: Learnings file was created but disappeared after script exit because
SCRIPT_DIR was undefined in training_lib.sh context.
Fix: Use REPO_ROOT to construct path to training state directory:
- Changed from /.training_state
- To /scripts/training/.training_state
This ensures the learnings file is created in the correct location where
capture_learnings() in master_training_launcher.sh can find it.
Add learning capture and skill update mechanism to AITBC training system:
Phase 1 - Learning Capture Function:
- Add capture_learnings() function to master_training_launcher.sh
- Reads learnings JSON from stage scripts
- Validates JSON structure
- Calls hermes-tools skill-manage to update agent skills
- Stage 1 creates skill, subsequent stages update it
- Falls back to JSON-only if hermes-tools unavailable
Phase 2 - Optional Skill Update Flag:
- Add --with-skill-update CLI flag
- Set ENABLE_SKILL_UPDATE global variable
- Support flag combination with --stage and --complete
- Default behavior: save learnings JSON without skill update
Phase 3 - Integration:
- Call capture_learnings() after certificate generation
- Pass ENABLE_SKILL_UPDATE to control skill update behavior
- Integrated into run_stage() function
Phase 4 - Helper Function:
- Add output_stage_learnings() to training_lib.sh
- Accepts stage number, name, commands, pitfalls, key_paths, concepts
- Creates structured JSON learnings file
- Saves to .training_state/learnings_stageN.json
Phase 5 - Stage Script Learning Output:
- Add learning output to all stage scripts (0-9)
- Each stage defines stage-specific learnings
- Format: commands, pitfalls, key_paths, concepts
- Called at successful stage completion
This enables new agents on new AITBC nodes to automatically persist
training knowledge via the hermes-tools skill management system.
- Add debug output in view_certificates() to show certificate directory path
- Display count of found certificate files
- Show directory contents when no certificates found for troubleshooting
- Make stage6_agent_development.sh executable
- Make stage7_cross_node_training.sh executable
Created placeholder shell scripts for stages that only had JSON definitions:
- stage0_environment_setup.sh - Environment setup and prerequisites
- stage8_advanced_agent_specialization.sh - Bounty systems, portfolio management, knowledge graph marketing
- stage9_multi_chain_architecture.sh - Cross-chain operations and multi-chain deployment
These scripts use the Python-based training setup to execute JSON-defined operations,
allowing the complete training program (stages 0-9) to run without errors.
Changes:
- Fix certificate viewing display issue in master_training_launcher.sh
- Use array to store certificate files for reliable iteration
- Add error handling for read command
- Ensure CERT_DIR exists before checking for certificates
- Fix certificate selection using array index instead of head/tail
- Add wallet funding script (scripts/training/fund_wallet.sh)
- Fund wallets from genesis using genesis password
- Reads password from /var/lib/aitbc/keystore/.genesis_password
- Verifies genesis balance before funding
- Shows transaction hash and wallet balance after funding
- Add wallet funding documentation (docs/agent-training/WALLET_FUNDING.md)
- Genesis wallet details and password location
- Quick funding script usage
- Manual funding with AITBC CLI
- Faucet service information
- Common training wallets
- Troubleshooting guide
- Security notes
Added error handling to read commands to gracefully handle EOF
when script is run with piped input (e.g., echo "8" | script).
Changes:
- show_menu(): Added || choice="" to handle read failure
- main(): Added || start_choice="y" to default to yes if read fails
This prevents set -e from causing script to exit with error
code 1 when read commands reach EOF with piped input.
Removed unconditional 'main' call after case statement.
The case statement already handles the empty string case
by calling main, so the extra call was causing all
command-line arguments to be ignored and training to run.
- Remove duplicate malformed case statement causing syntax error
- Fix prerequisite check path from ../agent-training to ../docs/agent-training
- Fix path in both check_prerequisites() and check_all_prerequisites()
- Remove --force flag from genesis command (not supported)
- Read genesis password from /var/lib/aitbc/keystore/.genesis_password
- Fix faucet funding to use proper genesis password
Note: Script is deprecated in favor of Python-based setup
(aitbc.training_setup.cli), but these fixes make it work
with current CLI for backwards compatibility.
Certificate System:
- JSON certificates stored in .training_state/certificates/
- Includes stage number, name, completion timestamp, wallet name
- Unique certificate_id for each completion
- Version tracking for future updates
New Functions:
- get_stage_name() - Map stage number to name
- generate_certificate() - Create JSON certificate file
- display_badge() - ASCII art badge on completion
- view_certificates() - List and view earned certificates
- export_certificate() - Export certificate to home directory
Integration:
- Certificate generation in run_stage() on success
- Certificate viewing in main menu (option 7)
- Certificate viewing/exporting in playground menu (options 6-7)
- Certificates cleared on training state reset
Updates:
- Added CERT_DIR variable for certificate storage
- Initialize CERT_DIR in main()
- Updated .gitignore for certificates directory
- Menu options increased to accommodate certificate features
Usage:
- Certificates auto-generated on stage completion
- View via menu option 7 or playground option 6
- Export to home directory via playground option 7
Training Playground Features:
- Interactive playground mode with prerequisite validation
- Reset capability to clear progress and state
- Progressive training that skips completed stages
- Progress tracking via .training_progress file
- Sandbox state directory for safe experimentation
New Functions:
- load_progress() - Load completed stages from progress file
- save_progress() - Save completed stages to progress file
- reset_training_state() - Clear all progress and state
- check_prerequisites() - Integrate with generate_prerequisite_checks.py
- show_playground_menu() - Interactive playground menu
- check_all_prerequisites() - Validate all stages
- playground_run_stage() - Run stage with prerequisite check
- playground_run_complete() - Progressive complete training
Updates:
- TOTAL_STAGES increased from 7 to 10 (includes stages 0, 8, 9)
- Updated training stages list in overview
- Updated show_menu() to add playground option
- Updated run_complete_training() for stages 0-9
- Updated review_progress() to load from progress file
- Updated view_logs() for stages 0, 8, 9
- Added --playground command-line option
- Added .training_progress and .training_state to .gitignore
- Move validate_stage_dependencies.py to scripts/training/
- Move generate_prerequisite_checks.py to scripts/training/
- Scripts/training is the standard location for training-related scripts