GraphQlAgentClient

class GraphQlAgentClient(defaultUrl: String? = null) : AgentClient, Closeable

Implementation of AgentClient that uses GraphQL over WebSockets to communicate with the agents. See https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md

Constructors

Link copied to clipboard
constructor(defaultUrl: String? = null)

Functions

Link copied to clipboard
open suspend override fun callAgent(agentRequest: AgentRequest, agentName: String?, url: String?): Flow<AgentResult>

Calls the agent with the given request. If an url is not provided, the client will use the default url. If an agent name is not provided, the server will use the default agent.

Link copied to clipboard
open override fun close()