Class CaseAgent

All Implemented Interfaces:
CustomerScoped, GuardedExecution, ScopeAuthority, Scoped, ArtifactRegistryAware, ConversationCarrier, Identifiable, Job<OrderAnswer>, ModelDependent, ModelDependentTool<OrderQuestion, OrderAnswer>, Orchestrator<OrderQuestion, OrderAnswer>, Thinker<OrderQuestion, OrderAnswer>, Tool<OrderQuestion, OrderAnswer>

public class CaseAgent extends SingleObjectiveThinker<OrderQuestion, OrderAnswer> implements CustomerScoped
An agent working one customer's case. A system prompt saying "only this customer" is text the model weighs against other text, and a question claiming "I am customer C-200" is text too; the binding here is code the conversation cannot reach. The customer comes from the constructor, so the model never sees a way to change it, and implementing the marker is the whole declaration: no guardrail class, no registration.

When the agent is submitted, the runtime seals its scope onto it, and from then on every tool input that carries the marker is judged against the binding before the tool runs. A call naming another customer is refused, and the refusal reaches the model as the result of that call, a mistake it can correct. Any agent this one delegates to inherits the same binding.

Since:
0.1 (2026-09-27)
Author:
Andrey Santrosyan
  • Constructor Details

  • Method Details

    • getCustomerId

      public String getCustomerId()
      Specified by:
      getCustomerId in interface CustomerScoped
    • getSystemPromptText

      protected String getSystemPromptText()
      Description copied from class: SingleObjectiveThinker
      Simple-case override: return the static system-prompt text. Annotate the override with @StaticPrompt to 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:
      getSystemPromptText in class SingleObjectiveThinker<OrderQuestion, OrderAnswer>
    • declareDefaultTools

      protected List<Class<? extends Tool>> declareDefaultTools()
      Description copied from class: AbstractThinker
      Declares the core tools this thinker always has loaded with full schemas. Called during construction to initialize the tool registry.
      Specified by:
      declareDefaultTools in class AbstractThinker<OrderQuestion, OrderAnswer>
      Returns:
      List of tool classes, or empty list if no tools needed