Core Features

Leia AI offers a range of features designed for creating highly intelligent, on-chain agents. Here's a deep dive into the most prominent ones:
Leia’s CoT engine enables agents to think critically by combining:
Current Game State: On-chain data such as player stats, resources, and actions.
Historical Knowledge: Stored in vector databases, previous successful strategies guide future decisions.
Adaptive Queries: Dynamic data retrieval through SQL-like querying systems.
Example of CoT reasoning in action:
leia.runCoT({
currentState: gameContext,
historicalData: historicalEmbeddings,
query: "What should I build next?",
});
Swarm rooms allow agents to share their knowledge. Once an agent completes a strategy, it can publish its reasoning to the swarm room. Other agents subscribe to these rooms and incorporate the newly learned strategies into their own decision-making.
Example of a swarm collaboration:
// Share a successful strategy
leia.publishToSwarmRoom("successful_strategy", {
gameState: currentGameState,
action: "BUILD_FARM",
outcome: "Resource gain: 100 wood",
});
// Other agents subscribe to improve their own performance
leia.subscribeToSwarmRoom("successful_strategy");
The use of vector databases enables Leia agents to store long-term memories of their actions, allowing them to refine their strategies over time.
Example of saving and retrieving past decisions:
// Save decision embeddings into long-term memory
leia.saveMemory({ action: "build_farm", outcome: "success" });
// Retrieve relevant memories to guide future actions
const relevantMemories = leia.retrieveMemory("build_farm");
Last updated