This repository contains a sample implementation of a communication agent for multichannel customer interactions.
It receives inbound communication, maps it to a canonical SupportCase, matches existing cases, and orchestrates downstream communication with specialist agents.
- Java 21 (JDK)
- Maven 3.9+
- Camunda 8.8+ - e.g. c8run for local development, or a SaaS / Self-Managed cluster
- Docker (only for integration tests via Testcontainers)
supportCase(object) when startingmessage-receiverdirectly or publishingCustomerCommunicationReceived- Required
supportCasefields are defined insrc/main/resources/support-case.schema.json:subject(string)request(string)communicationContext(object)attachments(array)receivedDateTime(ISO-8601 local date-time string)
- Open
communication-agent.bpmnin Camunda Modeler (Web or Desktop) - Select the AI Agent subprocess and configure:
- Model provider (OpenAI-compatible, Bedrock, etc.)
- Model
- Credentials / API key
- Review and adapt the AI system prompt and tool behavior in
communication-agent.bpmnto your customer communication policy. - Open
business-agent.bpmnand implement our first business process. - Open
message-receiver.bpmnand configure inbound connectors:StartEvent_Email: IMAP host/port, username, passwordStartEvent_WebHook: webhook context and auth settings
- Open
case-matching.bpmnand replace the sample case-matching logic with customer-specific correlation rules.
- Switch matching mode in
case-matching.bpmnwith process variableuse_feel:true-> FEEL script task (Task_CaseMatching)falseor unset -> job worker (CaseMatching)
- Extend canonical input schema and models for additional channels/metadata:
src/main/resources/support-case.schema.jsonsrc/main/java/io/camunda/bizsol/bb/comm_agent/models/*
- For Camunda SaaS, use
src/main/resources/application-saas.yamland provide cluster credentials. - Adjust worker configuration in
src/main/resources/application.yaml(default port:8080).
The /camunda-artifacts directory contains:
| File | Purpose |
|---|---|
communication-agent.bpmn |
Main communication orchestration process. |
message-receiver.bpmn |
Inbound adapter process (email/webhook) that maps incoming communication and emits CustomerCommunicationReceived. |
case-matching.bpmn |
Correlation key evaluation (FEEL or worker). |
message-sender.bpmn |
Outbound communication subprocess for channel-specific customer replies. |
business-agent.bpmn |
Specialist sub-agent process, triggered by communication orchestration. |
Deploy at minimum:
communication-agent.bpmnmessage-receiver.bpmncase-matching.bpmnmessage-sender.bpmn
Deploy business-agent.bpmn if you use specialist-agent delegation in the communication flow.
The application in src/main/java/io/camunda/bizsol/bb/comm_agent/CommAgentApplication.java runs the CaseMatching job worker.
By default (without extra config), the Camunda SDK targets local endpoints compatible with c8run.
To point to a different cluster, set:
export CAMUNDA_CLIENT_REST_ADDRESS=http://localhost:8080or adapt src/main/resources/application.yaml / src/main/resources/application-saas.yaml.
mvn spring-boot:runThe application starts on port 8080.
Start a process instance of message-receiver with:
{
"supportCase": {
"subject": "Policy question",
"request": "I need help updating my policy details.",
"communicationContext": {
"channel": "email",
"conversationId": "conv-123",
"emailAddress": "customer@example.com"
},
"attachments": [],
"receivedDateTime": "2026-03-02T10:15:00"
}
}mvn testTests use Camunda Process Test with Testcontainers.
The build enforces:
- 60 % BPMN path coverage (via
camunda-process-test) - 80 % line coverage (via JaCoCo)