java.lang.Object
com.scivicslab.pojoactor.core.ActorRef<LlmActor>
com.scivicslab.turingworkflow.workflow.IIActorRef<LlmActor>
com.scivicslab.turingworkflow.plugins.llm.LlmActor
All Implemented Interfaces:
com.scivicslab.pojoactor.core.CallableByActionName, AutoCloseable

public class LlmActor extends com.scivicslab.turingworkflow.workflow.IIActorRef<LlmActor>
Actor that calls an LLM service via MCP Streamable HTTP transport. Default target: quarkus-coder-agent-claude at localhost:8090.

Can be dynamically loaded via loader.loadMaven in workflow YAML.

  • Field Summary

    Fields inherited from class com.scivicslab.pojoactor.core.ActorRef

    actorName, actorSystem, object
  • Constructor Summary

    Constructors
    Constructor
    Description
    LlmActor(String name, com.scivicslab.turingworkflow.workflow.IIActorSystem system)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.scivicslab.pojoactor.core.ActionResult
    List available tools on the MCP server.
    com.scivicslab.pojoactor.core.ActionResult
    prompt(String promptText)
    Send a prompt to the LLM via MCP tools/call.
    void
     
    com.scivicslab.pojoactor.core.ActionResult
    Set the MCP server base URL.
    com.scivicslab.pojoactor.core.ActionResult
    status(String args)
    Get the LLM service status via MCP tools/call.

    Methods inherited from class com.scivicslab.turingworkflow.workflow.IIActorRef

    callByActionName, hasAnnotatedAction, invokeAnnotatedAction, parseFirstArgument

    Methods inherited from class com.scivicslab.pojoactor.core.ActorRef

    ask, ask, askNow, clearJsonState, clearPendingMessages, close, createChild, expandVariables, getJsonBoolean, getJsonInt, getJsonString, getJsonString, getLastResult, getName, getNamesOfChildren, getParentName, hasJson, hasJsonState, initLogger, isAlive, json, putJson, setLastResult, setParentName, system, tell, tell, tellNow, toStringOfJson, toStringOfYaml

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LlmActor

      public LlmActor(String name, com.scivicslab.turingworkflow.workflow.IIActorSystem system)
  • Method Details

    • setOutputListener

      public void setOutputListener(Consumer<String> listener)
    • setUrl

      public com.scivicslab.pojoactor.core.ActionResult setUrl(String url)
      Set the MCP server base URL. Arguments: URL (e.g., "http://localhost:8090")
    • prompt

      public com.scivicslab.pojoactor.core.ActionResult prompt(String promptText)
      Send a prompt to the LLM via MCP tools/call. Arguments: the prompt text
    • status

      public com.scivicslab.pojoactor.core.ActionResult status(String args)
      Get the LLM service status via MCP tools/call.
    • listTools

      public com.scivicslab.pojoactor.core.ActionResult listTools(String args)
      List available tools on the MCP server.