https://github.com/aborroy/kd-agent-connector
Alfresco Repository addon to connect with Hyland Knowledge Discovery service
https://github.com/aborroy/kd-agent-connector
alfresco hyland-experience java
Last synced: 9 months ago
JSON representation
Alfresco Repository addon to connect with Hyland Knowledge Discovery service
- Host: GitHub
- URL: https://github.com/aborroy/kd-agent-connector
- Owner: aborroy
- License: lgpl-3.0
- Created: 2025-07-29T14:35:53.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-31T14:07:12.000Z (11 months ago)
- Last Synced: 2025-07-31T18:00:48.476Z (11 months ago)
- Topics: alfresco, hyland-experience, java
- Language: Java
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hyland Knowledge Discovery Agent Connector
**KD Agent Connector** is an Alfresco Platform (ACS) repository module that exposes a thin, secure REST façade over Hyland Knowledge Discovery *Agent Builder* API.
It lets any Alfresco‑authenticated user
* discover available **AI agents** (`GET /kd/agents`) and
* ask questions to a selected agent (`POST /kd/prompt`),
receiving structured answers plus the source‑document references the agent used.
The module is packaged as a single JAR and is compatible with Alfresco **ACS 23.1 to 25.x** (tested with 25.1 Community). No Share or ADF code is required.
## Why you might care
Skip building a full‑blown middleware: this add‑on already solves OAuth2 token caching, pagination and error handling. If your goal is *"Chat with KD agents from Alfresco"*, this is the *one* component you need.
## Prerequisites
| Component | Version | Notes |
| ------------------------- | ----------- | -------------------------------------------------------------- |
| Java JDK | 21+ | Compiled for 17 – runs fine on modern LTS JDKs. |
| Maven | ≥ 3.8 | Wrapper not included – install Maven locally. |
| Alfresco Content Services | 23.1–25.x | Community or Enterprise. |
| Network access | HTTPS 443 | Outbound to **api.ai.dev.experience.hyland.com** and your IdP. |
## Build the JAR
```bash
git clone https://github.com/your-org/kd-agent-connector.git
cd kd-agent-connector
mvn clean package -DskipTests
```
The addon is created at
`target/kd-agent-connector-.jar`.
## Configuration
Copy the following properties into *alfresco‑global.properties* (or set them as environment variables):
```properties
# --- KD OAuth 2.0 ---
app.knowledge-discovery.client-id =
app.knowledge-discovery.client-secret =
app.knowledge-discovery.oauth-url = https://auth.iam.dev.experience.hyland.com/idp
# --- KD API ---
app.knowledge-discovery.api-url = https://api.ai.dev.experience.hyland.com
app.knowledge-discovery.hx-env-id =
```
> **Keep secrets out of VCS** – externalise them via Docker secrets, Kubernetes config‑maps or your preferred secret store.
## REST End‑points
| Method | URL | Auth | Description |
| ------ | ----------------------------------------- | ------------- | ---------------------------------------------------------------------------------- |
| `GET` | `/alfresco/s/kd/agents?offset=0&limit=20` | Alfresco user | Returns a paginated list of available RAG agents plus counters by type and status. |
| `POST` | `/alfresco/s/kd/prompt` | Alfresco user | Invokes the latest version of the given agent. |
## Deployment
Pick the scenario that matches your environment.
### 1. Docker‑based ACS (official images)
1. **Build** the JAR (see above) or grab it from your CI artifact repo.
2. Create an *extensions* folder next to your `docker-compose.yml` and copy the JAR there.
3. Add a volume to the `alfresco` service:
```yaml
services:
alfresco:
image: alfresco/alfresco-content-repository-community:25.1
environment:
JAVA_OPTS: >-
-Dapp.knowledge-discovery.client-id=
-Dapp.knowledge-discovery.client-secret=
-Dapp.knowledge-discovery.oauth-url=https://auth.iam.dev.experience.hyland.com/idp
-Dapp.knowledge-discovery.api-url=https://api.ai.dev.experience.hyland.com
-Dapp.knowledge-discovery.hx-env-id=
volumes:
- ./extensions/kd-agent-connector-0.8.0.jar:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/kd-agent-connector-0.8.0.jar
```
4. `docker compose up` – the module is detected at start‑up (`Alfresco modules -> kd-agent-connector`).
### 2. Bare‑metal / classic Tomcat
1. Stop Alfresco.
2. Create `$ALF_HOME/modules/platform` if it does not exist.
3. Copy `kd-agent-connector-.jar` into that directory.
4. Merge the property block above into `$ALF_HOME/tomcat/shared/classes/alfresco-global.properties`.
5. Start Alfresco and check `alfresco.log` for
`INFO [org.alfresco.repo.module.ModuleServiceImpl] [main] Installing module 'kd-agent-connector'`.