Class OrderAgent
- All Implemented Interfaces:
GuardedExecution, ScopeAuthority, ArtifactRegistryAware, ConversationCarrier, Identifiable, Job<OrderAnswer>, ModelDependent, ModelDependentTool<OrderQuestion, OrderAnswer>, Orchestrator<OrderQuestion, OrderAnswer>, Thinker<OrderQuestion, OrderAnswer>, Tool<OrderQuestion, OrderAnswer>
SingleObjectiveThinker
works toward one final answer.
ThinkerDeclaration states what the agent needs from the model that serves it:
Grade.SMALL is the capability rung, OutputSize.COMPACT how long a single
turn may be (a tool call, or an answer with a handful of fields). Both are required, so an
agent without them does not compile.
getSystemPromptText() is the standing instructions the model reads before the
question; @StaticPrompt registers the text under a key so a deployment can replace
the wording without changing the class. declareDefaultTools() is the palette, the
tools the model may call, each shown to it with the name, description and input form the
tool class itself declares. The answer handler reads the final answer into an
OrderAnswer.
When the model calls the tool with a malformed number, the tool's typed refusal goes back to it as the result of that call, marked as a mistake it can correct, and the model calls again; nothing in this class handles it.
- Since:
- 0.1 (2026-09-27)
- Author:
- Andrey Santrosyan
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractThinker
AbstractThinker.CompactedReply<R>, AbstractThinker.ModelCall<R> -
Field Summary
Fields inherited from class SingleObjectiveThinker
answerHandler, DEFAULT_MAX_ITERATIONS, finalAnswer, maxIterationsFields inherited from class AbstractThinker
cacheAllMessages, comfortContextTokens, compactionTrigger, conversationId, grade, interactive, invokedAsTool, OBS_ARTIFACTS_IN, OBS_ARTIFACTS_OUT, outputDeclaration, TASK_OBJECTIVE_KEY, toolRegistryFields inherited from class AbstractOrchestrator
META_ITERATIONFields inherited from class AbstractTool
inputFields inherited from class AbstractJob
timeout, upstreamRetriesFields inherited from interface Job
DEFAULT_UPSTREAM_RETRIESFields inherited from interface Tool
OBS_INPUT, OBS_OUTPUT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeclares the core tools this thinker always has loaded with full schemas.protected StringSimple-case override: return the static system-prompt text.Methods inherited from class SingleObjectiveThinker
getAnswerHandler, getDepth, getMaxIterations, getResult, getSeededFollowupMessage, getSystemPrompt, logReasoning, resolveArtifacts, runThinkingLoop, setAnswerHandler, setMaxIterations, streamAnswer, submitThinkingCallMethods inherited from class AbstractThinker
addTool, addTool, admitConfiguredSkills, appendCorrection, buildToolDefinitionBlocks, cacheAllMessages, compactAndRetry, correctableFailureAppended, declareCompatibleSkills, declareCompatibleTools, declareDefaultProviders, declareDefaultSkills, declareValidationGuardrails, delegationThreshold, execute, executeTools, forceCompaction, getArtifactRegistry, getConversationId, getFinalRetainDuration, getGrade, getOutputDeclaration, getProviders, getRetainDuration, getTools, hasTool, hasTool, isConversationMinted, isForceReadOnly, isInteractive, isInvokedAsTool, mintConversationId, newLLMCall, performCompactionLoop, pinModel, pinnedModel, reconcileCatalog, reconcileSkillCatalog, reconcileToolRegistry, removeTool, removeTool, setArtifactRegistry, setCacheAllMessages, setComfortContextTokens, setCompactionTrigger, setConversationId, setFinalRetainDuration, setGrade, setInvokedAsTool, setOutputBudget, setOutputSize, setRetainDuration, submitToolCall, transcript, validateToolCallMethods inherited from class AbstractOrchestrator
execute, getJobType, getRequirements, getScopeGuard, getTimeout, sealScopeGuard, setScopeGuard, setTimeout, submitInIteration, submitInIteration, submitInIterationMethods inherited from class AbstractTool
getInput, postExecute, preExecute, setInputMethods inherited from class AbstractJob
getId, getName, getParentJobId, getPriority, getUpstreamRetries, getUserId, getWorkflowId, randomIdSuffix, setUpstreamRetries, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface GuardedExecution
declareAdmissionGuardrails, declareAuthGuardrails, declareContentGuardrailsMethods inherited from interface Identifiable
getParentJobId, getUserId, getWorkflowIdMethods inherited from interface Job
getDisplayName, getId, getJobId, getJobType, getName, getPriority, getRequirements, getTimeout, getUpstreamRetries, postExecute, preExecuteMethods inherited from interface ModelDependent
requireSeatMethods inherited from interface ScopeAuthority
getScopeGuard, sealScopeGuard, setScopeGuardMethods inherited from interface Tool
execute, getInput, guardedInputTarget, setInput
-
Constructor Details
-
OrderAgent
-
-
Method Details
-
getSystemPromptText
Description copied from class:SingleObjectiveThinkerSimple-case override: return the static system-prompt text. Annotate the override with@StaticPromptto declare the immutability contract.The auto-derived registry key is the subclass FQN. Pin an explicit key on the annotation (
@StaticPrompt("ops.visible.key")) when ops needs a stable name for DB-stored overrides that survives class renames.- Overrides:
getSystemPromptTextin classSingleObjectiveThinker<OrderQuestion, OrderAnswer>
-
declareDefaultTools
Description copied from class:AbstractThinkerDeclares the core tools this thinker always has loaded with full schemas. Called during construction to initialize the tool registry.- Specified by:
declareDefaultToolsin classAbstractThinker<OrderQuestion, OrderAnswer>- Returns:
- List of tool classes, or empty list if no tools needed
-