agentscope-ai / agentscope-ai/agentscope-java

[Feature]: Add Kotlin coroutine extension layer (suspend / Flow APIs)

未關閉
#362 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
area/ext/integration enhancement
主要語言
Java
星號
5.6k
分支
1.3k
平均合併
4 天 12 小時
30 天內合併 PR
77

描述

Background

agentscope-java exposes many async APIs based on Reactor (Mono / Flux).
This works well for Java, but is not idiomatic for Kotlin, where suspend functions and Flow are the standard async model.

Proposal

Add a Kotlin coroutine extension module, e.g.:

agentscope-kotlin

This module would not change the core implementation, but provide Kotlin-friendly APIs on top of the existing Reactor-based core.

Goal

At the API level, convert:

Mono → suspend fun

Flux → Flow

So Kotlin users rarely need to interact with Reactor types directly.

Example
suspend fun Agent.send(request: Request): Response
fun Agent.streamEvents(): Flow

Internally backed by Mono.awaitSingle() and Flux.asFlow().

Summary

Keep Reactor as the core async implementation

Add a Kotlin coroutine extension layer

Improve Kotlin developer experience without impacting Java users

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。