A compositional framework for dialogue systems.
Project description
DIALOGUS
SYNOPSIS
A compositional framework for AI-based dialogue systems.
DESCRIPTION
Dialogus is a facility for constructing complex conversational systems through the composition of simple, independent processing units. It provides a minimal set of primitives for message passing, transformation, and routing.
The complexity of modern AI applications often leads to brittle, entangled architectures. Dialogus posits that complex behavior emerges not from complex components, but from the rigorous composition of simple ones.
PHILOSOPHY
The design of dialogus is informed by the Unix philosophy:
- Make each program do one thing well (composition over inheritance and monolithic design).
- Expect the output of every program to become the input to another, as yet unknown, program.
- Design and build software to be tried early, ideally within weeks.
- Write programs to handle a universal interface.
- Economy and elegance of design due to constraints ("salvation through suffering").
- Make it easy to write, test, and run programs.
- Self-supporting system: our system is maintained by itself.
- We do not attempt to predict user needs; we provide the primitives with which users can solve their own problems.
- Simplicity > explicitness > complexity > cleverness.
ARCHITECTURE
The system maps the abstract concepts of Information Theory onto three fundamental primitives.
1. MESSAGE
NAME
Message — the immutable quantum of information.
SYNOPSIS
Message:
content: Any
id: str
name: str
timestamp: int
DESCRIPTION
A Message is a typed, immutable value object serving as the sole unit of exchange between processors.
In dialogus, "everything is a Message" (just as in Unix "everything is a file"). A Message is a discrete, self-identifying packet of typed data.
It is strictly immutable. State is never mutated in place; it is transformed by creating new Messages. This immutability guarantees that the history of a conversation is a perfect, append-only log of information states.
- Identity: Unique ID and timestamp.
- Type: Explicit class definition (e.g.,
UserQuery,LLMResponse) used for routing. - Payload: Rigid, immutable.
2. PROCESSOR
NAME
Processor — the information channel.
SYNOPSIS
Processor:
task_manager: TaskManager
output_types: Optional[set[type[Message]]]
observers: Optional[list[BaseObserver]]
DESCRIPTION
A Processor is a noisy channel that accepts a Message, performs work, and produces a new Message. It is the atom of computation, equivalent to a Unix filter.
The interface is polymorphic. To the framework, there is no distinction between an LLM, a database query, a REST API call, or a conditional logic block. They are all simply Processors.
- Input: Accepts exactly one
Message. - Output: Returns exactly one
Message. - State: While the interface is functional, the implementation may be stateful (e.g., maintaining chat history or buffer windows).
3. COMPOSITE
NAME
Composite — the information topology.
SYNOPSIS
Composite:
handlers: dict[type[Message], Processor]
max_hops: int = 30
DESCRIPTION
The Composite is a Processor that contains other processors. It does not perform work itself; it routes information.
Routing is Type-Based. The Composite maintains a routing table mapping InputType -> Processor. When a message enters the Composite, it is inspected, routed to the matching handler, and the result is re-evaluated for the next route.
MECHANICS
- 1:1 Routing: Each
Messagetype has exactly one handler in a givenCompositecontext. - Recursion: Since a
Compositeis aProcessor, it can be nested within otherComposites, allowing for fractal architectures (Agents within Agents). - Termination: Flow stops when a processor returns an
EgressMessageis produced, or themax_hopslimit is reached.
STANDARDS
The aesthetic of the project is industrial. We build tools for engineers, not consumers.
- Boring: Code should be predictable and standard. Excitement in code is usually a synonym for error.
- Minimal: If a feature can be implemented in user-space, it does not belong in the kernel (core).
- Explicit: Magic is forbidden. Control flow must be visible.
Project details
Release history Release notifications | RSS feed
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 dialogus-0.1.0.tar.gz.
File metadata
- Download URL: dialogus-0.1.0.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55246e8a57459de24b52430fe7ef64c425086e71291ea8b846d18728d26ea8f5
|
|
| MD5 |
fedd419d8b95ecdbc30548351ab7b6c4
|
|
| BLAKE2b-256 |
4ed0850801c7ea5c3952ca30304c545a6bb30db242d52adfed20da1088f64eec
|
File details
Details for the file dialogus-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dialogus-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bff83604adc7b129636ac71418488c2ea07b9710a0605f09013a9ee52453365c
|
|
| MD5 |
d9ab69104f5d36532c93628036e9584a
|
|
| BLAKE2b-256 |
9847df1f55fee5910821b42c8432056e5f1cb2754dc6f63d0ce12a4323ac0d4e
|