Files
aitbc/.windsurf/references/ai-operations-reference.md
aitbc 084dcdef31
Some checks failed
Security Scanning / security-scan (push) Has been cancelled
Documentation Validation / validate-docs (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
docs: update refactoring summary and mastery plan to reflect completion of all 11 atomic skills
- Mark Phase 2 as completed with all 11/11 atomic skills created
- Update skill counts: AITBC skills (6/6), OpenClaw skills (5/5)
- Move aitbc-node-coordinator and aitbc-analytics-analyzer from remaining to completed
- Update Phase 3 status from PLANNED to IN PROGRESS
- Add Gitea-based node synchronization documentation (replaces SCP)
- Clarify two-node architecture with same port (8006) on different I
2026-04-10 12:46:09 +02:00

7.5 KiB

AITBC AI Operations Reference

AI Job Types and Parameters

Inference Jobs

# Basic image generation
./aitbc-cli ai job submit --wallet genesis-ops --type inference --prompt "Generate image of futuristic city" --payment 100

# Text analysis
./aitbc-cli ai job submit --wallet genesis-ops --type inference --prompt "Analyze sentiment of this text" --payment 50

# Code generation
./aitbc-cli ai job submit --wallet genesis-ops --type inference --prompt "Generate Python function for data processing" --payment 75

Training Jobs

# Model training
./aitbc-cli ai job submit --wallet genesis-ops --type training --model "custom-model" --dataset "training_data.json" --payment 500

# Fine-tuning
./aitbc-cli ai job submit --wallet genesis-ops --type training --model "gpt-3.5-turbo" --dataset "fine_tune_data.json" --payment 300

Multimodal Jobs

# Image analysis
./aitbc-cli ai job submit --wallet genesis-ops --type multimodal --prompt "Analyze this image" --image-path "/path/to/image.jpg" --payment 200

# Audio processing
./aitbc-cli ai job submit --wallet genesis-ops --type multimodal --prompt "Transcribe audio" --audio-path "/path/to/audio.wav" --payment 150

Resource Allocation

GPU Resources

# Single GPU allocation
./aitbc-cli resource allocate --agent-id ai-inference-worker --gpu 1 --memory 8192 --duration 3600

# Multiple GPU allocation
./aitbc-cli resource allocate --agent-id ai-training-agent --gpu 2 --memory 16384 --duration 7200

# GPU with specific model
./aitbc-cli resource allocate --agent-id ai-agent --gpu 1 --memory 8192 --duration 3600 --model "stable-diffusion"

CPU Resources

# CPU allocation for preprocessing
./aitbc-cli resource allocate --agent-id data-processor --cpu 4 --memory 4096 --duration 1800

# High-performance CPU allocation
./aitbc-cli resource allocate --agent-id ai-trainer --cpu 8 --memory 16384 --duration 7200

Marketplace Operations

Creating AI Services

# Image generation service
./aitbc-cli market service create --name "AI Image Generation" --type ai-inference --price 50 --wallet genesis-ops --description "Generate high-quality images from text prompts"

# Model training service
./aitbc-cli market service create --name "Custom Model Training" --type ai-training --price 200 --wallet genesis-ops --description "Train custom models on your data"

# Data analysis service
./aitbc-cli market service create --name "AI Data Analysis" --type ai-processing --price 75 --wallet genesis-ops --description "Analyze and process datasets with AI"

Marketplace Interaction

# List available services
./aitbc-cli market service list

# Search for specific services
./aitbc-cli market service search --query "image generation"

# Bid on service
./aitbc-cli market order bid --service-id "service_123" --amount 60 --wallet genesis-ops

# Execute purchased service
./aitbc-cli market order execute --service-id "service_123" --job-data "prompt:Generate landscape image"

Agent AI Workflows

Creating AI Agents

# Inference agent
./aitbc-cli agent create --name "ai-inference-worker" --description "Specialized agent for AI inference tasks" --verification full

# Training agent
./aitbc-cli agent create --name "ai-training-agent" --description "Specialized agent for AI model training" --verification full

# Coordination agent
./aitbc-cli agent create --name "ai-coordinator" --description "Coordinates AI jobs across nodes" --verification full

Executing AI Agents

# Execute inference agent
./aitbc-cli agent execute --name "ai-inference-worker" --wallet genesis-ops --priority high

# Execute training agent with parameters
./aitbc-cli agent execute --name "ai-training-agent" --wallet genesis-ops --priority high --parameters "model:gpt-3.5-turbo,dataset:training.json"

# Execute coordinator agent
./aitbc-cli agent execute --name "ai-coordinator" --wallet genesis-ops --priority high

Cross-Node AI Coordination

Multi-Node Job Submission

# Submit to specific node
./aitbc-cli ai job submit --wallet genesis-ops --type inference --prompt "Generate image" --target-node "aitbc1" --payment 100

# Distribute training across nodes
./aitbc-cli ai job submit --wallet genesis-ops --type training --model "distributed-model" --nodes "aitbc,aitbc1" --payment 500

Cross-Node Resource Management

# Allocate resources on follower node
ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli resource allocate --agent-id ai-agent --gpu 1 --memory 8192 --duration 3600'

# Monitor multi-node AI status
./aitbc-cli ai job status --multi-node

AI Economics and Pricing

Job Cost Estimation

# Estimate inference job cost
./aitbc-cli ai estimate --type inference --prompt-length 100 --resolution 512

# Estimate training job cost
./aitbc-cli ai estimate --type training --model-size "1B" --dataset-size "1GB" --epochs 10

Payment and Earnings

# Pay for AI job
./aitbc-cli ai payment pay --job-id "job_123" --wallet genesis-ops --amount 100

# Check AI earnings
./aitbc-cli ai payment earnings --wallet genesis-ops --period "7d"

AI Monitoring and Analytics

Job Monitoring

# Monitor specific job
./aitbc-cli ai job status --job-id "job_123"

# Monitor all jobs
./aitbc-cli ai job status --all

# Job history
./aitbc-cli ai job history --wallet genesis-ops --limit 10

Performance Metrics

# AI performance metrics
./aitbc-cli ai metrics --agent-id "ai-inference-worker" --period "1h"

# Resource utilization
./aitbc-cli resource utilization --type gpu --period "1h"

# Job throughput
./aitbc-cli ai metrics throughput --nodes "aitbc,aitbc1" --period "24h"

AI Security and Compliance

Secure AI Operations

# Secure job submission
./aitbc-cli ai job submit --wallet genesis-ops --type inference --prompt "Generate image" --payment 100 --encrypt

# Verify job integrity
./aitbc-cli ai job verify --job-id "job_123"

# AI job audit
./aitbc-cli ai job audit --job-id "job_123"

Compliance Features

  • Data Privacy: Encrypt sensitive AI data
  • Job Verification: Cryptographic job verification
  • Audit Trail: Complete job execution history
  • Access Control: Role-based AI service access

Troubleshooting AI Operations

Common Issues

  1. Job Not Starting: Check resource allocation and wallet balance
  2. GPU Allocation Failed: Verify GPU availability and driver installation
  3. High Latency: Check network connectivity and resource utilization
  4. Payment Failed: Verify wallet has sufficient AIT balance

Debug Commands

# Check AI service status
./aitbc-cli ai service status

# Debug resource allocation
./aitbc-cli resource debug --agent-id "ai-agent"

# Check wallet balance
./aitbc-cli wallet balance --name genesis-ops

# Verify network connectivity
ping aitbc1
curl -s http://localhost:8006/health

Best Practices

Resource Management

  • Allocate appropriate resources for job type
  • Monitor resource utilization regularly
  • Release resources when jobs complete
  • Use priority settings for important jobs

Cost Optimization

  • Estimate costs before submitting jobs
  • Use appropriate job parameters
  • Monitor AI spending regularly
  • Optimize resource allocation

Security

  • Use encryption for sensitive data
  • Verify job integrity regularly
  • Monitor audit logs
  • Implement access controls

Performance

  • Use appropriate job types
  • Optimize resource allocation
  • Monitor performance metrics
  • Use multi-node coordination for large jobs