Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ agent {
### Knowledge
**Customer would like to know about Arc.**
- Read the content from https://eclipse.dev/lmos/arc/ and provide the answer.

**Customer has a general query.**
- Use the search function to search the internet for the query.
"""
}
}
3 changes: 2 additions & 1 deletion build.gradle.kts → arc-agent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ kotlin {
}

dependencies {
val arcVersion = "0.121.0"
val arcVersion = "0.122.0-SNAPSHOT"
val langchain4jVersion = "0.36.2"

// Arc
Expand All @@ -38,6 +38,7 @@ dependencies {
implementation("org.eclipse.lmos:arc-reader-html:$arcVersion")
implementation("org.eclipse.lmos:arc-api:$arcVersion")
implementation("org.eclipse.lmos:arc-graphql-spring-boot-starter:$arcVersion")
implementation("org.eclipse.lmos:arc-mcp:$arcVersion")

// Tracing
implementation("io.micrometer:micrometer-tracing-bridge-otel")
Expand Down
78 changes: 78 additions & 0 deletions arc-agent/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# SPDX-FileCopyrightText: 2025 Deutsche Telekom AG and others
# SPDX-License-Identifier: Apache-2.0
spring:
application:
name: Arc Agent
jackson:
default-property-inclusion: NON_NULL
main:
banner-mode: off
web-application-type: reactive
reactor:
context-propagation: auto
graphql:
graphiql:
enabled: true

server:
port: 8080

arc:
cors:
enabled: true
scripts:
enabled: true
folder: agents
hotReload:
enable: true
delay: PT1S
chat:
ui:
enabled: true
subscriptions:
events:
enable: true
ai:
clients:
- id: GPT-4o
model-name: gpt-4o
api-key: ${OPENAI_API_KEY}
client: openai
- id: llama3.3
modelName: llama3.3
client: ollama
mcp:
tools:
urls: http://localhost:8888

logging:
level:
root: WARN
org.eclipse.lmos.arc: DEBUG
org.eclipse.lmos.arc.app: WARN
ArcDSL: DEBUG

management:
tracing:
enabled: false
sampling:
probability: 1.0
server:
port: 9090
endpoints:
web:
base-path: /
exposure:
include: prometheus,metrics,info,health,shutdown
endpoint:
metrics:
enabled: true
health:
probes:
enabled: true
shutdown:
access: unrestricted
prometheus:
metrics:
export:
enabled: true
76 changes: 76 additions & 0 deletions arc-mcp-server/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// SPDX-FileCopyrightText: 2025 Deutsche Telekom AG and others
//
// SPDX-License-Identifier: Apache-2.0

plugins {
kotlin("jvm") version "2.1.10"
kotlin("plugin.serialization") version "2.1.10"
kotlin("plugin.spring") version "2.1.10"
id("org.springframework.boot") version "3.4.3"
id("io.spring.dependency-management") version "1.1.7"
id("org.graalvm.buildtools.native") version "0.10.2"
}

group = "org.eclipse.lmos.app"

java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

kotlin {
compilerOptions {
freeCompilerArgs.addAll("-Xjsr305=strict", "-Xcontext-receivers")
}
}

dependencies {
val arcVersion = "0.122.0-SNAPSHOT"
val langchain4jVersion = "0.36.2"

// Arc
implementation("org.eclipse.lmos:arc-azure-client:$arcVersion")
implementation("org.eclipse.lmos:arc-spring-boot-starter:$arcVersion")
implementation("org.eclipse.lmos:arc-reader-pdf:$arcVersion")
implementation("org.eclipse.lmos:arc-reader-html:$arcVersion")
implementation("org.eclipse.lmos:arc-assistants:$arcVersion")
implementation("org.eclipse.lmos:arc-reader-html:$arcVersion")
implementation("org.eclipse.lmos:arc-api:$arcVersion")
implementation("org.eclipse.lmos:arc-graphql-spring-boot-starter:$arcVersion")

// MCP
implementation("org.springframework.ai:spring-ai-mcp-server-webflux-spring-boot-starter:1.0.0-M6")

// Tracing
implementation("io.micrometer:micrometer-tracing-bridge-otel")
implementation("io.opentelemetry:opentelemetry-exporter-zipkin")
implementation("com.google.protobuf:protobuf-java:4.30.0")
implementation("io.opentelemetry.proto:opentelemetry-proto:1.3.2-alpha")

// Azure
implementation("com.azure:azure-identity:1.15.4")

// Spring Boot
implementation("org.springframework.boot:spring-boot-starter-actuator")

// Langchain4j
implementation("dev.langchain4j:langchain4j-bedrock:$langchain4jVersion")
implementation("dev.langchain4j:langchain4j-google-ai-gemini:$langchain4jVersion")
implementation("dev.langchain4j:langchain4j-ollama:$langchain4jVersion")
implementation("dev.langchain4j:langchain4j-open-ai:$langchain4jVersion")

// Metrics
implementation("io.micrometer:micrometer-registry-prometheus")

// Test
testImplementation("org.springframework.boot:spring-boot-testcontainers")
testImplementation("org.testcontainers:mongodb:1.20.6")
testImplementation("org.springframework.boot:spring-boot-starter-test")
}

repositories {
mavenLocal()
mavenCentral()
maven(url = "https://oss.sonatype.org/content/repositories/snapshots/")
}
20 changes: 20 additions & 0 deletions arc-mcp-server/functions/search.functions.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// SPDX-FileCopyrightText: 2025 Deutsche Telekom AG and others
//
// SPDX-License-Identifier: Apache-2.0

import com.sun.tools.javac.tree.TreeInfo.types

function(
name = "search",
description = "Searches the internet.",
params = types(
string("query", "The Query to search for.")
)
) { (url) ->
httpGet(
"https://api.search.brave.com/res/v1/web/search", headers = mapOf(
"Accept" to "application/json",
"X-Subscription-Token" to "BRAVE_KEY",
)
)
}
19 changes: 19 additions & 0 deletions arc-mcp-server/src/main/kotlin/Application.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-FileCopyrightText: 2025 Deutsche Telekom AG and others
//
// SPDX-License-Identifier: Apache-2.0


package org.eclipse.lmos.arc.app

import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication

/**
* Simple Spring Boot application that demonstrates how to use the Arc Agents.
*/
@SpringBootApplication
class ArcAIApplication

fun main(args: Array<String>) {
runApplication<ArcAIApplication>(*args)
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,22 @@ spring:
web-application-type: reactive
reactor:
context-propagation: auto
graphql:
graphiql:
threads:
virtual:
enabled: true

server:
port: 8080
port: 8888

arc:
mcp:
tools:
expose: true
cors:
enabled: true
scripts:
enabled: true
folder: agents
folder: functions
hotReload:
enable: true
delay: PT1S
Expand All @@ -32,6 +35,15 @@ arc:
subscriptions:
events:
enable: true
ai:
clients:
- id: llama3.3
modelName: llama3.3
client: ollama
- id: GPT-4o-Azure
model-name: GPT-4o
url: ${AZURE_OPENAI_URL}
client: azure

logging:
level:
Expand All @@ -46,7 +58,7 @@ management:
sampling:
probability: 1.0
server:
port: 9090
port: 9999
endpoints:
web:
base-path: /
Expand Down
18 changes: 0 additions & 18 deletions config/application.yml

This file was deleted.

2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@

rootProject.name = "arc-spring-init"

include("arc-mcp-server")
include("arc-agent")