What it takes to add AI to a Domino app
The quickest way to understand Domino IQ is to build one small feature with it: a button that asks a model to do one job, and an application that checks the answer before using it.
Ours is a todo list with a button, Prioritize with AI. Press it, and every open todo without a priority gets one: low, medium or high.
It takes one change to the Domino Directory, four documents and a few lines of code.
Switch it on
In the Domino Directory, open Edit Directory Profile and go to the Domino IQ tab. Choose the servers that will run Domino IQ and one administration server, then restart them.
The server then creates dominoiq.nsf. Everything else is configured there.
What the administrator sets up
Four documents in dominoiq.nsf, none of which the application ever sees:
A Configuration document binds a server to an AI service: its address, API key and model name.
A Model document names the model.
A System Prompt document holds the standing instruction.
A Command document gives the task the name applications call. Ours is TodoPrioritize.
Our whole System Prompt is one line:
Reply with ONLY a flat JSON object mapping each given id to "low",
"medium" or "high". No prose. Example: {"a1":"high","b2":"low"}It describes only the shape of the answer. The todo list arrives with each request, from the application. In our tests, a short instruction like this was followed more reliably than a long one.
Tip: restart the server after changing these documents, or you will be testing the previous configuration.
What the application does
The application knows one thing about AI: the command name. It builds a prompt from the user’s own todos, one line each with its id, current priority and title, and calls the command:
LLMReq request = session.createLLMRequest();
LLMRes response = request.completion(server, "TodoPrioritize", prompt);
if (response.getFinishReason() == LLMRes.LLM_FINISH_REASON_STOP) {
String answer = response.getContent();
// check it before saving anything
}In LotusScript the same calls live on NotesLLMRequest, so the command can sit behind a button in a Notes form as easily as behind a web page.
Don’t trust the answer yet
A model’s answer is a proposal. Before saving anything, our agent checks that the answer is valid JSON, covers exactly the todos it asked about, and uses only low, medium or high.
It also checks that none of those todos changed while the model was working. If any check fails, the user sees a short message and can try again.
Domino IQ can also paraphrase the input before the main request, and HCL recommends leaving that on. Our answer has to repeat ids exactly, so ours needed it off (DOMIQ_DISABLE_PROMPT_PARAPHRASE=1). Test yours both ways.
Why split it this way
The button on our page calls the agent and refreshes the list when the priorities arrive. The page never talks to the model and never holds the API key.
So the administrator can change the model, the endpoint or the instruction, and the application stays the same. The application decides what data to send and what to do with the answer, which is where most of the judgment lives.
Worth remembering: start with one command, synthetic data and a strict check of the answer. More commands and real documents build on the same four documents and the same few lines of code.
Sources
Enabling Domino IQ servers (HCLSoftware documentation, 14.5.1)
Adding a Domino IQ Configuration for Remote mode (HCLSoftware documentation, 14.5.1)
Adding an LLM System Prompt document (HCLSoftware documentation, 14.5.1)
Adding an LLM Command document (HCLSoftware documentation, 14.5.1)
Security considerations for Domino IQ (HCLSoftware documentation, 14.5.1)
Completion method (LLMReq, Java) (HCLSoftware documentation, 14.5.1)