Class DemoAgent
java.lang.Object
- All Implemented Interfaces:
GuardedExecution, ScopeAuthority, ArtifactRegistryAware, ConversationCarrier, Identifiable, Job<DemoAnswer>, ModelDependent, ModelDependentTool<DemoQuery, DemoAnswer>, Orchestrator<DemoQuery, DemoAnswer>, Thinker<DemoQuery, DemoAnswer>, Tool<DemoQuery, DemoAnswer>
The demo's one agent: a goal-directed thinker with two tools of its own, a catalog of tools
it may ask for through
request_tools, and a catalog of skills it may admit through
request_skill. The skill catalog is everything the registry holds, which at startup
is the demo's own bundle under META-INF/skills/ plus every skilljar on the
classpath, the project's public one among them. Nothing here names a skill: a jar added to
the classpath is on the catalog at the next start.- Since:
- 0.1 (2026-09-11)
- 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 TypeMethodDescriptionprotected SkillSelectorDeclares the skills this thinker's model may admit into the conversation at run time, subject to admission, the counterpart ofAbstractThinker.declareCompatibleTools().protected ToolSelectorDeclares additional tools this thinker may use, subject to admission.Declares the core tools this thinker always has loaded with full schemas.protected StringSimple-case override: return the static system-prompt text.The provider behind one name on the palette, or null when the palette does not carry it.palette()The palette as the model would see it this turn: every tool name on the registry.The skills the model may admit, as the reconciled catalog stands now.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, 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
-
DemoAgent
-
-
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<DemoQuery, DemoAnswer>
-
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<DemoQuery, DemoAnswer>- Returns:
- List of tool classes, or empty list if no tools needed
-
declareCompatibleTools
Description copied from class:AbstractThinkerDeclares additional tools this thinker may use, subject to admission. The catalog (name + description) appears in the system prompt. The LLM activates specific tools on demand via request_tools.Override to declare packages and/or individual tool classes:
protected ToolSelector declareCompatibleTools() { ToolSelector sel = new ToolSelector("ai.redouble.nucleo.ext.lit"); sel.addToolPackage("ai.redouble.nucleo.ext.patent.epo"); sel.addClass(SomeSpecificTool.class); return sel; }- Overrides:
declareCompatibleToolsin classAbstractThinker<DemoQuery, DemoAnswer>- Returns:
- ToolSelector with compatible tools, or null if none
-
declareCompatibleSkills
Description copied from class:AbstractThinkerDeclares the skills this thinker's model may admit into the conversation at run time, subject to admission, the counterpart ofAbstractThinker.declareCompatibleTools(). The catalog appears as the enumeratedskillNamesof therequest_skilltool; the model admits one by name and its instructions ride every later call.Override to name skills, a bundle, or everything the registry holds:
protected SkillSelector declareCompatibleSkills() { SkillSelector sel = new SkillSelector("delegation"); sel.addBundle("ai.redouble.skills."); return sel; }- Overrides:
declareCompatibleSkillsin classAbstractThinker<DemoQuery, DemoAnswer>- Returns:
- SkillSelector with compatible skills, or null if none
-
palette
-
offered
The provider behind one name on the palette, or null when the palette does not carry it. -
skillCatalog
-