Temporal Animation + Renaming Entities/Other Features#1108
Temporal Animation + Renaming Entities/Other Features#1108ClaireBookworm wants to merge 9 commits intodevfrom
Conversation
ClaireBookworm
commented
Jan 25, 2026
- added support for renaming entities, enabling a video example for showing graph
- showing graph_viz_server, to show a way to see the graphed relationships between entiites
Greptile OverviewGreptile SummaryThis PR adds entity renaming capabilities and visualization tools to the temporal memory system. The main additions include:
The implementation correctly uses parameterized SQL queries to prevent injection attacks in Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant TemporalMemory
participant VLM
participant EntityGraphDB
participant FlaskViz
Note over TemporalMemory,EntityGraphDB: Entity Renaming Flow
User->>TemporalMemory: query("rename person in brown jacket to john")
TemporalMemory->>TemporalMemory: Build prompt with rename instructions
TemporalMemory->>VLM: query(frame, prompt)
VLM-->>TemporalMemory: Response with RENAME_ENTITY command
TemporalMemory->>TemporalMemory: Extract rename via regex pattern
TemporalMemory->>TemporalMemory: rename_entity(entity_id="E8", new_name="john")
TemporalMemory->>EntityGraphDB: get_entity(entity_id)
EntityGraphDB-->>TemporalMemory: entity data
TemporalMemory->>TemporalMemory: Build new descriptor: "john (person wearing brown jacket)"
TemporalMemory->>EntityGraphDB: update_entity(entity_id, descriptor, metadata)
EntityGraphDB->>EntityGraphDB: Merge metadata with existing
EntityGraphDB->>EntityGraphDB: Execute SQL UPDATE with params
EntityGraphDB-->>TemporalMemory: Success
TemporalMemory->>TemporalMemory: Update entity roster in state
TemporalMemory->>TemporalMemory: Remove RENAME_ENTITY from response
TemporalMemory-->>User: Cleaned response text
Note over FlaskViz,EntityGraphDB: Visualization Flow
FlaskViz->>FlaskViz: Poll /api/graph every 1s
FlaskViz->>EntityGraphDB: get_all_entities()
EntityGraphDB-->>FlaskViz: entities list
FlaskViz->>EntityGraphDB: get_recent_relations()
EntityGraphDB-->>FlaskViz: relations list
FlaskViz->>EntityGraphDB: get_distance(e1, e2) for all pairs
EntityGraphDB-->>FlaskViz: distance data
FlaskViz->>FlaskViz: Render graph with vis.js
FlaskViz-->>User: Display updated entity names
|
| answer_text = answer_text.strip() | ||
|
|
||
| # Check for rename commands in the response | ||
| import re |
There was a problem hiding this comment.
re module imported inside method instead of at module level - move to top imports for better performance
| print("🌐 Open http://localhost:8080 in your browser") | ||
| print("Press Ctrl+C to stop") | ||
|
|
||
| app.run(host="0.0.0.0", port=8080, debug=False, threaded=True) |
There was a problem hiding this comment.
Flask server binds to 0.0.0.0 making it accessible from any network interface - this could expose the temporal memory database to unauthorized access. Consider binding to 127.0.0.1 for localhost-only access unless external access is specifically required.
dimos/perception/experimental/temporal_memory/video_temporal_example.py
Outdated
Show resolved
Hide resolved
leshy
left a comment
There was a problem hiding this comment.
In experimental/ so happy to let through with minimal understanding, is that the plan?