@Action marks a method as an Embabel action that can participate in workflow planning and execution. Embabel uses the method’s inputs and outputs to assemble agent workflows. section 12.3.2 section 12.3.3
Use @Action methods to define the parts of an agentic workflow:
- Annotate methods inside a class marked with @Agent. section 12.3.2
- Return typed domain objects such as GameRules, GameMechanics, or PlayerCount; Embabel uses these types when connecting actions. section 12.3.3 section 12.3.2
- Add @AchievesGoal when a method represents a workflow goal; leave it off intermediate actions such as loading game rules. section 12.3.2 section 12.3.3
- Build action bodies with Spring AI facilities such as PromptRunner, resource-backed prompt templates, and TikaDocumentReader. section 12.3.2 section 12.3.3
Goal-oriented game information
A GameInfoAgent can annotate determineGameMechanics(GameRules) with @Action and @AchievesGoal, returning GameMechanics through PromptRunner. A separate @Action method, getGameRules(GameTitle, RulesFile), supplies the GameRules object but does not itself complete a goal.
