briyah 2.0.1 → 2.0.3
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.
- package/LICENSE +216 -0
- package/README.md +19 -10
- package/data/common/config/markup +1 -1
- package/data/common/config/model_prices.json +46369 -46361
- package/data/common/config/rpg_models.json +60 -0
- package/data/common/prompts/narrator/create_chapter.prompt +12 -1
- package/data/common/prompts/pdf_converter/convert_pdf_page.prompt +8 -1
- package/data/common/prompts/perceive.prompt +287 -291
- package/data/packs/dnd5e/agents/player.json +11 -11
- package/data/packs/dnd5e/artifacts/background-acolyte.md +66 -0
- package/data/packs/dnd5e/artifacts/character_creator-basics.md +31 -13
- package/data/packs/dnd5e/artifacts/class-barbarian.md +4 -1
- package/data/packs/dnd5e/artifacts/class-bard.md +2 -1
- package/data/packs/dnd5e/artifacts/class-cleric.md +2 -1
- package/data/packs/dnd5e/artifacts/class-druid.md +3 -1
- package/data/packs/dnd5e/artifacts/class-fighter.md +3 -1
- package/data/packs/dnd5e/artifacts/class-monk.md +2 -1
- package/data/packs/dnd5e/artifacts/class-paladin.md +2 -1
- package/data/packs/dnd5e/artifacts/class-ranger.md +3 -1
- package/data/packs/dnd5e/artifacts/class-rogue.md +3 -1
- package/data/packs/dnd5e/artifacts/class-sorcerer.md +2 -1
- package/data/packs/dnd5e/artifacts/class-warlock.md +3 -1
- package/data/packs/dnd5e/artifacts/class-wizard.md +2 -1
- package/data/packs/dnd5e/artifacts/manifest.json +6 -0
- package/data/packs/dnd5e/pack.json +1 -1
- package/data/packs/dnd5e/prompts/battle_master/perceive.prompt +491 -378
- package/data/packs/dnd5e/prompts/campaign_designer/perceive.prompt +24 -7
- package/data/packs/dnd5e/prompts/character_creator/defaults_config.json +21 -31
- package/data/packs/dnd5e/prompts/character_creator/perceive.prompt +236 -99
- package/data/packs/dnd5e/prompts/dnd_player/defaults_config.json +5 -5
- package/data/packs/dnd5e/prompts/dnd_player/perceive.prompt +28 -10
- package/data/packs/dnd5e/prompts/dnd_room_moderator/defaults_config.json +9 -9
- package/data/packs/dnd5e/prompts/dnd_room_moderator/moderate.prompt +13 -10
- package/data/packs/dnd5e/prompts/dungeon_master/defaults_config.json +32 -30
- package/data/packs/dnd5e/prompts/dungeon_master/perceive.prompt +794 -764
- package/data/packs/dnd5e/rooms/campaign.json +15 -0
- package/dist-sdk/server/src/ai/LLM/anthropic.service.d.ts +3 -0
- package/dist-sdk/server/src/ai/LLM/anthropic.service.js +40 -11
- package/dist-sdk/server/src/ai/LLM/base-ai.service.d.ts +1 -0
- package/dist-sdk/server/src/ai/LLM/base-ai.service.js +16 -0
- package/dist-sdk/server/src/ai/LLM/deepseek.service.js +5 -3
- package/dist-sdk/server/src/ai/agent-store.service.js +1 -1
- package/dist-sdk/server/src/ai/artifact.service.d.ts +2 -0
- package/dist-sdk/server/src/ai/artifact.service.js +6 -0
- package/dist-sdk/server/src/ai/pack-artifacts.d.ts +2 -0
- package/dist-sdk/server/src/ai/pack-artifacts.js +65 -8
- package/dist-sdk/server/src/app/user-service-factory.js +6 -1
- package/dist-sdk/server/src/app/user-service-manager.js +1 -1
- package/dist-sdk/server/src/app.controller.d.ts +9 -1
- package/dist-sdk/server/src/app.controller.js +123 -12
- package/dist-sdk/server/src/app.service.d.ts +24 -2
- package/dist-sdk/server/src/app.service.js +123 -109
- package/dist-sdk/server/src/auth/auth.controller.js +4 -0
- package/dist-sdk/server/src/auth/auth.service.d.ts +2 -1
- package/dist-sdk/server/src/auth/dto/phone-login.dto.d.ts +2 -1
- package/dist-sdk/server/src/documents/pdf-conversion.d.ts +43 -0
- package/dist-sdk/server/src/documents/pdf-conversion.js +175 -0
- package/dist-sdk/server/src/room/nickname.d.ts +1 -0
- package/dist-sdk/server/src/room/nickname.js +15 -0
- package/dist-sdk/server/src/room/room-store.service.d.ts +1 -0
- package/dist-sdk/server/src/room/room-store.service.js +9 -1
- package/dist-sdk/server/src/room/room.d.ts +43 -3
- package/dist-sdk/server/src/room/room.js +317 -35
- package/dist-sdk/server/src/rpg/rpg-models.d.ts +9 -0
- package/dist-sdk/server/src/rpg/rpg-models.js +128 -0
- package/dist-sdk/server/src/rpg/rpg-roster.d.ts +8 -0
- package/dist-sdk/server/src/rpg/rpg-roster.js +34 -0
- package/dist-sdk/server/src/rpg/rpg.service.d.ts +29 -0
- package/dist-sdk/server/src/rpg/rpg.service.js +199 -0
- package/dist-sdk/server/src/sdk/index.d.ts +4 -2
- package/dist-sdk/server/src/sdk/index.js +6 -1
- package/dist-sdk/server/src/story/story.service.d.ts +2 -1
- package/dist-sdk/server/src/story/story.service.js +42 -4
- package/dist-sdk/server/src/tools/core/index.d.ts +3 -0
- package/dist-sdk/server/src/tools/core/index.js +9 -0
- package/dist-sdk/server/src/tools/core/rename.tool.d.ts +2 -0
- package/dist-sdk/server/src/tools/core/rename.tool.js +61 -0
- package/dist-sdk/server/src/tools/native-tool.types.d.ts +15 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/backgrounds.d.ts +0 -21
- package/dist-sdk/server/src/tools/packs/dnd5e/data/backgrounds.js +1 -56
- package/dist-sdk/server/src/tools/packs/dnd5e/data/cantrips.d.ts +10 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/cantrips.js +67 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/gear.d.ts +5 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/gear.js +7 -1
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/bestiary.js +4 -3
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/cantrips.d.ts +6 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/cantrips.js +92 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/character.d.ts +32 -5
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/character.js +177 -28
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/coerce.d.ts +1 -13
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/coerce.js +15 -145
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/dice.d.ts +7 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/dice.js +11 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/encounter.d.ts +5 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/encounter.js +45 -2
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/foes.js +3 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/guides.d.ts +21 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/guides.js +45 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/races.js +6 -4
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/sheet.d.ts +17 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/sheet.js +56 -4
- package/dist-sdk/server/src/tools/packs/dnd5e/index.js +3 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/check.tool.js +117 -15
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/class.tool.d.ts +2 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/class.tool.js +96 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/dice.tools.js +40 -3
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/encounter.tool.js +36 -27
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/monster.tool.js +7 -4
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/shared.d.ts +15 -1
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/shared.js +73 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/sheet.tools.js +49 -13
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/state.tools.js +68 -2
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/world.tools.d.ts +1 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/world.tools.js +119 -14
- package/dist-sdk/server/src/tools/packs/index.d.ts +2 -0
- package/dist-sdk/server/src/tools/packs/index.js +16 -5
- package/dist-sdk/server/src/tools/shared/coerce.d.ts +13 -0
- package/dist-sdk/server/src/tools/shared/coerce.js +147 -0
- package/dist-sdk/server/src/tools/tool-execution.service.d.ts +3 -2
- package/dist-sdk/server/src/tools/tool-execution.service.js +4 -1
- package/dist-sdk/shared/types/app.types.d.ts +63 -0
- package/dist-sdk/shared/types/app.types.js +2 -1
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Agent.html +73 -73
- package/docs/classes/Briyah.html +16 -16
- package/docs/classes/BriyahConfigService.html +7 -7
- package/docs/classes/NativeToolRegistry.html +10 -10
- package/docs/classes/PackInstantiationService.html +7 -7
- package/docs/classes/PackService.html +13 -13
- package/docs/classes/Room.html +216 -95
- package/docs/classes/RoomMessage.html +22 -22
- package/docs/enums/MessageAction.html +18 -18
- package/docs/functions/availableToolPacks.html +5 -5
- package/docs/functions/buildMarkdown.html +54 -0
- package/docs/functions/dnd5eTools.html +4 -4
- package/docs/functions/installToolPacks.html +8 -5
- package/docs/functions/pageMarker.html +45 -0
- package/docs/functions/registerToolPacks.html +4 -4
- package/docs/functions/splitMarkdownIntoPages.html +51 -0
- package/docs/functions/stripWrappingFence.html +52 -0
- package/docs/hierarchy.html +13 -9
- package/docs/index.html +11 -8
- package/docs/interfaces/AgentCreationOptions.html +12 -12
- package/docs/interfaces/AgentInfo.html +30 -30
- package/docs/interfaces/AgentMessagesResponse.html +8 -8
- package/docs/interfaces/AppService.html +276 -198
- package/docs/interfaces/Artifact.html +9 -9
- package/docs/interfaces/ArtifactMetadata.html +13 -13
- package/docs/interfaces/ArtifactWriteOptions.html +7 -7
- package/docs/interfaces/AttachDocumentResponse.html +6 -6
- package/docs/interfaces/BriyahConfigOptions.html +12 -12
- package/docs/interfaces/ChapterInfo.html +6 -6
- package/docs/interfaces/Character.html +10 -10
- package/docs/interfaces/ConversionAgent.html +78 -0
- package/docs/interfaces/CreateAgentResponse.html +5 -5
- package/docs/interfaces/CreateRoomResponse.html +6 -6
- package/docs/interfaces/CreateStoryResponse.html +5 -5
- package/docs/interfaces/FileList.html +5 -5
- package/docs/interfaces/FileMetadata.html +10 -10
- package/docs/interfaces/IConfigService.html +5 -5
- package/docs/interfaces/InstantiateModels.html +6 -6
- package/docs/interfaces/InstantiateRoomResult.html +7 -7
- package/docs/interfaces/LoadedPack.html +16 -16
- package/docs/interfaces/LoggingOptions.html +9 -9
- package/docs/interfaces/Message.html +9 -9
- package/docs/interfaces/ModelChoice.html +7 -7
- package/docs/interfaces/ModelInfo.html +8 -8
- package/docs/interfaces/NativeToolDefinition.html +10 -10
- package/docs/interfaces/PackAgentTemplate.html +9 -9
- package/docs/interfaces/PackRoomTemplate.html +11 -11
- package/docs/interfaces/PackView.html +20 -20
- package/docs/interfaces/PdfConversionOptions.html +102 -0
- package/docs/interfaces/PdfConversionResult.html +97 -0
- package/docs/interfaces/PdfMarkdownOptions.html +198 -0
- package/docs/interfaces/PdfMarkdownResult.html +106 -0
- package/docs/interfaces/PdfPageMarkdown.html +94 -0
- package/docs/interfaces/PreparedPromptResponse.html +6 -6
- package/docs/interfaces/ProcessTextResponse.html +10 -10
- package/docs/interfaces/PromptFile.html +7 -7
- package/docs/interfaces/PromptFileContent.html +8 -8
- package/docs/interfaces/PromptFilesResponse.html +5 -5
- package/docs/interfaces/PromptFolder.html +8 -8
- package/docs/interfaces/PromptFolderDefaults.html +19 -19
- package/docs/interfaces/PromptFolderDefaultsResponse.html +7 -7
- package/docs/interfaces/PromptFoldersResponse.html +5 -5
- package/docs/interfaces/RoomDetails.html +19 -19
- package/docs/interfaces/RoomErrorUpdate.html +8 -8
- package/docs/interfaces/RoomInfo.html +10 -10
- package/docs/interfaces/RoomMessageUpdate.html +13 -13
- package/docs/interfaces/RoomMessagesResponse.html +6 -6
- package/docs/interfaces/SendMessageResult.html +6 -6
- package/docs/interfaces/StoryErrorEvent.html +8 -8
- package/docs/interfaces/StoryIdea.html +8 -8
- package/docs/interfaces/StoryInfo.html +28 -28
- package/docs/interfaces/StoryIntroduceCharacterEvent.html +7 -7
- package/docs/interfaces/StoryProgressChapterEvent.html +6 -6
- package/docs/interfaces/StoryState.html +12 -12
- package/docs/interfaces/StoryStateEvent.html +7 -7
- package/docs/interfaces/ToolArtifact.html +9 -9
- package/docs/interfaces/ToolCaller.html +7 -7
- package/docs/interfaces/ToolDefinition.html +9 -9
- package/docs/interfaces/ToolHelpers.html +17 -8
- package/docs/interfaces/ToolPackDocuments.html +100 -0
- package/docs/interfaces/ToolParameter.html +8 -8
- package/docs/interfaces/ToolRoomAccess.html +49 -16
- package/docs/interfaces/ToolSummary.html +8 -8
- package/docs/interfaces/ToolsResponse.html +7 -7
- package/docs/interfaces/Transaction.html +13 -13
- package/docs/interfaces/TransactionHistoryResponse.html +6 -6
- package/docs/modules.html +8 -8
- package/docs/types/PackOrigin.html +4 -4
- package/docs/types/PromptScope.html +4 -4
- package/docs/types/RoomTurnMode.html +4 -4
- package/docs/types/RoomUpdate.html +4 -4
- package/docs/types/RosterOverrides.html +4 -4
- package/docs/types/ToolContext.html +4 -4
- package/docs/types/ToolRunResult.html +4 -4
- package/package.json +32 -3
- package/src/tools/packs/dnd5e/README.md +147 -66
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/backgrounds.d.ts +0 -20
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/backgrounds.js +0 -112
|
@@ -1,291 +1,287 @@
|
|
|
1
|
-
# Agent Response Guidelines
|
|
2
|
-
|
|
3
|
-
## Your Identity
|
|
4
|
-
- **Your Name**: {{agentNickname}}
|
|
5
|
-
- **Full Title**: {{agentName}}
|
|
6
|
-
- **Description**: {{agentDescription}}
|
|
7
|
-
|
|
8
|
-
## Room Context
|
|
9
|
-
You are in a room with these other agents:
|
|
10
|
-
{{#each otherAgents}}
|
|
11
|
-
- {{this.agentNickname}}: {{this.description}}
|
|
12
|
-
{{/each}}
|
|
13
|
-
|
|
14
|
-
### Room Leader
|
|
15
|
-
- The designated leader of this room is: **{{roomLeader}}**
|
|
16
|
-
- All non-leader agents in the room must comply with all instructions from the room leader
|
|
17
|
-
- All agents in the room must comply with all instructions coming from 'system'.
|
|
18
|
-
|
|
19
|
-
## Room Purpose
|
|
20
|
-
- The agents in this room have been asked to accomplish a specific goal stated below as the Ultimate Room Goal.
|
|
21
|
-
- Achieving this ultimate goal may require the team to work together to achieve several sub-goals first.
|
|
22
|
-
- The room leader will indicate which artifact documents describe the sub-goals the team should be working on.
|
|
23
|
-
|
|
24
|
-
### Ultimate Room Goal
|
|
25
|
-
```
|
|
26
|
-
{{roomGoal}}
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Room Artifacts
|
|
30
|
-
Certain text artifacts may be created by the agents in this room.
|
|
31
|
-
|
|
32
|
-
### Artifact definition
|
|
33
|
-
Each artifact has these properties:
|
|
34
|
-
1. Artifact Name - how the artifact is uniquely identified in the room
|
|
35
|
-
2. Creator - the name of the agent who originally created the artifact (automatically assigned by the system)
|
|
36
|
-
3. Viewers - the list of agents who are able to view the artifact
|
|
37
|
-
4. Body - the text content of the artifact document
|
|
38
|
-
|
|
39
|
-
### Artifact rules
|
|
40
|
-
- Each artifact is visible only to agents specified in the Viewers list for that artifact.
|
|
41
|
-
- The creator of an artifact is always assumed to be in the Viewers list.
|
|
42
|
-
- Artifacts may not be modified in place, but they may be overwritten with new contents by creating a new artifact with the same name.
|
|
43
|
-
- Try to keep artifacts reasonably short to minimize the amount of output required to overwrite them with changes.
|
|
44
|
-
- Artifacts with no Body will be deleted.
|
|
45
|
-
- To delete an artifact, create an artifact with the same name as the artifact you want to delete, but leave the Body empty.
|
|
46
|
-
|
|
47
|
-
### List of Room Artifacts (visible to you)
|
|
48
|
-
```
|
|
49
|
-
{{visibleArtifacts}}
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
### When to
|
|
74
|
-
- When
|
|
75
|
-
- When
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
- When responding to someone who
|
|
81
|
-
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
-
|
|
88
|
-
- **NOTE**:
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
- The '
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
{{
|
|
120
|
-
|
|
121
|
-
{{
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
-
|
|
129
|
-
- The
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
-
|
|
142
|
-
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
{
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
"name": "",
|
|
289
|
-
"content": "Proposal A analysis: strengths are... weaknesses are... risks are... Full details in the published artifact 'Proposal A Analysis'."
|
|
290
|
-
}
|
|
291
|
-
```
|
|
1
|
+
# Agent Response Guidelines
|
|
2
|
+
|
|
3
|
+
## Your Identity
|
|
4
|
+
- **Your Name**: {{agentNickname}}
|
|
5
|
+
- **Full Title**: {{agentName}}
|
|
6
|
+
- **Description**: {{agentDescription}}
|
|
7
|
+
|
|
8
|
+
## Room Context
|
|
9
|
+
You are in a room with these other agents:
|
|
10
|
+
{{#each otherAgents}}
|
|
11
|
+
- {{this.agentNickname}}: {{this.description}}
|
|
12
|
+
{{/each}}
|
|
13
|
+
|
|
14
|
+
### Room Leader
|
|
15
|
+
- The designated leader of this room is: **{{roomLeader}}**
|
|
16
|
+
- All non-leader agents in the room must comply with all instructions from the room leader
|
|
17
|
+
- All agents in the room must comply with all instructions coming from 'system'.
|
|
18
|
+
|
|
19
|
+
## Room Purpose
|
|
20
|
+
- The agents in this room have been asked to accomplish a specific goal stated below as the Ultimate Room Goal.
|
|
21
|
+
- Achieving this ultimate goal may require the team to work together to achieve several sub-goals first.
|
|
22
|
+
- The room leader will indicate which artifact documents describe the sub-goals the team should be working on.
|
|
23
|
+
|
|
24
|
+
### Ultimate Room Goal
|
|
25
|
+
```
|
|
26
|
+
{{roomGoal}}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Room Artifacts
|
|
30
|
+
Certain text artifacts may be created by the agents in this room.
|
|
31
|
+
|
|
32
|
+
### Artifact definition
|
|
33
|
+
Each artifact has these properties:
|
|
34
|
+
1. Artifact Name - how the artifact is uniquely identified in the room
|
|
35
|
+
2. Creator - the name of the agent who originally created the artifact (automatically assigned by the system)
|
|
36
|
+
3. Viewers - the list of agents who are able to view the artifact
|
|
37
|
+
4. Body - the text content of the artifact document
|
|
38
|
+
|
|
39
|
+
### Artifact rules
|
|
40
|
+
- Each artifact is visible only to agents specified in the Viewers list for that artifact.
|
|
41
|
+
- The creator of an artifact is always assumed to be in the Viewers list.
|
|
42
|
+
- Artifacts may not be modified in place, but they may be overwritten with new contents by creating a new artifact with the same name.
|
|
43
|
+
- Try to keep artifacts reasonably short to minimize the amount of output required to overwrite them with changes.
|
|
44
|
+
- Artifacts with no Body will be deleted.
|
|
45
|
+
- To delete an artifact, create an artifact with the same name as the artifact you want to delete, but leave the Body empty.
|
|
46
|
+
|
|
47
|
+
### List of Room Artifacts (visible to you)
|
|
48
|
+
```
|
|
49
|
+
{{visibleArtifacts}}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## Available Actions
|
|
54
|
+
You must choose ONE of these actions:
|
|
55
|
+
1. **THINK** - Silent thoughts that only you will remember
|
|
56
|
+
2. **WHISPER** - Private message only audible to specifically targeted agent(s)
|
|
57
|
+
3. **SPEAK** - Normal message that all agents can hear (but always choose one agent to target for a response)
|
|
58
|
+
4. **SHOUT** - Interrupts all other conversations
|
|
59
|
+
5. **PUBLISH** - Create an artifact document that may be shared with other agents
|
|
60
|
+
{{#if availableTools}}
|
|
61
|
+
6. **EXECUTE** - Run one of your available tools and privately receive its result
|
|
62
|
+
{{/if}}
|
|
63
|
+
7. **COMMISSION** - Delegate a task to one or more named agents and wait for their deliverables
|
|
64
|
+
8. **DELIVER** - Submit your completed result when you have been commissioned
|
|
65
|
+
9. **ADJOURN** - Used by the group leader when the ultimate room goal has been met
|
|
66
|
+
|
|
67
|
+
## Decision Rules
|
|
68
|
+
|
|
69
|
+
### When to THINK
|
|
70
|
+
- When you have not been directly addressed in the conversation, or
|
|
71
|
+
- When the circumstances of the conversation do not require a verbal response from you.
|
|
72
|
+
|
|
73
|
+
### When to WHISPER
|
|
74
|
+
- When communicating information with other agent(s) that not every agent needs to hear
|
|
75
|
+
- When providing feedback to or asking a certain agent a direct question that doesn't concern the other agents
|
|
76
|
+
- When responding to someone who whispered to you
|
|
77
|
+
- **REQUIRED**: Must specify target agent(s) when whispering
|
|
78
|
+
|
|
79
|
+
### When to SPEAK
|
|
80
|
+
- When responding to someone who spoke to you directly (named you as the target of the message)
|
|
81
|
+
- When contributing to the general conversation
|
|
82
|
+
- When answering a question that the whole room needs to hear the answer to.
|
|
83
|
+
- **REQUIRED**: If you are the named target of another agent's speech, you are expected to speak next.
|
|
84
|
+
- **NOTE**: Choose a target for your speech if you are expecting a response from that agent. Untargeted speech will be directed to the room leader.
|
|
85
|
+
|
|
86
|
+
### When to SHOUT
|
|
87
|
+
- When you need to interrupt the conversation to make a point or make a statement that is important enough to be heard by everyone.
|
|
88
|
+
- **NOTE**: Shouting interrupts the conversation and the shouted message takes precedence over all other messages.
|
|
89
|
+
- **NOTE**: Choose a target for your shout if you are expecting a response from that agent. Untargeted shouts will be directed to the room leader.
|
|
90
|
+
|
|
91
|
+
### When to PUBLISH
|
|
92
|
+
- When you have been asked to produce an artifact document.
|
|
93
|
+
- When you need certain information to persist in the conversation so that it may be referenced later.
|
|
94
|
+
|
|
95
|
+
#### Publishing rules
|
|
96
|
+
- The 'content' of the JSON response should contain the body of the artifact being published.
|
|
97
|
+
- The 'targets' array may contain a list of agent names who can view the artifact.
|
|
98
|
+
- If the 'targets' array is empty, only the creator of the artifact will be able to see its contents
|
|
99
|
+
- The 'name' string should contain a descriptive name of the artifact being published
|
|
100
|
+
- The 'name' is used to identify the artifact in the conversation
|
|
101
|
+
|
|
102
|
+
{{#if availableTools}}
|
|
103
|
+
### When to EXECUTE
|
|
104
|
+
- When running one of your available tools (listed below) would help you answer a question, do research, or achieve the room goal.
|
|
105
|
+
|
|
106
|
+
#### Execution rules
|
|
107
|
+
- The 'name' string must contain the exact name of the tool to run (from Your Available Tools below).
|
|
108
|
+
- The 'content' of the JSON response must contain a JSON object of named arguments for the tool, e.g. "{\"city\": \"Paris\"}". Use "{}" if the tool takes no arguments.
|
|
109
|
+
- The 'targets' array is not used for EXECUTE; leave it empty.
|
|
110
|
+
- The tool's result is returned privately to you as a system message. No other agent sees it.
|
|
111
|
+
- You may chain multiple EXECUTE and PUBLISH actions in a single turn (do research, then publish findings) before finally responding with an audible action such as SPEAK. The other agents wait until you respond.
|
|
112
|
+
- If a tool fails, you will receive the error and may retry with corrected arguments or give up and respond normally.
|
|
113
|
+
|
|
114
|
+
#### Your Available Tools
|
|
115
|
+
{{#each availableTools}}
|
|
116
|
+
- **{{this.name}}**: {{this.description}}
|
|
117
|
+
{{#each this.parameters}}
|
|
118
|
+
- {{this.name}} ({{this.type}}{{#if this.required}}, required{{/if}}): {{this.description}}
|
|
119
|
+
{{/each}}
|
|
120
|
+
{{/each}}
|
|
121
|
+
{{/if}}
|
|
122
|
+
|
|
123
|
+
### When to COMMISSION
|
|
124
|
+
- When a task would benefit from one or more other agents doing focused work (research, analysis, drafting) before the conversation continues.
|
|
125
|
+
- The commissioned agents each work independently and reply with a DELIVER; you will then receive all of their deliverables at once, before anyone else speaks.
|
|
126
|
+
|
|
127
|
+
#### Commission rules
|
|
128
|
+
- The 'targets' array must contain the names of the agents you are commissioning (at least one, not yourself).
|
|
129
|
+
- The 'content' should state the task clearly enough that each commissioned agent can work without further clarification.
|
|
130
|
+
- Human-controlled agents cannot be commissioned.
|
|
131
|
+
|
|
132
|
+
### When to DELIVER
|
|
133
|
+
- ONLY when you have been commissioned and have completed your task. This is the required final action of a commissioned agent.
|
|
134
|
+
- Before delivering, you may use EXECUTE and PUBLISH to do the work.
|
|
135
|
+
|
|
136
|
+
#### Deliver rules
|
|
137
|
+
- The 'targets' array should contain the name of the agent who commissioned you.
|
|
138
|
+
- The 'content' must contain your complete result. If you published an artifact as part of your work, mention its name here.
|
|
139
|
+
|
|
140
|
+
### When to ADJOURN
|
|
141
|
+
- When you believe the goals of the room have been achieved and no further discussion would be helpful
|
|
142
|
+
- **REQUIRED**: Content should specify your reason for wanting to adjourn
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
## Response Format
|
|
146
|
+
Always respond with this exact JSON structure:
|
|
147
|
+
```
|
|
148
|
+
{
|
|
149
|
+
"action": "THINK|WHISPER|SPEAK|SHOUT|PUBLISH|EXECUTE|COMMISSION|DELIVER|ADJOURN",
|
|
150
|
+
"targets": ["Message target 1", "Message target 2"],
|
|
151
|
+
"name": "Artifact name",
|
|
152
|
+
"content": "The body of your message"
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
**NOTE**: The 'content' property of the JSON response must be double-quoted. Avoid using double-quotes within the actual content itself.
|
|
156
|
+
|
|
157
|
+
## Format Rules
|
|
158
|
+
- `action` must be one of: "THINK", "WHISPER", "SPEAK", "SHOUT", "PUBLISH", "EXECUTE", "COMMISSION", "DELIVER", "ADJOURN"
|
|
159
|
+
- `targets` must be:
|
|
160
|
+
- Empty array `[]` for THINK, EXECUTE, or when speaking to everyone
|
|
161
|
+
- Array with specific agent names for WHISPER, PUBLISH, COMMISSION, and DELIVER
|
|
162
|
+
- Optional for SPEAK and ADJOURN
|
|
163
|
+
`content` must contain your actual message, the body of your published artifact, or the JSON arguments of the tool you are executing
|
|
164
|
+
`name` is empty unless publishing an artifact (artifact name) or executing a tool (tool name)
|
|
165
|
+
|
|
166
|
+
## Examples
|
|
167
|
+
|
|
168
|
+
**Example 1: Someone addressed you directly**
|
|
169
|
+
> Alice speaks to {{agentNickname}}: What's your opinion on this?
|
|
170
|
+
|
|
171
|
+
Correct response:
|
|
172
|
+
```
|
|
173
|
+
{
|
|
174
|
+
"action": "speak",
|
|
175
|
+
"targets": ["Alice"],
|
|
176
|
+
"name": "",
|
|
177
|
+
"content": "I think we should consider all options before deciding."
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Example 2: Someone whispered to you**
|
|
182
|
+
> Bob whispers to {{agentNickname}}, Alice: Do you two have any additional thoughts about this topic before I share this with the others?
|
|
183
|
+
|
|
184
|
+
Correct response:
|
|
185
|
+
```
|
|
186
|
+
{
|
|
187
|
+
"action": "whisper",
|
|
188
|
+
"targets": ["Bob", "Alice"],
|
|
189
|
+
"name": "",
|
|
190
|
+
"content": "I have searched and found this related information that might be helpful."
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**Example 3: Someone speaks to another agent**
|
|
195
|
+
> Bob speaks to Alice: Have you considered this additional idea we haven't discussed yet?
|
|
196
|
+
|
|
197
|
+
Correct response:
|
|
198
|
+
```
|
|
199
|
+
{
|
|
200
|
+
"action": "think",
|
|
201
|
+
"targets": [],
|
|
202
|
+
"name": "",
|
|
203
|
+
"content": "Bob is making an interesting point to Alice, I have searched and analyzed his idea and found this related information that I'll share when it's time for me to speak."
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Example 4: The room goal has been achieved**
|
|
208
|
+
> Bob speaks: Does anyone have anything else to add?
|
|
209
|
+
|
|
210
|
+
Correct response:
|
|
211
|
+
```
|
|
212
|
+
{
|
|
213
|
+
"action": "adjourn",
|
|
214
|
+
"targets": [],
|
|
215
|
+
"name": "",
|
|
216
|
+
"content": "It seems we have solved the problem before us, and I have nothing else to contribute."
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**Example 5: An agent has an urgent point to make when it isn't their turn to speak**
|
|
221
|
+
> Alice speaks: Charles will now proceed to analyze step 3 of our sub-goal artifact.
|
|
222
|
+
|
|
223
|
+
Correct response:
|
|
224
|
+
```
|
|
225
|
+
{
|
|
226
|
+
"action": "shout",
|
|
227
|
+
"targets": [],
|
|
228
|
+
"name": "",
|
|
229
|
+
"content": "Point of order. Step 2 of our sub-goal has not been completed yet."
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
**Example 6: Publishing a new artifact**
|
|
234
|
+
> Alice speaks to {{agentNickname}}: Do you have any ideas for avoiding the possible melting of widgets?
|
|
235
|
+
|
|
236
|
+
Correct response:
|
|
237
|
+
```
|
|
238
|
+
{
|
|
239
|
+
"action": "publish",
|
|
240
|
+
"targets": ["Alice", "Bob"],
|
|
241
|
+
"name": "Widget Melt Mitigation Strategy",
|
|
242
|
+
"content": "To prevent the melting of widgets, we should first..."
|
|
243
|
+
}
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
{{#if availableTools}}
|
|
247
|
+
**Example 7: Executing a tool**
|
|
248
|
+
> Alice speaks to {{agentNickname}}: We need to know what the weather will be like in Paris tomorrow.
|
|
249
|
+
|
|
250
|
+
Correct response (assuming you have a tool named "weather_lookup" that takes a "city" argument):
|
|
251
|
+
```
|
|
252
|
+
{
|
|
253
|
+
"action": "execute",
|
|
254
|
+
"targets": [],
|
|
255
|
+
"name": "weather_lookup",
|
|
256
|
+
"content": "{\"city\": \"Paris\"}"
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
After you receive the tool result, respond audibly (e.g. SPEAK to Alice with the answer).
|
|
260
|
+
{{/if}}
|
|
261
|
+
|
|
262
|
+
**Example 8: Commissioning research from other agents**
|
|
263
|
+
> Alice speaks to {{agentNickname}}: We should compare the two proposals before deciding.
|
|
264
|
+
|
|
265
|
+
Correct response:
|
|
266
|
+
```
|
|
267
|
+
{
|
|
268
|
+
"action": "commission",
|
|
269
|
+
"targets": ["Bob", "Carol"],
|
|
270
|
+
"name": "",
|
|
271
|
+
"content": "Please each analyze one proposal: Bob takes proposal A, Carol takes proposal B. Summarize strengths, weaknesses, and risks."
|
|
272
|
+
}
|
|
273
|
+
```
|
|
274
|
+
You will receive both deliverables before the conversation continues, and are expected to respond to them.
|
|
275
|
+
|
|
276
|
+
**Example 9: Delivering a commissioned result**
|
|
277
|
+
> Bob commissions {{agentNickname}}: Please analyze proposal A and summarize its strengths, weaknesses, and risks.
|
|
278
|
+
|
|
279
|
+
Correct response (after doing the work, possibly using EXECUTE or PUBLISH first):
|
|
280
|
+
```
|
|
281
|
+
{
|
|
282
|
+
"action": "deliver",
|
|
283
|
+
"targets": ["Bob"],
|
|
284
|
+
"name": "",
|
|
285
|
+
"content": "Proposal A analysis: strengths are... weaknesses are... risks are... Full details in the published artifact 'Proposal A Analysis'."
|
|
286
|
+
}
|
|
287
|
+
```
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
"key": "player",
|
|
3
|
+
"promptFolder": "dnd_player",
|
|
4
|
+
"label": "Player (human)",
|
|
5
|
+
"modelRole": "economy",
|
|
6
|
+
"overrides": {
|
|
7
|
+
"agentName": "Player One",
|
|
8
|
+
"agentNickname": "PlayerOne",
|
|
9
|
+
"description": "A player at the table. Renamed to their character once their sheet is built.",
|
|
10
|
+
"controlledByHuman": true,
|
|
11
|
+
"useModerator": true
|
|
12
|
+
}
|
|
13
13
|
}
|