Skip to main content
Glama

mind_status

Check the health status of a Hebbian learning neural memory graph by retrieving node count, edge count, memory usage, and strongest connections.

Instructions

Get Hebbian Mind health status including node count, edge count, memory count, and strongest connections.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for the 'mind_status' tool call in 'call_tool'.
    elif name == "mind_status":
        status = db.get_status()
        faiss_available = tether.is_available()
    
        return [
            types.TextContent(
                type="text",
                text=json.dumps(
                    {
                        "success": True,
                        "version": "2.3.1",
                        "status": "operational",
                        "statistics": {
                            "node_count": status["node_count"],
                            "edge_count": status["edge_count"],
                            "memory_count": status["memory_count"],
                            "total_activations": status["total_activations"],
                        },
                        "dual_write": status["dual_write"],
                        "decay": {
                            "engine": decay_engine.get_status(),
                            "stats": status.get("decay", {}),
                        },
                        "precog_integration": {
                            "available": PRECOG_AVAILABLE,
                            "path": str(Config.PRECOG_PATH) if Config.PRECOG_PATH else None,
                            "boost_keywords": 0.15,
                            "boost_node_name": 0.20,
                        },
                        "faiss_tether": {
                            "enabled": Config.FAISS_TETHER_ENABLED,
                            "host": (
                                Config.FAISS_TETHER_HOST
                                if Config.FAISS_TETHER_ENABLED
                                else None
                            ),
                            "port": (
                                Config.FAISS_TETHER_PORT
                                if Config.FAISS_TETHER_ENABLED
                                else None
                            ),
                            "status": "connected" if faiss_available else "offline",
                        },
                        "strongest_connections": status["strongest_edges"][:5],
                        "most_active_nodes": status["most_active_nodes"][:5],
                        "hebbian_principle": "Neurons that fire together, wire together",
                    },
                    indent=2,
                ),
            )
        ]
  • Tool registration for 'mind_status'.
        name="mind_status",
        description="Get Hebbian Mind health status including node count, edge count, memory count, and strongest connections.",
        inputSchema={"type": "object", "properties": {}},
    ),
  • The 'get_status' method in the 'HebbianMindDatabase' class, which provides the core status information used by the tool.
    def get_status(self) -> Dict:
        """Get database status including dual-write info."""
        cursor = self.read_conn.cursor()
    
        cursor.execute("SELECT COUNT(*) FROM nodes")
        node_count = cursor.fetchone()[0]
    
        cursor.execute("SELECT COUNT(*) FROM edges")
        edge_count = cursor.fetchone()[0]
    
        cursor.execute("SELECT COUNT(*) FROM memories")
        memory_count = cursor.fetchone()[0]
    
        cursor.execute("SELECT SUM(activation_count) FROM nodes")
        total_activations = cursor.fetchone()[0] or 0
    
        cursor.execute("""
            SELECT n1.name as source, n2.name as target, e.weight
            FROM edges e
            JOIN nodes n1 ON e.source_id = n1.id
            JOIN nodes n2 ON e.target_id = n2.id
            ORDER BY e.weight DESC
            LIMIT 10
        """)
        strongest_edges = [dict(row) for row in cursor.fetchall()]
    
        cursor.execute("""
            SELECT name, activation_count
            FROM nodes
            ORDER BY activation_count DESC
            LIMIT 10
        """)
        most_active = [dict(row) for row in cursor.fetchall()]
    
        # Decay stats
        decay_stats = {}
        if hasattr(self, "_decay_engine") and self._decay_engine:
            decay_stats = self._decay_engine.get_decay_stats()
    
        return {
            "node_count": node_count,
            "edge_count": edge_count,
            "memory_count": memory_count,
            "total_activations": total_activations,
            "strongest_edges": strongest_edges,
            "most_active_nodes": most_active,
            "dual_write": {
                "enabled": self.disk_conn is not None,
                "using_ram": self.using_ram,
                "ram_path": str(self.ram_path) if self.ram_path else None,
                "disk_path": str(self.disk_path),
            },
            "decay": decay_stats,
        }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/For-Sunny/hebbian-mind-enterprise'

If you have feedback or need assistance with the MCP directory API, please join our Discord server