Build desktop applications with dllm.chatapp and ChatTemplate

dllm.chatapp, part of the dronelabour-dllm Python library, provides the base classes for building conversational applications managed by DLLM Desktop. Build on that foundation to implement your application's commands, message handling, and workflow behaviour.

ChatTemplate is the starter repository that uses this application foundation. Clone and adapt the template, or let DLLM Desktop create and configure a new project from it.

The application foundation and the starter project

The library and the template have complementary roles:

PartWhat it provides
dllm.chatappReusable conversational application base classes in dronelabour-dllm.
ChatTemplateA starting Python project using those classes, with runtime configuration, coding-agent guidance, and a prompt folder.
Your applicationCommands, message handling, and the workflow you want to automate.
DLLM Desktop and App HubThe shared desktop chat interface and management of registered applications.

The package is installed as dronelabour-dllm; its Python modules use the dllm namespace. Your project extends the application foundation through its own code. DLLM Desktop sends messages and commands to the registered application; the application determines how to respond.

Start with DLLM Desktop's automatic setup

In DLLM Desktop, select New App +, choose the chattemplate template, and provide your application's name, description, and an empty repository's SSH URL. Select Create App to begin.

DLLM Desktop opens a Codex terminal to configure the project. The setup adapts the template's package names, application identity, and environment configuration for the new application.

Follow step 2, “Create the application from ChatTemplate,” and step 3, “Allow the project setup to run,” in Getting Started for the form values, screenshots, and setup instructions. Continue through that guide to confirm the application starts and responds to its first command.

Explore the repository with Codex

You can also open a local clone of the ChatTemplate repository in Codex to study how it uses dllm.chatapp. Begin with the repository's AGENTS.md and the instructions scoped to the code you are reading.

For example, ask:

Read this repository's AGENTS.md and explain how ChatTemplate uses
dllm.chatapp from dronelabour-dllm. Identify the application class,
its base classes, command registration, and message-handling flow.
Show where I should add my application's behaviour.

When adapting a clone into a new application, follow the repository's bootstrap guidance for its application ID, display name, package imports, runtime configuration, and Conda environment. Cloning alone does not complete that configuration or register the application with DLLM Desktop.

The MCP guide explains how to connect Codex to DLLM implementation documentation.

Extend the application

In a template-derived project, the main application class is commonly MainApp, in <app_package>/chatapp/service.py. The generated package name depends on your application; use its AGENTS.md to locate the actual entry point and inherited classes.

Use that class to initialize application dependencies, register commands, and coordinate responses. The existing command-registration pattern is:

# Inside the application class's __init__:
self.register_command('command-name', self.command_handler)

Users invoke the registered command in the desktop chat:

/command-name

Implement the handler in the application class. Keep substantial workflow logic, such as extraction or formatting, in focused application modules, and let the handler coordinate that work and return a response.

The Getting Started tutorial demonstrates this development cycle by adding a server-time command, reviewing and pushing the change, and restarting the application to load it.

Add LLM-powered behaviour when needed

Use dllm.connector, from the same Python package, when your application needs LLM calls. Keep provider requests in prompt files, select a prompt by name, and supply parameters from your application code.

ChatTemplate includes a prompts/ directory and guidance for its contents. Keep the prompt definitions there aligned with the values your code supplies. Read LLM APIs and File-Based Prompts for named prompts, provider callers, and pipelines.

The two modules serve different purposes: dllm.chatapp supplies the conversational application foundation, while dllm.connector supplies configured LLM calls within its workflows.

Continue building

Use Getting Started for the complete automatic setup and first-change walkthrough. Refer to the Desktop documentation for the managed environment, and keep your project's coding guidance up to date as you add commands and workflows.