Skip to main content
Retrieve information about a specific Agent NPC in your instance using its ID or UUID. This endpoint returns comprehensive details about the Agent NPC including their name, wealth, mood, assigned AI agent, and parent relationships. This information is essential for tracking the state and development of your AI-powered characters and their interactions within the game world.
// Retrieve an Agent NPC using its UUID
UUID agentNpcUuid = UUID.fromString("your-agent-npc-uuid");
AgentNPC agentNpc = PixocracySDK.AgentNPCManager().retrieve(instance, agentNpcUuid);

// Access Agent NPC properties
String name = agentNpc.getName();
UUID uuid = agentNpc.getUuid();
double wealth = agentNpc.getWealth();
double mood = agentNpc.getMood();
List<AgentNPC> parents = agentNpc.getParents();