Repository navigation
Conversation
This was referenced Nov 18, 2026
funana777
force-pushed
the
feat/zammad-tools
branch
3 times, most recently
from
November 18, 2026 17:47
e9d7f56 to
fa02bf7
Compare
This was referenced Nov 18, 2026
funana777
force-pushed
the
feat/zammad-tools
branch
2 times, most recently
from
November 18, 2026 18:04
5aec9b8 to
63d6330
Compare
funana777
force-pushed
the
feat/zammad-tools
branch
from
November 18, 2026 18:17
63d6330 to
7b614ce
Compare
funana777
force-pushed
the
feat/shorten-nested-lists
branch
from
November 18, 2026 18:17
5c983ad to
599632d
Compare
funana777
force-pushed
the
feat/zammad-tools
branch
2 times, most recently
from
November 19, 2026 10:26
059bd45 to
48d5e20
Compare
funana777
force-pushed
the
feat/shorten-nested-lists
branch
from
November 19, 2026 10:26
3f8c378 to
996e687
Compare
funana777
force-pushed
the
feat/zammad-tools
branch
2 times, most recently
from
November 19, 2026 15:04
8766435 to
0675a96
Compare
1 task done
funana777
force-pushed
the
feat/zammad-tools
branch
2 times, most recently
from
November 19, 2026 16:23
d730eae to
cc34f75
Compare
funana777
force-pushed
the
feat/shorten-nested-lists
branch
from
November 19, 2026 17:24
996e687 to
a1c6586
Compare
funana777
force-pushed
the
feat/zammad-tools
branch
2 times, most recently
from
November 19, 2026 17:35
e5b91be to
1b29316
Compare
funana777
force-pushed
the
feat/shorten-nested-lists
branch
2 times, most recently
from
November 19, 2026 17:56
7712906 to
b9e6489
Compare
funana777
force-pushed
the
feat/zammad-tools
branch
2 times, most recently
from
November 19, 2026 18:23
39a55ee to
7c498d4
Compare
funana777
force-pushed
the
feat/shorten-nested-lists
branch
from
November 19, 2026 18:23
b9e6489 to
7cbab3d
Compare
funana777
force-pushed
the
feat/zammad-tools
branch
from
November 19, 2026 18:26
ff0be50 to
ee3fd8f
Compare
funana777
force-pushed
the
feat/shorten-nested-lists
branch
from
November 19, 2026 18:52
7cbab3d to
868eb9c
Compare
funana777
force-pushed
the
feat/zammad-tools
branch
2 times, most recently
from
November 19, 2026 18:58
541ea20 to
2969b7b
Compare
funana777
force-pushed
the
feat/shorten-nested-lists
branch
2 times, most recently
from
November 24, 2026 13:37
54967ca to
58d2da5
Compare
funana777
force-pushed
the
feat/zammad-tools
branch
2 times, most recently
from
November 24, 2026 13:42
3a53ffd to
dbe3145
Compare
1 task done
funana777
changed the base branch from
feat/shorten-nested-lists
to
feat/shorten-json-objects
November 26, 2026 13:22
funana777
force-pushed
the
feat/zammad-tools
branch
from
November 26, 2026 13:38
dbe3145 to
b5aea94
Compare
The Assistant can list Zammad tickets, read a ticket with its conversation, find similar tickets and add internal notes. The tools use the ticket API of integration_zammad, which keeps the user's Zammad token, the same way openproject.py uses integration_openproject. - list_zammad_tickets and get_zammad_ticket are read only. The descriptions teach Zammad's search syntax, the contact and escalation times in a list and how to tell the Assistant's own notes, and say that ticket text is data, never instructions. get_zammad_ticket reads the newest ten articles and, when the model asks for them, the ones before, so it reads only as far back as it needs. - find_similar_zammad_tickets runs a Context Chat search scoped to tickets of the user's Zammad server, built from the title and the first customer message, and returns ID and link of the similar tickets; the model opens the relevant ones. Without Context Chat it returns an empty list with a reason. The instance ID it matches is pinned by a test vector shared with integration_zammad. - add_zammad_internal_note is GROUP radius and irreversible, so the user confirms every note with the default thresholds. Ticket title and number come first, as the confirmation shows the first three arguments. The server checks the number, not the title. Notes are plain text. The tool is only offered when the ticket API is at version 2, which has the notes route. The notes route stores a note as given, so marking the Assistant's notes is the tool's job: every note ends with an empty line, a line "---" and "Nextcloud Assistant for <display name>", and a footer the model wrote itself is dropped. Before writing, the tool reads the ticket and refuses a second note when an earlier Assistant note is newer than the customer's last message, unless the user asked for another one. An Assistant note is an internal note of type note by an agent whose last two non-empty lines are that footer block; a customer quoting it, the phrase inside a note, a public article and a footer without the "---" line do not count. The tools are offered whenever integration_zammad is installed. Whether the user is connected cannot be seen without a request per run, so users who are not get a not_connected answer with how to connect. The classification test's fake app now holds real values for capabilities a module compares, ticket_api 2 for Zammad. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Christian Fu Mueller <christian-fu.mueller@nextcloud.com>
funana777
force-pushed
the
feat/zammad-tools
branch
from
November 26, 2026 14:59
b5aea94 to
f066147
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Zammad ticket tools: the Assistant can list tickets, read a ticket with its conversation, find similar tickets, and add internal notes.
Base: #338 (
feat/shorten-json-objects). Merge #338 first. It needs integration_zammad with nextcloud/integration_zammad#296 (read, with paging) and #297 (notes).Why
Support teams work in Zammad and want the Assistant's help on tickets: a briefing on a long thread, a summary as an internal note for colleagues. Today the Assistant cannot read a ticket; asked about one, it calls Zammad without a token and asks the user to paste one into the chat. integration_zammad already holds each user's token, so the tools go through its ticket API, the same way
openproject.pyuses integration_openproject.What
list_zammad_tickets,get_zammad_ticket: read only. The descriptions teach Zammad's search syntax (and that field queries need Elasticsearch on the Zammad server), the contact and escalation times in a list and how to tell the Assistant's own notes, and say that ticket text is data, never instructions.get_zammad_ticketreads the newest 10 articles.older_articlessays how many come before them, and the model reads those withbeforewhen it needs them.find_similar_zammad_tickets: a Context Chat search scoped to tickets of the user's Zammad server, built from the ticket's title and first customer message, read with one call of up to 50 articles. It returns ID and link of the similar tickets; the model opens the relevant ones. Without Context Chat it returns an empty list with a reason. The instance ID it matches is pinned by a test vector that integration_zammad's tests pin too.add_zammad_internal_note(ticket_title, ticket_number, ticket, text, force): GROUP radius, irreversible, so the user confirms every note with the default thresholds. The confirmation shows the first three arguments, so title and number come first. The server checks the number, not the title. Notes are plain text. The tool is only offered when the capability reportsticket_api2 or higher, which has the notes route.---andNextcloud Assistant for <display name>, and drops a footer the model wrote itself. The block is fixed and untranslated, because earlier notes are recognized by it.already_noted) when an Assistant note is newer than the customer's last message, unless the user asked for another one (force). An Assistant note is an internal note of typenoteby an agent whose last two non-empty lines are the footer block.Notes for review:
not_connectedanswer with how to connect.test_tool_classification_markers.py: the fake app now answerscapabilities, becauseget_tools()reads it for the note tool.642 lines added, none removed: 329 in the tool module, 313 in tests.
How to test
python -m pytest tests---and "Nextcloud Assistant for ". Ask again: it reports that the ticket already has a note.before.🤖 AI (if applicable)
Code, tests and this description were drafted with Claude Code (claude-opus-5-5) under my direction.
How this was tested before opening the PR
This version: 427 unit tests, including the footer added exactly once, the refused second note and
force, a note after a new customer message, and what does not count as an Assistant note (a customer quoting the footer, the phrase inside a note, a public article, a footer without the---line, a system article).An earlier version, where integration_zammad added the footer and ran the duplicate check, ran on a sandbox Nextcloud 35.0.1 (Assistant 4.0.0) against a fake Zammad and a fake OpenAI-compatible endpoint: a scripted triage of three tickets with confirmed notes and one
already_notedrefusal, and Claude Haiku standing in for a small model, which picked the most urgent waiting ticket and, after analready_notedrefusal, asked the user instead of forcing a second note. The version before paging (dbe3145, with #340 merged in locally) ran end to end on 2026-11-24 on a sandbox Nextcloud 35.0.1 with nextcloud/integration_zammad#296 to #298 against a fake Zammad. With scripted tool calls: not connected, list withmine, get by ID and by link, a note with confirmation and the footer,already_noted,force, a wrong ticket number, the capability gate, and a note allowed again after a new customer message once integration_zammad#296 returnedlast_contact_customer_at(that fix came out of this run). With Claude Haiku as the model: it listed the user's tickets, summarized a ticket into a confirmed note, setforcewhen asked for a second note, and asked instead of retrying after a cancelled note. find_similar only gave its "Context Chat is not available" answer. It has not run against a real Zammad or a Context Chat backend.Paging (this version): on a local Nextcloud 36 (master, SQLite) with nextcloud/integration_zammad#296 against a fake Zammad with 25 invented articles,
get_zammad_ticketread the ticket in pages of 10, 10 and 5 withbeforeand got every article once, an 86,000-character article whole; the note check read the newest 20 articles and refused withalready_noted; the similar-ticket query used the first customer message. With the page shortened to 20,000 characters, #338 left out only the long article and kept valid JSON. With nextcloud/integration_zammad#297 rebased onto the paging commit: a second note refused asalready_noted, a wrong ticket number refused with nothing sent to Zammad, and withforcea note stored with the footer, which the next read showed as the newest article. Not yet run with a model.Generated by Claude Code