Package io.agentscope.core.agui.model
Class RunAgentInput
java.lang.Object
io.agentscope.core.agui.model.RunAgentInput
Input model for running an agent via the AG-UI protocol.
This class represents the complete input needed to invoke an agent, including messages, tools, context, state, and forwarded properties.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRunAgentInput(String threadId, String runId, List<AguiMessage> messages, List<AguiTool> tools, List<AguiContext> context, Map<String, Object> state, Map<String, Object> forwardedProps) Creates a new RunAgentInput. -
Method Summary
Modifier and TypeMethodDescriptionstatic RunAgentInput.Builderbuilder()Creates a new builder for RunAgentInput.Get the context information.getForwardedProp(String key) Get a specific forwarded property.getForwardedProp(String key, Object defaultValue) Get a specific forwarded property with a default value.Get the forwarded properties.Get the conversation messages.getRunId()Get the run ID.getState()Get the initial state.Get the thread ID.getTools()Get the frontend-provided tools.booleanCheck if there is any context.booleanCheck if there are any messages.booleanhasState()Check if there is initial state.booleanhasTools()Check if there are any frontend tools.toString()
-
Constructor Details
-
RunAgentInput
public RunAgentInput(String threadId, String runId, List<AguiMessage> messages, List<AguiTool> tools, List<AguiContext> context, Map<String, Object> state, Map<String, Object> forwardedProps) Creates a new RunAgentInput.- Parameters:
threadId- The thread ID for this conversationrunId- The unique run IDmessages- The conversation messagestools- Frontend-provided toolscontext- Additional context informationstate- Initial state to loadforwardedProps- Additional properties to forward
-
-
Method Details
-
getThreadId
Get the thread ID.- Returns:
- The thread ID
-
getRunId
Get the run ID.- Returns:
- The run ID
-
getMessages
Get the conversation messages.- Returns:
- The messages as an immutable list
-
getTools
Get the frontend-provided tools.- Returns:
- The tools as an immutable list
-
getContext
Get the context information.- Returns:
- The context as an immutable list
-
getState
Get the initial state.- Returns:
- The state as an immutable map
-
getForwardedProps
Get the forwarded properties.- Returns:
- The forwarded properties as an immutable map
-
getForwardedProp
Get a specific forwarded property.- Parameters:
key- The property key- Returns:
- The property value, or null if not present
-
getForwardedProp
Get a specific forwarded property with a default value.- Parameters:
key- The property keydefaultValue- The default value if not present- Returns:
- The property value, or the default if not present
-
hasMessages
public boolean hasMessages()Check if there are any messages.- Returns:
- true if messages are present
-
hasTools
public boolean hasTools()Check if there are any frontend tools.- Returns:
- true if tools are present
-
hasContext
public boolean hasContext()Check if there is any context.- Returns:
- true if context is present
-
hasState
public boolean hasState()Check if there is initial state.- Returns:
- true if state is present
-
toString
-
builder
Creates a new builder for RunAgentInput.- Returns:
- A new builder instance
-