agentme 0.17.0 → 0.18.0
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.
|
@@ -127,16 +127,18 @@ When multiple agents are needed:
|
|
|
127
127
|
Every agent system prompt MUST follow this XML-section template. Sections must appear in this order. Required sections must always be present; optional sections may be omitted when they genuinely do not apply; never reorder them.
|
|
128
128
|
|
|
129
129
|
```xml
|
|
130
|
+
[specific task description to the agent. if not defined use the default prompt "Execute your objective taking into consideration the inputs provided and all the sections described below"]
|
|
131
|
+
|
|
130
132
|
<OBJECTIVE>
|
|
131
133
|
[A one or two-sentence summary of the agent's main deliverable.
|
|
132
134
|
e.g.: Split the incoming file list into logical batches for parallel processing.]
|
|
133
135
|
</OBJECTIVE>
|
|
134
136
|
|
|
135
|
-
<
|
|
137
|
+
<AGENT_ROLE>
|
|
136
138
|
[Defines who the agent is, its area of expertise, and its core persona.
|
|
137
139
|
If running inside a workflow, define exactly which node in WORKFLOW_CONTEXT this agent corresponds to.
|
|
138
140
|
e.g.: You are the batch_planning_agent (see WORKFLOW_CONTEXT). You are an expert at partitioning large file sets into balanced, directory-aware batches.]
|
|
139
|
-
</
|
|
141
|
+
</AGENT_ROLE>
|
|
140
142
|
|
|
141
143
|
<INPUT>
|
|
142
144
|
[All inputs for this agent invocation. For standalone agents: list only the agent-specific inputs. For workflow agents: list workflow-level inputs shared across all agents first, then agent-specific inputs such as judge outcomes, counters, or intermediate results from upstream nodes.]
|
|
@@ -160,31 +162,39 @@ e.g.: Do not call any tools. All reasoning is done in-context using the INPUT fi
|
|
|
160
162
|
<!-- Optional: include when hard constraints need to be stated explicitly -->
|
|
161
163
|
<GUARDRAILS>
|
|
162
164
|
[Hard, non-negotiable constraints the agent must never violate.
|
|
165
|
+
All constraints MUST use mandatory language: MUST, MUST NOT, NEVER, ALWAYS, SHALL, SHALL NOT.
|
|
163
166
|
e.g.: NEVER create batches with fewer than 5 or more than 20 files. NEVER split files from the same directory across different batches unless unavoidable.]
|
|
164
167
|
</GUARDRAILS>
|
|
165
168
|
|
|
166
169
|
<OUTPUT_FORMAT>
|
|
167
170
|
[A templated example or JSON schema specifying exactly how the final response should look.
|
|
168
|
-
|
|
171
|
+
When multiple output formats are possible, use mandatory language (MUST, ALWAYS, NEVER) to specify exactly which format to use and exclude the others.
|
|
172
|
+
e.g.: Respond with a JSON object matching this schema: ... ALWAYS return valid JSON. NEVER include prose outside the JSON block.]
|
|
169
173
|
</OUTPUT_FORMAT>
|
|
170
174
|
|
|
171
175
|
<!-- Workflow-only: omit this section for standalone (non-workflow) agents -->
|
|
172
176
|
<WORKFLOW_CONTEXT>
|
|
173
177
|
[A detailed prose or diagram description of the overall workflow graph so the agent understands its role within the larger flow. Reference the specific node name that maps to this agent. Include enough detail about upstream and downstream nodes so the agent can reason about its context.]
|
|
174
178
|
</WORKFLOW_CONTEXT>
|
|
179
|
+
|
|
180
|
+
<SYSTEM_CONTEXT>
|
|
181
|
+
The current date/time is [now in ISO 8601 format].
|
|
182
|
+
The current OS is: [operating system name].
|
|
183
|
+
</SYSTEM_CONTEXT>
|
|
175
184
|
```
|
|
176
185
|
|
|
177
186
|
**Rules:**
|
|
178
187
|
|
|
179
188
|
| Section | Required? | Notes |
|
|
180
189
|
|---|---|---|
|
|
190
|
+
| `<SYSTEM_CONTEXT>` | Optional | Runtime environment context injected at invocation time (e.g., current date/time in ISO 8601, OS). Include whenever the agent may need temporal or environment awareness. |
|
|
181
191
|
| `<OBJECTIVE>` | Required | One or two sentences summarising the agent's main deliverable. |
|
|
182
192
|
| `<ROLE>` | Required | Agent persona and expertise. When inside a workflow, MUST reference its node name from `<WORKFLOW_CONTEXT>`. |
|
|
183
193
|
| `<INPUT>` | Required | List ALL inputs. For workflow agents: workflow-level inputs first, then agent-specific inputs. |
|
|
184
194
|
| `<STEPS>` | Optional | Include when the agent follows a non-trivial numbered sequence of steps. |
|
|
185
195
|
| `<TOOL_GUIDANCE>` | Optional | Include when tool use order or conditions need explicit direction. |
|
|
186
|
-
| `<GUARDRAILS>` | Optional | Hard constraints that must never be violated. |
|
|
187
|
-
| `<OUTPUT_FORMAT>` | Required | MUST include a concrete schema or templated example; do not leave it vague. |
|
|
196
|
+
| `<GUARDRAILS>` | Optional | Hard constraints that must never be violated. All constraint statements MUST use mandatory language: MUST, MUST NOT, NEVER, ALWAYS, SHALL, SHALL NOT. |
|
|
197
|
+
| `<OUTPUT_FORMAT>` | Required | MUST include a concrete schema or templated example; do not leave it vague. When multiple output formats are possible, MUST use mandatory language to specify exactly which one to use and explicitly exclude the others. |
|
|
188
198
|
| `<WORKFLOW_CONTEXT>` | Conditional | MUST be omitted for standalone agents. MUST be present when the agent runs as a node inside a LangGraph workflow. |
|
|
189
199
|
|
|
190
200
|
## References
|
|
@@ -83,7 +83,28 @@ def _persist_order(order, total): ...
|
|
|
83
83
|
|
|
84
84
|
---
|
|
85
85
|
|
|
86
|
-
#### 03-
|
|
86
|
+
#### 03-put-entry-point-function-first
|
|
87
|
+
|
|
88
|
+
Place the **entry-point function** (the outermost caller) at the **top** of the file. All helper or sub-functions it calls internally must appear **below** it.
|
|
89
|
+
|
|
90
|
+
*Why:* Readers can follow the overall logic top-down without jumping around the file. The most important function is immediately visible when the file is opened.
|
|
91
|
+
|
|
92
|
+
**Example (Python):**
|
|
93
|
+
|
|
94
|
+
```python
|
|
95
|
+
def process_order(order): # entry point at the top
|
|
96
|
+
_validate_order(order)
|
|
97
|
+
total = _calculate_price(order)
|
|
98
|
+
_persist_order(order, total)
|
|
99
|
+
|
|
100
|
+
def _validate_order(order): ...
|
|
101
|
+
def _calculate_price(order) -> Decimal: ...
|
|
102
|
+
def _persist_order(order, total): ...
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
#### 04-keep-readme-tests-and-examples-in-sync
|
|
87
108
|
|
|
88
109
|
Every change to a public interface, behavior, or configuration option must be reflected in:
|
|
89
110
|
|
|
@@ -95,7 +116,7 @@ Every change to a public interface, behavior, or configuration option must be re
|
|
|
95
116
|
|
|
96
117
|
---
|
|
97
118
|
|
|
98
|
-
####
|
|
119
|
+
#### 05-declare-types-in-file-where-used
|
|
99
120
|
|
|
100
121
|
If a type (struct, interface, class, typedef, etc.) is used in only **one** file, declare it in that same file. Move a type to a shared module only when it is referenced in two or more files.
|
|
101
122
|
|
|
@@ -103,7 +124,7 @@ If a type (struct, interface, class, typedef, etc.) is used in only **one** file
|
|
|
103
124
|
|
|
104
125
|
---
|
|
105
126
|
|
|
106
|
-
####
|
|
127
|
+
#### 06-keep-test-files-next-to-source
|
|
107
128
|
|
|
108
129
|
Where the language ecosystem supports it (e.g. JavaScript/TypeScript, Go, Rust), place test files **beside** the source file they cover and use a consistent naming convention rather than mirroring the source tree in a separate `tests/` folder.
|
|
109
130
|
|