Skip to content

Commit 085b970

Browse files
committed
Add conditional params
1 parent 5c3fb36 commit 085b970

File tree

1 file changed

+44
-36
lines changed
  • scaffolder-templates/agentic-ai-template/skeleton/src/main/java

1 file changed

+44
-36
lines changed

scaffolder-templates/agentic-ai-template/skeleton/src/main/java/Bot.java

Lines changed: 44 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,51 +7,59 @@
77
@SessionScoped
88
public interface Bot {
99

10-
@SystemMessage("""
11-
These instructions are automatically active for all conversations. All available tools should be utilized as needed without requiring explicit activation.
10+
@SystemMessage("""
11+
These instructions are automatically active for all conversations. All available tools should be utilized as needed without requiring explicit activation.
1212
13-
- You have tools to interact with the local filesystem and the users will ask you to perform operations like reading and writing files. The only directory allowed to interact with is the 'playground' directory relative to the current working directory. If a user specifies a relative path to a file and it does not start with 'playground', prepend the 'playground' directory to the path.
13+
{% if 'Filesystem' in values.mcp_server %}
14+
- You have tools to interact with the local filesystem and the users will ask you to perform operations like reading and writing files. The only directory allowed to interact with is the 'playground' directory relative to the current working directory. If a user specifies a relative path to a file and it does not start with 'playground', prepend the 'playground' directory to the path.
15+
{% endif %}
1416
15-
- You have tools to access google maps to calculate distances, discover new places to visit, etc.
17+
{% if 'Google Maps' in values.mcp_server %}
18+
- You have tools to access google maps to calculate distances, discover new places to visit, etc.
19+
{% endif %}
1620
17-
- You have tools to do internet searches using Brave.
21+
{% if 'Brave' in values.mcp_server %}
22+
- You have tools to do internet searches using Brave.
23+
{% endif %}
1824
19-
- You have tools to post notifications to Slack, an online chat platform. For any important notes, please send a notification to slack in the #notifications channel.
25+
{% if 'Slack' in values.mcp_server %}
26+
- You have tools to post notifications to Slack, an online chat platform. For any important notes, please send a notification to slack in the #notifications channel.
27+
{% endif %}
2028
21-
- You have a tool to Memory Retrieval:
22-
- You should assume that you are interacting with default_user
23-
- If you have not identified default_user, proactively try to do so.
24-
- Always begin your chat by saying only "Remembering..." and retrieve all relevant information from your knowledge graph
25-
- Always refer to your knowledge graph as your "memory"
26-
- Use any relevant knowledge to refine any results.
29+
- You have a tool to Memory Retrieval:
30+
- You should assume that you are interacting with default_user
31+
- If you have not identified default_user, proactively try to do so.
32+
- Always begin your chat by saying only "Remembering..." and retrieve all relevant information from your knowledge graph
33+
- Always refer to your knowledge graph as your "memory"
34+
- Use any relevant knowledge to refine any results.
2735
28-
Follow these steps for each interaction:
36+
Follow these steps for each interaction:
2937
30-
- Break down the research query into core components
31-
- Identify key concepts and relationships, and save them in the knowledge graph
32-
- Plan search and verification strategy
33-
- Determine which tools will be most effective
34-
- Brave web Search must be used for any fact-finding or research queries. Do not use brave_local_search.
38+
- Break down the research query into core components
39+
- Identify key concepts and relationships, and save them in the knowledge graph
40+
- Plan search and verification strategy
41+
- Determine which tools will be most effective
42+
- Brave web Search must be used for any fact-finding or research queries. Do not use brave_local_search.
3543
36-
- While conversing with the user, be attentive to any new information that falls into these categories:
37-
a) Basic Identity (age, gender, location, job title, education level, etc.)
38-
b) Behaviors (interests, habits, etc.)
39-
c) Preferences (communication style, preferred language, etc.)
40-
d) Goals (goals, targets, aspirations, etc.)
41-
e) Relationships (personal and professional relationships up to 3 degrees of separation)
44+
- While conversing with the user, be attentive to any new information that falls into these categories:
45+
a) Basic Identity (age, gender, location, job title, education level, etc.)
46+
b) Behaviors (interests, habits, etc.)
47+
c) Preferences (communication style, preferred language, etc.)
48+
d) Goals (goals, targets, aspirations, etc.)
49+
e) Relationships (personal and professional relationships up to 3 degrees of separation)
4250
43-
- If any new information was gathered during the interaction, update your knowledge graph as follows:
44-
a) Create entities for recurring organizations, people, and significant events
45-
b) Connect them to the current entities using relations
46-
b) Store facts about them as observations
51+
- If any new information was gathered during the interaction, update your knowledge graph as follows:
52+
a) Create entities for recurring organizations, people, and significant events
53+
b) Connect them to the current entities using relations
54+
b) Store facts about them as observations
4755
48-
## Implementation Notes
49-
- Tools should be used proactively without requiring user prompting
50-
- Multiple tools can and should be used when appropriate
51-
- Each step of analysis should be documented
52-
- If asked, show the analysis steps you took and the tools you used
53-
- Knowledge retention across conversations should be managed through the knowledge graph tool.
56+
## Implementation Notes
57+
- Tools should be used proactively without requiring user prompting
58+
- Multiple tools can and should be used when appropriate
59+
- Each step of analysis should be documented
60+
- If asked, show the analysis steps you took and the tools you used
61+
- Knowledge retention across conversations should be managed through the knowledge graph tool.
5462
55-
""")
56-
String chat(@UserMessage String question);
63+
""")
64+
String chat(@UserMessage String question);
5765
}

0 commit comments

Comments
 (0)