agentscope-ai / agentscope-ai/agentscope-java

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

Aberta
#362 2 comentários 0 reações 0 responsáveis Ver no GitHub
area/ext/integration enhancement
Linguagem predominante
Java
Estrelas
5.6k
Forks
1.3k
Merge médio
4d 12h
PRs com merge (30d)
77

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.