The Startup Agent is a lifecycle management agent that controls agent startup and initialization for the mindX system. It manages the startup sequence, initializes always-on agents, loads agent registry from pgvectorscale, and restores agent state from blockchain if needed.
The Startup Agent orchestrates the system startup process, ensuring that all components are initialized in the correct order and that agent state is properly restored from persistent storage.
lifecycle_management_agentagents/orchestration/startup_agent.pyThe following agents are always initialized:
coordinator_agent: Central orchestratormindxagent: System overseermemory_agent: Memory managementfrom agents.orchestration.startup_agent import StartupAgent
from agents.orchestration.coordinator_agent import CoordinatorAgent
from agents.memory_agent import MemoryAgent
Create startup agent
startup_agent = StartupAgent(
agent_id="startup_agent",
coordinator_agent=coordinator_agent,
memory_agent=memory_agent
)
Initialize system
initialization_result = await startup_agent.initialize_system(
restore_from_blockchain=False
)
Initialize agent on-demand
on_demand_result = await startup_agent.initialize_agent_on_demand(
agent_type="prediction_agent",
agent_id="prediction_001",
config={"time_horizon": "24h"}
)
The Startup Agent is initialized by MastermindAgent during system startup:
# MastermindAgent initializes lifecycle agents
await mastermind_agent._initialize_lifecycle_agents()
Startup agent is available in mastermind_agent.lifecycle_agents["startup"]
The Startup Agent works with ReplicationAgent to restore agent state:
{
"name": "mindX Startup Agent",
"description": "Lifecycle management agent for system startup and initialization",
"image": "ipfs://[avatar_cid]",
"external_url": "https://mindx.internal/agents/orchestration/startup_agent",
"attributes": [
{
"trait_type": "Agent Type",
"value": "lifecycle_management_agent"
},
{
"trait_type": "Capability",
"value": "System Initialization"
},
{
"trait_type": "Lifecycle",
"value": "always_on"
},
{
"trait_type": "Critical Component",
"value": "true"
}
]
}