Package ai.tabforge.workshop.agent
Class SubAgent
java.lang.Object
ai.tabforge.workshop.agent.SubAgent
- Direct Known Subclasses:
DefaultSubAgent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract AgentResultanalyzeFile(String prompt, String fileContent, int maxOutputTokens) Actual Claude API callprotected abstract StringbuildPrompt(AgentContext context) A string that defines the role and behavior of the agent.final AgentResultexecute(AgentContext context) Called by the OrchestratorAgent.startReview()protected abstract String
-
Constructor Details
-
SubAgent
-
-
Method Details
-
execute
Called by the OrchestratorAgent.startReview()- Parameters:
context- - created and passed to this method byinvalid reference
OrchestratorAgent#startReview()- Returns:
-
buildPrompt
A string that defines the role and behavior of the agent. For example for SecurityAuditorAgent:
That string goes to the Claude API call as a system parameter."You are a security auditor specialized in Jakarta EE applications. Analyze the provided Java code for security vulnerabilities. Focus on: SQL injection, hardcoded secrets, missing authorization... Respond ONLY in this JSON format: [{ "ruleId": "SEC-001", "severity": "CRITICAL", ... }]"- Parameters:
context- - Some agents may use this parameter, SecurityAuditorAgent ignores it.- Returns:
-
analyzeFile
Actual Claude API call- Parameters:
prompt-fileContent-- Returns:
-
getAgentName
-