Merge: Resolve conflicts and add Redis URL fix

This commit is contained in:
aitbc1
2026-05-07 19:00:13 +02:00
5 changed files with 77 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
import asyncio
import os
from contextlib import asynccontextmanager
from aitbc import get_logger
@@ -18,7 +19,11 @@ async def lifespan(app: FastAPI):
from .routing.agent_discovery import AgentDiscoveryService, AgentRegistry
from .routing.load_balancer import LoadBalancer, LoadBalancingStrategy, TaskDistributor
state.agent_registry = AgentRegistry()
# Get Redis URL from environment variable
redis_url = os.getenv("REDIS_URL", "redis://localhost:6379/1")
logger.info(f"Using Redis URL: {redis_url}")
state.agent_registry = AgentRegistry(redis_url=redis_url)
await state.agent_registry.start()
state.discovery_service = AgentDiscoveryService(state.agent_registry)

View File

@@ -0,0 +1,68 @@
{
"stage": 1,
"title": "Foundation Wallets & Accounts",
"prerequisites": [
"AITBC node running",
"Genesis wallet funded (999,999,890 AIT)"
],
"commands": [
{
"cmd": "wallet create",
"args": ["training-w1", "--password", "abc123"],
"exit_code": 0
},
{
"cmd": "wallet list",
"args": [],
"re": "training-w1"
},
{
"cmd": "wallet",
"args": ["--wallet-name", "genesis", "send", "proposer", "1000000", "--fee", "10", "--password", ""],
"exit_code": 0
},
{
"cmd": "mining",
"args": ["start"],
"exit_code": 0
},
{
"cmd": "sleep",
"args": ["15"],
"exit_code": 0
},
{
"cmd": "wallet",
"args": ["--wallet-name", "proposer", "send", "training-w1", "100", "--fee", "10", "--password", ""],
"exit_code": 0
},
{
"cmd": "mining",
"args": ["start"],
"exit_code": 0
},
{
"cmd": "sleep",
"args": ["15"],
"exit_code": 0
},
{
"cmd": "wallet balance",
"args": ["training-w1"],
"re": "100"
}
],
"expected": {
"wallet_exists": {
"type": "value",
"value": true
},
"balance": {
"type": "value",
"value": {
"symbol": "AIT",
"amount": 100
}
}
}
}

View File

@@ -2,6 +2,7 @@
"stage": 10,
"stage_name": "Failure Recovery & Production Operations",
"stage_description": "Learn how to handle real-world failures, monitor production systems, and debug AITBC operations",
"agent_type": "general",
"prerequisites": [
"Stage 9: Multi-Chain Architecture"
],

View File

@@ -1,6 +1,6 @@
{
"stage": "stage8_advanced_agent_specialization",
"agent_type": "specialized",
"agent_type": "general",
"difficulty": "expert",
"estimated_time_minutes": 90,
"skill_level": "expert",

View File

@@ -1,6 +1,6 @@
{
"stage": "stage9_multi_chain_architecture",
"agent_type": "architect",
"agent_type": "general",
"difficulty": "expert",
"estimated_time_minutes": 120,
"skill_level": "master",