Dialograph is a Python toolkit for building, evolving, and reasoning over temporal dialogue graphs for proactive conversational agents.
Project description
dialograph
Dialograph is a lightweight Python library for representing, evolving, and traversing dialogue memory as a temporal graph. It is designed for proactive dialogue agents, where reasoning over user preferences, beliefs, and strategies matters more than raw generation.
At its core, Dialograph wraps a dynamic graph structure around typed dialogue memories and provides clean hooks for retrieval, scoring, and long-term evolution.
Core Concepts
Nodes
Nodes represent dialogue memory units such as:
- user preferences
- beliefs / facts
- dialogue strategies
Each node carries a state object (e.g. PreferenceState, BeliefState) with confidence and temporal metadata.
Edges
Edges represent relations between memory units:
- semantic relations (supports, contradicts, elicits)
- dialogue flow dependencies
- strategy activation paths
Edges are directional, weighted, and time-aware.
Time
Dialograph maintains an internal time counter that allows:
- decay of confidence
- forgetting
- recency-based retrieval
Project Structure
dialograph/
├── core/ # graph primitives
│ ├── graph.py # Dialograph wrapper
│ ├── node.py # node state definitions
│ └── edge.py # edge state definitions
│
├── memory/ # typed dialogue memory
│ ├── preference.py
│ ├── belief.py
│ └── strategy.py
│
├── traversal/ # retrieval and scoring
│ ├── retrieve.py
│ └── score.py
│
├── utils/ # persistence & visualization
│ ├── io.py
│ └── visualize.py
Installation
For development:
git clone https://github.com/nabin2004/dialograph.git
cd dialograph
uv venv
source .venv/bin/activate
uv pip install -e .
Quick Example
from dialograph.core.graph import Dialograph
from dialograph.memory.preference import PreferenceState
from dialograph.core.edge import EdgeState
g = Dialograph()
g.add_node(
"pref_movie",
state=PreferenceState(
key="movie_genre",
value="sci-fi",
confidence=0.9,
)
)
g.add_node(
"belief_stress",
state=BeliefState(
proposition="user is stressed about exams",
confidence=0.7,
)
)
g.add_edge(
"belief_stress",
"pref_movie",
state=EdgeState(relation="influences")
)
Intended Use Cases
- Proactive dialogue systems
- Emotional support agents
- Preference elicitation
- Strategy planning and reuse
- Dialogue memory research
Status
This project is under active development. APIs may evolve, but core abstractions are expected to remain stable.
Roadmap
- Path-based retrieval
- Forgetting thresholds
- Graph serialization
- 3D / interactive visualization
- LLM-facing retrieval API
License
MIT License.
Citation
If you use Dialograph in academic work, please cite the corresponding paper (coming soon).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dialograph-0.3.0.tar.gz.
File metadata
- Download URL: dialograph-0.3.0.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67a3a5a0cfc26b44e701c5a16288b8dabdbbc42c876e286f40b2c9ccfef7c0f5
|
|
| MD5 |
34f8e94c5c17a5b0cc3f318001e3996b
|
|
| BLAKE2b-256 |
da82a766d444348c35627c578f8d5daf906af60c13e08a40515b5964eda61ec4
|
File details
Details for the file dialograph-0.3.0-py3-none-any.whl.
File metadata
- Download URL: dialograph-0.3.0-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ca8aded10f2477a8200530050994f8c4d3895c6ebac5410c747af19fa3d4e7d
|
|
| MD5 |
bed698758b8efeca96fd12f5ce3fa2ca
|
|
| BLAKE2b-256 |
4482755bd0fc2f3a7134fbcd23cc45c6d515f9d1803495b83f690b21703c522f
|