# Context Graph Miner ## Overview `context_graph_miner` is a CLI tool for mining patterns and insights from context graphs generated by AI agents. It enables developers to identify decision-making trends, bottlenecks, and areas for improvement by analyzing the stored graph data. ## Features - Load context graphs from JSON files. - Query nodes in the graph based on attributes. - Generate reports summarizing nodes and edges in CSV or JSON formats. ## Installation Install the required dependencies: ```bash pip install networkx pandas ``` ## Usage Run the tool using the command line: ```bash python context_graph_miner.py --file [--query ] [--report ] ``` ### Arguments - `--file`: Path to the JSON file containing the context graph (required). - `--query`: Query string to search for specific nodes (optional). - `--report`: Generate a report in the specified format (`csv` or `json`) (optional). ### Example ```bash python context_graph_miner.py --file graph.json --query decision --report csv ``` ## Testing Run the tests using `pytest`: ```bash pytest test_context_graph_miner.py ``` ## License MIT License