PlanOpticon
| b363c5b… | noreply | 1 | # PlanOpticon |
| b363c5b… | noreply | 2 | |
| b363c5b… | noreply | 3 | Video analysis and knowledge extraction CLI. Processes recordings into structured knowledge graphs with entities, relationships, and insights. |
| b363c5b… | noreply | 4 | |
| b363c5b… | noreply | 5 | ## Knowledge Graph Query Skill |
| b363c5b… | noreply | 6 | |
| b363c5b… | noreply | 7 | PlanOpticon can build and query knowledge graphs from video content. If you see `knowledge_graph.db` or `knowledge_graph.json` files in the workspace, you can query them to understand what was discussed. |
| b363c5b… | noreply | 8 | |
| b363c5b… | noreply | 9 | ### Auto-detection |
| b363c5b… | noreply | 10 | |
| b363c5b… | noreply | 11 | Look for these files (checked automatically): |
| 0981a08… | noreply | 12 | - `knowledge_graph.db` — SQLite graph database (preferred) |
| b363c5b… | noreply | 13 | - `knowledge_graph.json` — JSON export (fallback) |
| b363c5b… | noreply | 14 | |
| b363c5b… | noreply | 15 | Common locations: project root, `results/`, `output/`, `knowledge-base/`. |
| b363c5b… | noreply | 16 | |
| b363c5b… | noreply | 17 | ### Quick commands |
| b363c5b… | noreply | 18 | |
| b363c5b… | noreply | 19 | ```bash |
| b363c5b… | noreply | 20 | # Show graph stats (entity/relationship counts) |
| b363c5b… | noreply | 21 | planopticon query |
| b363c5b… | noreply | 22 | |
| b363c5b… | noreply | 23 | # List entities filtered by type |
| b363c5b… | noreply | 24 | planopticon query "entities --type technology" |
| b363c5b… | noreply | 25 | planopticon query "entities --type person" |
| b363c5b… | noreply | 26 | |
| b363c5b… | noreply | 27 | # Search entities by name |
| b363c5b… | noreply | 28 | planopticon query "entities --name python" |
| b363c5b… | noreply | 29 | |
| b363c5b… | noreply | 30 | # See what connects to an entity |
| b363c5b… | noreply | 31 | planopticon query "neighbors Alice" |
| b363c5b… | noreply | 32 | |
| b363c5b… | noreply | 33 | # List relationships |
| b363c5b… | noreply | 34 | planopticon query "relationships --source Alice" |
| b363c5b… | noreply | 35 | |
| b363c5b… | noreply | 36 | # Natural language (requires API key) |
| b363c5b… | noreply | 37 | planopticon query "What technologies were discussed?" |
| b363c5b… | noreply | 38 | planopticon query "Who are the key people mentioned?" |
| b363c5b… | noreply | 39 | |
| b363c5b… | noreply | 40 | # Output as JSON or Mermaid diagram |
| b363c5b… | noreply | 41 | planopticon query --format json stats |
| b363c5b… | noreply | 42 | planopticon query --format mermaid "neighbors Alice" |
| b363c5b… | noreply | 43 | |
| b363c5b… | noreply | 44 | # Interactive REPL |
| b363c5b… | noreply | 45 | planopticon query -I |
| b363c5b… | noreply | 46 | ``` |
| b363c5b… | noreply | 47 | |
| b363c5b… | noreply | 48 | ### When to use |
| b363c5b… | noreply | 49 | |
| b363c5b… | noreply | 50 | - **Direct mode** (`stats`, `entities`, `neighbors`, `relationships`): No API key needed. Fast, deterministic. Use for structured lookups. |
| b363c5b… | noreply | 51 | - **Agentic mode** (natural language questions): Requires an API key (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, etc.). Use when the user asks open-ended questions about the content. |
| b363c5b… | noreply | 52 | |
| b363c5b… | noreply | 53 | ### Python API |
| b363c5b… | noreply | 54 | |
| b363c5b… | noreply | 55 | ```python |
| b363c5b… | noreply | 56 | from video_processor.integrators.graph_query import GraphQueryEngine |
| b363c5b… | noreply | 57 | from video_processor.integrators.graph_discovery import find_nearest_graph |
| b363c5b… | noreply | 58 | |
| b363c5b… | noreply | 59 | path = find_nearest_graph() |
| b363c5b… | noreply | 60 | engine = GraphQueryEngine.from_db_path(path) |
| b363c5b… | noreply | 61 | result = engine.stats() |
| b363c5b… | noreply | 62 | print(result.to_text()) |
| b363c5b… | noreply | 63 | ``` |