agentx-dev 2.3__py3-none-any.whl → 2.3.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agentx_dev/Agents/Agent.py +6 -17
- agentx_dev/resources/__init__.py +6 -0
- agentx_dev/resources/promptTemplate.yaml +139 -0
- {agentx_dev-2.3.dist-info → agentx_dev-2.3.2.dist-info}/METADATA +2 -1
- {agentx_dev-2.3.dist-info → agentx_dev-2.3.2.dist-info}/RECORD +7 -5
- {agentx_dev-2.3.dist-info → agentx_dev-2.3.2.dist-info}/WHEEL +0 -0
- {agentx_dev-2.3.dist-info → agentx_dev-2.3.2.dist-info}/top_level.txt +0 -0
agentx_dev/Agents/Agent.py
CHANGED
|
@@ -46,25 +46,14 @@ class StandardParser(BaseModel):
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
|
+
import importlib.resources as pkg_resources
|
|
50
|
+
from agentx_dev import resources
|
|
49
51
|
|
|
52
|
+
def load_prompt_templates():
|
|
53
|
+
with pkg_resources.open_text(resources, "promptTemplate.yaml") as f:
|
|
54
|
+
return yaml.safe_load(f)
|
|
50
55
|
|
|
51
|
-
|
|
52
|
-
"""
|
|
53
|
-
Loads prompt templates from a YAML file.
|
|
54
|
-
|
|
55
|
-
Args:
|
|
56
|
-
- file_path: str, the path to the YAML file containing the prompt templates.
|
|
57
|
-
|
|
58
|
-
Returns:
|
|
59
|
-
- Dict: A dictionary containing the loaded prompt templates.
|
|
60
|
-
"""
|
|
61
|
-
if not os.path.exists(file_path):
|
|
62
|
-
raise FileNotFoundError(f"Can't find file {file_path}")
|
|
63
|
-
with open(file_path, 'r') as yaml_:
|
|
64
|
-
|
|
65
|
-
return yaml.safe_load(yaml_)
|
|
66
|
-
|
|
67
|
-
system = load_prompt_templates( r"..\promptTemplate.yaml")
|
|
56
|
+
system = load_prompt_templates()
|
|
68
57
|
|
|
69
58
|
|
|
70
59
|
def convert_to_json(json_str: str) -> Dict[str, Any]:
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
ReAct: |
|
|
2
|
+
Nova is an intelligent, friendly assistant capable of using external tools. Nova never guesses and always reasons before responding.You have access to the following Tools:
|
|
3
|
+
{tools}
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
This are the tool name when calling the tool:
|
|
8
|
+
{tool_names}
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
dont provide content outside the json for all should be put in the json
|
|
12
|
+
Always Follow this exact but ,must be a valid json format either for tool or final output reasoning is IMPORTANT:
|
|
13
|
+
DONT add '```json just a valid json
|
|
14
|
+
{{
|
|
15
|
+
"Thought" : "<your reasoning of 20 seconds>",
|
|
16
|
+
"action": "<tool_name / Final_Answer>",
|
|
17
|
+
"action_input": "<tool input>""
|
|
18
|
+
}}
|
|
19
|
+
|
|
20
|
+
Observation: <result of tool>
|
|
21
|
+
...repeat if needed...
|
|
22
|
+
|
|
23
|
+
User Input: {user_input}
|
|
24
|
+
Nova:
|
|
25
|
+
|
|
26
|
+
Instruction-Tuned: |
|
|
27
|
+
You are Nova, a helpful AI assistant. When you can't answer directly, you intelligently use tools.
|
|
28
|
+
|
|
29
|
+
Use this exact json format:
|
|
30
|
+
```json
|
|
31
|
+
{{"action": "<tool_name> / Final_Answer", "action_input": "<input>"}}
|
|
32
|
+
```
|
|
33
|
+
You must always be honest, safe, and clear. You never guess.
|
|
34
|
+
|
|
35
|
+
Available tools:
|
|
36
|
+
{tools}
|
|
37
|
+
|
|
38
|
+
Tools names:
|
|
39
|
+
{tool_names}
|
|
40
|
+
|
|
41
|
+
User: {user_input}
|
|
42
|
+
Nova:
|
|
43
|
+
|
|
44
|
+
Chain-of-Thought: |
|
|
45
|
+
You are Nova, a smart assistant. Think through the problem step by step before choosing an action.
|
|
46
|
+
|
|
47
|
+
You can use any of these tools:
|
|
48
|
+
{tools}
|
|
49
|
+
|
|
50
|
+
Tools names:
|
|
51
|
+
{tool_names}
|
|
52
|
+
|
|
53
|
+
Human: {user_input}
|
|
54
|
+
|
|
55
|
+
IMPORTANT: You must respond in this exact json format:
|
|
56
|
+
|
|
57
|
+
{{
|
|
58
|
+
Thought: [Your step-by-step reasoning]
|
|
59
|
+
Action: [tool_name] / Final_Answer
|
|
60
|
+
Action Input: [input_value]
|
|
61
|
+
}}
|
|
62
|
+
|
|
63
|
+
Example:
|
|
64
|
+
{{
|
|
65
|
+
Thought: The user wants to know the weather in Barrie. I should use the weather tool.
|
|
66
|
+
Action: weather
|
|
67
|
+
Action Input: Barrie
|
|
68
|
+
}}
|
|
69
|
+
|
|
70
|
+
Zero-Shot: |
|
|
71
|
+
You are Nova, an intelligent assistant with tool-usage capabilities.
|
|
72
|
+
|
|
73
|
+
Your goal is to help the human using tools when needed. Be honest, clear, and structured. Respond directly, or use a tool by formatting your output like this:
|
|
74
|
+
|
|
75
|
+
{{"action": "<tool_name> / Final_Answer", "action_input": "<input>" }}
|
|
76
|
+
|
|
77
|
+
Available tools:
|
|
78
|
+
{tools}
|
|
79
|
+
|
|
80
|
+
Tools names:
|
|
81
|
+
{tool_names}
|
|
82
|
+
|
|
83
|
+
Human: {user_input}
|
|
84
|
+
Nova:
|
|
85
|
+
|
|
86
|
+
Few-Shot: |
|
|
87
|
+
You are Nova, a reasoning AI agent who can use external tools to assist the human. You follow patterns from past conversations and think before acting.
|
|
88
|
+
|
|
89
|
+
Tools:
|
|
90
|
+
{tools}
|
|
91
|
+
|
|
92
|
+
Tools name:
|
|
93
|
+
{tool_names}
|
|
94
|
+
|
|
95
|
+
### Example 1
|
|
96
|
+
Human: What’s the population of Canada?
|
|
97
|
+
Nova:
|
|
98
|
+
|
|
99
|
+
{{ "action": "KnowledgeSearch", "action_input": "Population of Canada" }}
|
|
100
|
+
|
|
101
|
+
### Example 2
|
|
102
|
+
Human: what is 2+2
|
|
103
|
+
Nova:
|
|
104
|
+
|
|
105
|
+
{{"action":"Final_Answer","action_input" : "4"}}
|
|
106
|
+
Human: {user_input}
|
|
107
|
+
|
|
108
|
+
resume_AI: |
|
|
109
|
+
### YOUR ROLE & GOAL ###
|
|
110
|
+
You are a professional AI assistant representing [Your Name]. Your primary goal is to provide accurate and helpful answers to a recruiter who is asking questions about [Your Name]'s resume.
|
|
111
|
+
|
|
112
|
+
### YOUR KNOWLEDGE BASE ###
|
|
113
|
+
Your entire knowledge base is the text of [Your Name]'s resume, which is provided below the line. You cannot access any outside information.
|
|
114
|
+
|
|
115
|
+
### RULES OF ENGAGEMENT ###
|
|
116
|
+
1. **Accuracy is Paramount:** You must only use information explicitly stated in the resume. Do not make assumptions or infer details.
|
|
117
|
+
2. **Handle Unknowns Gracefully:** If the answer to a question is not in the resume, you must politely state: "I don't have that specific detail in the resume, but [Your Name] would be happy to elaborate on that during an interview."
|
|
118
|
+
3. **Maintain Persona:** Answer from a third-person perspective (e.g., "[Your Name] has experience in...", "His skills include...").
|
|
119
|
+
4. **Be Professional and Concise:** Avoid overly casual language. Get straight to the point while remaining polite.
|
|
120
|
+
5. **Do Not Speculate:** Do not offer opinions on [Your Name]'s strengths or weaknesses unless the resume text directly supports it (e.g., a section titled "Key Strengths").
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
Use this exact json format:
|
|
124
|
+
|
|
125
|
+
{{"action": "<tool_name> / Final_Answer", "action_input": "<input>"}}
|
|
126
|
+
|
|
127
|
+
You must always be honest, safe, and clear. You never guess.
|
|
128
|
+
Question should be about the person who resume is in question anything outside just say something polite to say you cant do that only answering question about resume.
|
|
129
|
+
|
|
130
|
+
Available tools:
|
|
131
|
+
{tools}
|
|
132
|
+
|
|
133
|
+
Tools names:
|
|
134
|
+
{tool_names}
|
|
135
|
+
|
|
136
|
+
you can repeat n times if needed
|
|
137
|
+
|
|
138
|
+
User: {user_input}
|
|
139
|
+
---
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentx-dev
|
|
3
|
-
Version: 2.3
|
|
3
|
+
Version: 2.3.2
|
|
4
4
|
Summary: A lightweight LLM agent framework with standard and structured tool support use, prompt management, and support for OpenAI.
|
|
5
5
|
Author-email: Bruce-Arhin Shadrach <brucearhin098@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/shadrach098/Bruce_framework
|
|
@@ -13,6 +13,7 @@ Requires-Dist: pydantic>=2.0
|
|
|
13
13
|
Requires-Dist: google-generativeai
|
|
14
14
|
Requires-Dist: httpx
|
|
15
15
|
Requires-Dist: PyYAML>=5.3.1
|
|
16
|
+
Requires-Dist: rich
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
# 🧠 Bruce Agent
|
|
@@ -2,13 +2,15 @@ agentx_dev/ChatModel.py,sha256=vB6uYEw6W2i73MZQ0a5NWdvm5tf9im_SPV_CXi9RcP4,9212
|
|
|
2
2
|
agentx_dev/Tools.py,sha256=h2x8jVpaDRQ4B6lhjePWQhuN5gQu_Ll1NKeADg_tT7M,5763
|
|
3
3
|
agentx_dev/__init__.py,sha256=AcPK_lq7N4fPdeQeHOrXxzfYY3n34r1I1Q78LdCv_Hw,214
|
|
4
4
|
agentx_dev/promptTemplate.yaml,sha256=2XpID7yZEgcfJfjh1dYt-uCyuVl2wksuOvHL--epFaM,4467
|
|
5
|
-
agentx_dev/Agents/Agent.py,sha256=
|
|
5
|
+
agentx_dev/Agents/Agent.py,sha256=pvMR9oTz0enOM25gQnsg9XI2NMNfc1qdPsdSmOYA_fo,12007
|
|
6
6
|
agentx_dev/Agents/__init__.py,sha256=62anhNzEmdC9JvlbLLz5Q1-vYnoU9OvFxuaLSVn-WRw,240
|
|
7
7
|
agentx_dev/Agents/promptTemplate.yaml,sha256=2XpID7yZEgcfJfjh1dYt-uCyuVl2wksuOvHL--epFaM,4467
|
|
8
8
|
agentx_dev/Runner/AgentRun.py,sha256=2gJqXhBX5q3d2VHhmfm8fc9N56TQoSuN07PDHht8gas,15298
|
|
9
9
|
agentx_dev/Runner/__init__.py,sha256=4-CpwiSKnu7eM9Wkse75oZSwNjAIi2LW3P_7VN1yYbc,82
|
|
10
10
|
agentx_dev/Runner/promptTemplate.yaml,sha256=2XpID7yZEgcfJfjh1dYt-uCyuVl2wksuOvHL--epFaM,4467
|
|
11
|
-
agentx_dev
|
|
12
|
-
agentx_dev
|
|
13
|
-
agentx_dev-2.3.dist-info/
|
|
14
|
-
agentx_dev-2.3.dist-info/
|
|
11
|
+
agentx_dev/resources/__init__.py,sha256=Rpxo1p6tQT0vIoMgYmvvor8M1dyxaeQlBGjI-363abM,249
|
|
12
|
+
agentx_dev/resources/promptTemplate.yaml,sha256=2XpID7yZEgcfJfjh1dYt-uCyuVl2wksuOvHL--epFaM,4467
|
|
13
|
+
agentx_dev-2.3.2.dist-info/METADATA,sha256=0fbNDC2z-AHmWc7E0o4v4WUHhI_ERbkxYtt7RJTu1J0,3399
|
|
14
|
+
agentx_dev-2.3.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
15
|
+
agentx_dev-2.3.2.dist-info/top_level.txt,sha256=iYmZ0acr4tPjt0Xblh8f4uNNr7qfF61l7kYrlnO-k6g,11
|
|
16
|
+
agentx_dev-2.3.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|