briyah 1.5.0 → 2.0.1

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.
Files changed (231) hide show
  1. package/README.md +1272 -994
  2. package/data/common/config/markup +1 -1
  3. package/data/common/prompts/character/progress_character.json +5 -5
  4. package/data/common/prompts/illustrator/describe_scene.json +11 -3
  5. package/data/common/prompts/perceive.json +2 -2
  6. package/data/common/prompts/room_moderator/moderate.json +34 -34
  7. package/data/common/prompts/story_moderator/moderate.json +62 -62
  8. package/data/packs/dnd5e/agents/battle-master.json +6 -0
  9. package/data/packs/dnd5e/agents/campaign-designer.json +6 -0
  10. package/data/packs/dnd5e/agents/character-creator.json +6 -0
  11. package/data/packs/dnd5e/agents/dungeon-master.json +6 -0
  12. package/data/packs/dnd5e/agents/player.json +13 -0
  13. package/data/packs/dnd5e/agents/table-moderator.json +6 -0
  14. package/data/{common/artifacts/dnd5e/dungeon_master-procedure.md → packs/dnd5e/artifacts/battle_master-combat.md} +31 -131
  15. package/data/packs/dnd5e/artifacts/dungeon_master-procedure.md +192 -0
  16. package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/manifest.json +8 -2
  17. package/data/packs/dnd5e/pack.json +6 -0
  18. package/data/packs/dnd5e/prompts/battle_master/defaults_config.json +23 -0
  19. package/data/packs/dnd5e/prompts/battle_master/perceive.json +33 -0
  20. package/data/packs/dnd5e/prompts/battle_master/perceive.prompt +378 -0
  21. package/data/{common → packs/dnd5e}/prompts/character_creator/defaults_config.json +1 -1
  22. package/data/{common → packs/dnd5e}/prompts/character_creator/perceive.prompt +29 -0
  23. package/data/{common → packs/dnd5e}/prompts/dnd_player/perceive.prompt +40 -22
  24. package/data/{common → packs/dnd5e}/prompts/dnd_room_moderator/moderate.json +34 -34
  25. package/data/{common → packs/dnd5e}/prompts/dnd_room_moderator/moderate.prompt +14 -3
  26. package/data/{common → packs/dnd5e}/prompts/dungeon_master/defaults_config.json +1 -0
  27. package/data/{common → packs/dnd5e}/prompts/dungeon_master/perceive.prompt +122 -115
  28. package/data/packs/dnd5e/prompts/dungeon_master/system_instruction.prompt +0 -0
  29. package/data/packs/dnd5e/rooms/table.json +16 -0
  30. package/dist-sdk/server/src/ai/LLM/base-ai.service.js +4 -13
  31. package/dist-sdk/server/src/ai/LLM/deepseek.service.d.ts +2 -1
  32. package/dist-sdk/server/src/ai/LLM/deepseek.service.js +65 -77
  33. package/dist-sdk/server/src/ai/agent-config.d.ts +2 -0
  34. package/dist-sdk/server/src/ai/agent-store.service.js +8 -0
  35. package/dist-sdk/server/src/ai/agent.d.ts +6 -0
  36. package/dist-sdk/server/src/ai/agent.js +25 -2
  37. package/dist-sdk/server/src/ai/artifact.service.d.ts +3 -1
  38. package/dist-sdk/server/src/ai/artifact.service.js +12 -5
  39. package/dist-sdk/server/src/ai/pack-artifacts.d.ts +3 -3
  40. package/dist-sdk/server/src/ai/pack-artifacts.js +21 -15
  41. package/dist-sdk/server/src/app/user-service-factory.js +9 -1
  42. package/dist-sdk/server/src/app.controller.d.ts +11 -11
  43. package/dist-sdk/server/src/app.controller.js +179 -89
  44. package/dist-sdk/server/src/app.service.d.ts +30 -7
  45. package/dist-sdk/server/src/app.service.js +146 -95
  46. package/dist-sdk/server/src/common/errors.d.ts +0 -3
  47. package/dist-sdk/server/src/common/errors.js +1 -11
  48. package/dist-sdk/server/src/config/prompt-resolver.d.ts +41 -0
  49. package/dist-sdk/server/src/config/prompt-resolver.js +196 -0
  50. package/dist-sdk/server/src/config/user-config.service.d.ts +17 -0
  51. package/dist-sdk/server/src/config/user-config.service.js +103 -0
  52. package/dist-sdk/server/src/config/user-paths.service.d.ts +4 -4
  53. package/dist-sdk/server/src/config/user-paths.service.js +12 -16
  54. package/dist-sdk/server/src/packs/pack-instantiation.service.d.ts +36 -0
  55. package/dist-sdk/server/src/packs/pack-instantiation.service.js +165 -0
  56. package/dist-sdk/server/src/packs/pack-manifest.d.ts +52 -0
  57. package/dist-sdk/server/src/packs/pack-manifest.js +256 -0
  58. package/dist-sdk/server/src/packs/pack.service.d.ts +24 -0
  59. package/dist-sdk/server/src/packs/pack.service.js +151 -0
  60. package/dist-sdk/server/src/room/room-config.d.ts +5 -0
  61. package/dist-sdk/server/src/room/room-message.service.d.ts +2 -1
  62. package/dist-sdk/server/src/room/room-message.service.js +3 -2
  63. package/dist-sdk/server/src/room/room-store.service.d.ts +3 -0
  64. package/dist-sdk/server/src/room/room-store.service.js +41 -5
  65. package/dist-sdk/server/src/room/room.d.ts +7 -0
  66. package/dist-sdk/server/src/room/room.js +33 -3
  67. package/dist-sdk/server/src/sdk/briyah.d.ts +2 -0
  68. package/dist-sdk/server/src/sdk/briyah.js +45 -8
  69. package/dist-sdk/server/src/sdk/index.d.ts +7 -2
  70. package/dist-sdk/server/src/sdk/index.js +6 -2
  71. package/dist-sdk/server/src/shared/shared.module.js +0 -3
  72. package/dist-sdk/server/src/story/story.service.d.ts +2 -2
  73. package/dist-sdk/server/src/tools/packs/dnd5e/data/kits.d.ts +17 -0
  74. package/dist-sdk/server/src/tools/packs/dnd5e/data/kits.js +54 -0
  75. package/dist-sdk/server/src/tools/packs/dnd5e/data/races.d.ts +3 -0
  76. package/dist-sdk/server/src/tools/packs/dnd5e/data/races.js +6 -0
  77. package/dist-sdk/server/src/tools/packs/dnd5e/data/srd.d.ts +2 -0
  78. package/dist-sdk/server/src/tools/packs/dnd5e/data/srd.js +4 -0
  79. package/dist-sdk/server/src/tools/packs/dnd5e/engine/backgrounds.d.ts +1 -1
  80. package/dist-sdk/server/src/tools/packs/dnd5e/engine/backgrounds.js +6 -3
  81. package/dist-sdk/server/src/tools/packs/dnd5e/engine/character.d.ts +3 -0
  82. package/dist-sdk/server/src/tools/packs/dnd5e/engine/character.js +45 -5
  83. package/dist-sdk/server/src/tools/packs/dnd5e/engine/encounter.d.ts +27 -0
  84. package/dist-sdk/server/src/tools/packs/dnd5e/engine/encounter.js +103 -0
  85. package/dist-sdk/server/src/tools/packs/dnd5e/engine/foes.d.ts +7 -0
  86. package/dist-sdk/server/src/tools/packs/dnd5e/engine/foes.js +83 -0
  87. package/dist-sdk/server/src/tools/packs/dnd5e/engine/kits.d.ts +19 -0
  88. package/dist-sdk/server/src/tools/packs/dnd5e/engine/kits.js +130 -0
  89. package/dist-sdk/server/src/tools/packs/dnd5e/engine/races.d.ts +2 -1
  90. package/dist-sdk/server/src/tools/packs/dnd5e/engine/races.js +13 -2
  91. package/dist-sdk/server/src/tools/packs/dnd5e/engine/rules.d.ts +6 -0
  92. package/dist-sdk/server/src/tools/packs/dnd5e/engine/rules.js +16 -0
  93. package/dist-sdk/server/src/tools/packs/dnd5e/engine/sheet.d.ts +10 -0
  94. package/dist-sdk/server/src/tools/packs/dnd5e/engine/sheet.js +82 -1
  95. package/dist-sdk/server/src/tools/packs/dnd5e/index.js +2 -0
  96. package/dist-sdk/server/src/tools/packs/dnd5e/tools/check.tool.js +51 -6
  97. package/dist-sdk/server/src/tools/packs/dnd5e/tools/dice.tools.js +19 -9
  98. package/dist-sdk/server/src/tools/packs/dnd5e/tools/encounter.tool.d.ts +2 -0
  99. package/dist-sdk/server/src/tools/packs/dnd5e/tools/encounter.tool.js +134 -0
  100. package/dist-sdk/server/src/tools/packs/dnd5e/tools/monster.tool.js +31 -13
  101. package/dist-sdk/server/src/tools/packs/dnd5e/tools/shared.d.ts +2 -0
  102. package/dist-sdk/server/src/tools/packs/dnd5e/tools/shared.js +25 -8
  103. package/dist-sdk/server/src/tools/packs/dnd5e/tools/sheet.tools.js +70 -4
  104. package/dist-sdk/server/src/tools/packs/dnd5e/tools/world.tools.js +27 -0
  105. package/dist-sdk/server/src/tools/packs/index.d.ts +1 -2
  106. package/dist-sdk/server/src/tools/packs/index.js +5 -11
  107. package/dist-sdk/shared/types/app.types.d.ts +81 -13
  108. package/docs/assets/hierarchy.js +1 -1
  109. package/docs/assets/highlight.css +15 -1
  110. package/docs/assets/icons.js +1 -1
  111. package/docs/assets/icons.svg +1 -1
  112. package/docs/assets/main.js +4 -4
  113. package/docs/assets/navigation.js +1 -1
  114. package/docs/assets/search.js +1 -1
  115. package/docs/assets/style.css +18 -3
  116. package/docs/classes/Agent.html +702 -37
  117. package/docs/classes/Briyah.html +250 -33
  118. package/docs/classes/BriyahConfigService.html +117 -10
  119. package/docs/classes/NativeToolRegistry.html +156 -11
  120. package/docs/classes/PackInstantiationService.html +157 -0
  121. package/docs/classes/PackService.html +247 -0
  122. package/docs/classes/Room.html +1190 -77
  123. package/docs/classes/RoomMessage.html +260 -29
  124. package/docs/enums/MessageAction.html +123 -3
  125. package/docs/functions/availableToolPacks.html +41 -2
  126. package/docs/functions/dnd5eTools.html +42 -3
  127. package/docs/functions/installToolPacks.html +48 -0
  128. package/docs/functions/registerToolPacks.html +54 -6
  129. package/docs/hierarchy.html +42 -1
  130. package/docs/index.html +301 -54
  131. package/docs/interfaces/AgentCreationOptions.html +110 -11
  132. package/docs/interfaces/AgentInfo.html +188 -3
  133. package/docs/interfaces/AgentMessagesResponse.html +71 -2
  134. package/docs/interfaces/AppService.html +2806 -474
  135. package/docs/interfaces/Artifact.html +81 -4
  136. package/docs/interfaces/ArtifactMetadata.html +104 -3
  137. package/docs/interfaces/ArtifactWriteOptions.html +75 -6
  138. package/docs/interfaces/AttachDocumentResponse.html +61 -2
  139. package/docs/interfaces/BriyahConfigOptions.html +107 -10
  140. package/docs/interfaces/ChapterInfo.html +61 -2
  141. package/docs/interfaces/Character.html +81 -2
  142. package/docs/interfaces/CreateAgentResponse.html +56 -2
  143. package/docs/interfaces/CreateRoomResponse.html +61 -2
  144. package/docs/interfaces/CreateStoryResponse.html +56 -2
  145. package/docs/interfaces/FileList.html +56 -2
  146. package/docs/interfaces/FileMetadata.html +84 -3
  147. package/docs/interfaces/IConfigService.html +76 -3
  148. package/docs/interfaces/InstantiateModels.html +64 -0
  149. package/docs/interfaces/InstantiateRoomResult.html +70 -0
  150. package/docs/interfaces/LoadedPack.html +131 -0
  151. package/docs/interfaces/LoggingOptions.html +86 -7
  152. package/docs/interfaces/Message.html +80 -2
  153. package/docs/interfaces/ModelChoice.html +73 -0
  154. package/docs/interfaces/ModelInfo.html +71 -2
  155. package/docs/interfaces/NativeToolDefinition.html +96 -9
  156. package/docs/interfaces/PackAgentTemplate.html +101 -0
  157. package/docs/interfaces/PackRoomTemplate.html +108 -0
  158. package/docs/interfaces/PackView.html +172 -0
  159. package/docs/interfaces/PreparedPromptResponse.html +61 -2
  160. package/docs/interfaces/ProcessTextResponse.html +81 -2
  161. package/docs/interfaces/PromptFile.html +69 -2
  162. package/docs/interfaces/PromptFileContent.html +75 -2
  163. package/docs/interfaces/PromptFilesResponse.html +56 -2
  164. package/docs/interfaces/PromptFolder.html +79 -2
  165. package/docs/interfaces/PromptFolderDefaults.html +136 -5
  166. package/docs/interfaces/PromptFolderDefaultsResponse.html +78 -4
  167. package/docs/interfaces/PromptFoldersResponse.html +56 -2
  168. package/docs/interfaces/RoomDetails.html +133 -4
  169. package/docs/interfaces/RoomErrorUpdate.html +82 -0
  170. package/docs/interfaces/RoomInfo.html +84 -2
  171. package/docs/interfaces/RoomMessageUpdate.html +106 -2
  172. package/docs/interfaces/RoomMessagesResponse.html +61 -2
  173. package/docs/interfaces/SendMessageResult.html +61 -2
  174. package/docs/interfaces/StoryErrorEvent.html +76 -4
  175. package/docs/interfaces/StoryIdea.html +71 -2
  176. package/docs/interfaces/StoryInfo.html +173 -3
  177. package/docs/interfaces/StoryIntroduceCharacterEvent.html +71 -4
  178. package/docs/interfaces/StoryProgressChapterEvent.html +64 -3
  179. package/docs/interfaces/StoryState.html +99 -6
  180. package/docs/interfaces/StoryStateEvent.html +69 -3
  181. package/docs/interfaces/ToolArtifact.html +81 -4
  182. package/docs/interfaces/ToolCaller.html +75 -6
  183. package/docs/interfaces/ToolDefinition.html +76 -2
  184. package/docs/interfaces/ToolHelpers.html +91 -6
  185. package/docs/interfaces/ToolParameter.html +71 -2
  186. package/docs/interfaces/ToolRoomAccess.html +200 -24
  187. package/docs/interfaces/ToolSummary.html +71 -2
  188. package/docs/interfaces/ToolsResponse.html +66 -2
  189. package/docs/interfaces/Transaction.html +96 -2
  190. package/docs/interfaces/TransactionHistoryResponse.html +61 -2
  191. package/docs/modules.html +53 -1
  192. package/docs/types/PackOrigin.html +34 -0
  193. package/docs/types/PromptScope.html +34 -1
  194. package/docs/types/RoomTurnMode.html +36 -2
  195. package/docs/types/RoomUpdate.html +36 -0
  196. package/docs/types/RosterOverrides.html +42 -0
  197. package/docs/types/ToolContext.html +36 -2
  198. package/docs/types/ToolRunResult.html +34 -1
  199. package/package.json +139 -139
  200. package/src/tools/packs/dnd5e/README.md +186 -27
  201. package/dist-sdk/server/src/library/library.service.d.ts +0 -14
  202. package/dist-sdk/server/src/library/library.service.js +0 -165
  203. package/docs/functions/enabledToolPacks.html +0 -2
  204. /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/campaign_designer-setting.md +0 -0
  205. /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/character_creator-basics.md +0 -0
  206. /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-barbarian.md +0 -0
  207. /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-bard.md +0 -0
  208. /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-cleric.md +0 -0
  209. /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-druid.md +0 -0
  210. /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-fighter.md +0 -0
  211. /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-monk.md +0 -0
  212. /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-paladin.md +0 -0
  213. /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-ranger.md +0 -0
  214. /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-rogue.md +0 -0
  215. /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-sorcerer.md +0 -0
  216. /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-warlock.md +0 -0
  217. /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-wizard.md +0 -0
  218. /package/data/{common/prompts/campaign_designer → packs/dnd5e/prompts/battle_master}/system_instruction.prompt +0 -0
  219. /package/data/{common → packs/dnd5e}/prompts/campaign_designer/defaults_config.json +0 -0
  220. /package/data/{common → packs/dnd5e}/prompts/campaign_designer/perceive.json +0 -0
  221. /package/data/{common → packs/dnd5e}/prompts/campaign_designer/perceive.prompt +0 -0
  222. /package/data/{common/prompts/character_creator → packs/dnd5e/prompts/campaign_designer}/system_instruction.prompt +0 -0
  223. /package/data/{common → packs/dnd5e}/prompts/character_creator/perceive.json +0 -0
  224. /package/data/{common/prompts/dnd_player → packs/dnd5e/prompts/character_creator}/system_instruction.prompt +0 -0
  225. /package/data/{common → packs/dnd5e}/prompts/dnd_player/defaults_config.json +0 -0
  226. /package/data/{common → packs/dnd5e}/prompts/dnd_player/perceive.json +0 -0
  227. /package/data/{common/prompts/dnd_room_moderator → packs/dnd5e/prompts/dnd_player}/system_instruction.prompt +0 -0
  228. /package/data/{common → packs/dnd5e}/prompts/dnd_room_moderator/defaults_config.json +0 -0
  229. /package/data/{common/prompts/dungeon_master → packs/dnd5e/prompts/dnd_room_moderator}/system_instruction.prompt +0 -0
  230. /package/data/{common → packs/dnd5e}/prompts/dungeon_master/compact_agent.prompt +0 -0
  231. /package/data/{common → packs/dnd5e}/prompts/dungeon_master/perceive.json +0 -0
@@ -1,4 +1,25 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Agent | Briyah SDK - v1.5.0</title><meta name="description" content="Documentation for Briyah SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Briyah SDK - v1.5.0</a><div id="tsd-toolbar-links"><a href="https://github.com/your-org/briyah">GitHub</a><a href="https://www.npmjs.com/package/briyah">npm</a></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">Agent</a></li></ul><h1>Class Agent</h1></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L15">server/src/ai/agent.ts:15</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="#agentname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>agent<wbr/>Name</span></a>
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Agent | Briyah SDK - v2.0.1</title><meta name="description" content="Documentation for Briyah SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar">
2
+ <div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Briyah SDK - v2.0.1</a>
3
+ <div id="tsd-toolbar-links"><a href="https://github.com/your-org/briyah">GitHub</a><a href="https://www.npmjs.com/package/briyah">npm</a></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/>
4
+ <ul role="listbox" id="tsd-search-results"></ul>
5
+ <div id="tsd-search-status" aria-live="polite" aria-atomic="true">
6
+ <div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header>
7
+ <div class="container container-main">
8
+ <div class="col-content">
9
+ <div class="tsd-page-title">
10
+ <ul class="tsd-breadcrumb" aria-label="Breadcrumb">
11
+ <li><a href="" aria-current="page">Agent</a></li></ul>
12
+ <h1>Class Agent</h1></div><aside class="tsd-sources">
13
+ <ul>
14
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L15">server/src/ai/agent.ts:15</a></li></ul></aside>
15
+ <section class="tsd-panel-group tsd-index-group">
16
+ <section class="tsd-panel tsd-index-panel">
17
+ <details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
18
+ <h5 class="tsd-index-heading uppercase">Index</h5></summary>
19
+ <div class="tsd-accordion-details">
20
+ <section class="tsd-index-section">
21
+ <h3 class="tsd-index-heading tsd-anchor-link" id="properties">Properties<a href="#properties" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
22
+ <div class="tsd-index-list"><a href="#agentname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>agent<wbr/>Name</span></a>
2
23
  <a href="#agentnickname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>agent<wbr/>Nickname</span></a>
3
24
  <a href="#allowsearch" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>allow<wbr/>Search</span></a>
4
25
  <a href="#assistant" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>assistant?</span></a>
@@ -9,8 +30,10 @@
9
30
  <a href="#description" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>description</span></a>
10
31
  <a href="#disablebalancecheck" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>disable<wbr/>Balance<wbr/>Check</span></a>
11
32
  <a href="#disablemarkup" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>disable<wbr/>Markup</span></a>
33
+ <a href="#enabledpacks" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>enabled<wbr/>Packs?</span></a>
12
34
  <a href="#fullcontextfiles" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>full<wbr/>Context<wbr/>Files</span></a>
13
35
  <a href="#history" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>history</span></a>
36
+ <a href="#historypin" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>history<wbr/>Pin?</span></a>
14
37
  <a href="#id" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>id?</span></a>
15
38
  <a href="#iscontrolledbyhuman" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>is<wbr/>Controlled<wbr/>By<wbr/>Human</span></a>
16
39
  <a href="#ispublished" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>is<wbr/>Published</span></a>
@@ -20,6 +43,8 @@
20
43
  <a href="#modelname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>model<wbr/>Name</span></a>
21
44
  <a href="#openai" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>openai?</span></a>
22
45
  <a href="#ownerroomid" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>owner<wbr/>Room<wbr/>Id?</span></a>
46
+ <a href="#pack" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>pack?</span></a>
47
+ <a href="#packagentkey" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>pack<wbr/>Agent<wbr/>Key?</span></a>
23
48
  <a href="#privatecontext" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>private<wbr/>Context</span></a>
24
49
  <a href="#promptcachettl" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>prompt<wbr/>Cache<wbr/>TTL</span></a>
25
50
  <a href="#promptfolder" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>prompt<wbr/>Folder</span></a>
@@ -36,7 +61,10 @@
36
61
  <a href="#totaloutputtokens" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>total<wbr/>Output<wbr/>Tokens</span></a>
37
62
  <a href="#usemoderator" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Moderator</span></a>
38
63
  <a href="#vectorstore" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>vector<wbr/>Store?</span></a>
39
- </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="#addtoconversationhistory" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>To<wbr/>Conversation<wbr/>History</span></a>
64
+ </div></section>
65
+ <section class="tsd-index-section">
66
+ <h3 class="tsd-index-heading tsd-anchor-link" id="methods">Methods<a href="#methods" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
67
+ <div class="tsd-index-list"><a href="#addtoconversationhistory" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>To<wbr/>Conversation<wbr/>History</span></a>
40
68
  <a href="#attachartifact" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>attach<wbr/>Artifact</span></a>
41
69
  <a href="#attachdocument" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>attach<wbr/>Document</span></a>
42
70
  <a href="#canrespond" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>can<wbr/>Respond</span></a>
@@ -54,6 +82,7 @@
54
82
  <a href="#instructedprompt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>instructed<wbr/>Prompt</span></a>
55
83
  <a href="#needscompaction" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>needs<wbr/>Compaction</span></a>
56
84
  <a href="#notifystatechange" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>notify<wbr/>State<wbr/>Change</span></a>
85
+ <a href="#pinhistory" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>pin<wbr/>History</span></a>
57
86
  <a href="#preparedprompt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>prepared<wbr/>Prompt</span></a>
58
87
  <a href="#save" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>save</span></a>
59
88
  <a href="#setonstatechange" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>On<wbr/>State<wbr/>Change</span></a>
@@ -62,13 +91,247 @@
62
91
  <a href="#withsmallmodel" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>with<wbr/>Small<wbr/>Model</span></a>
63
92
  <a href="#compactionthresholdchars" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compaction<wbr/>Threshold<wbr/>Chars</span></a>
64
93
  <a href="#generatenickname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>generate<wbr/>Nickname</span></a>
65
- </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="agentname"><span>agent<wbr/>Name</span><a href="#agentname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">agentName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L17">server/src/ai/agent.ts:17</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="agentnickname"><span>agent<wbr/>Nickname</span><a href="#agentnickname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">agentNickname</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L18">server/src/ai/agent.ts:18</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="allowsearch"><span>allow<wbr/>Search</span><a href="#allowsearch" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">allowSearch</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L79">server/src/ai/agent.ts:79</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="assistant"><code class="tsd-tag">Optional</code><span>assistant</span><a href="#assistant" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">assistant</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Assistant</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L46">server/src/ai/agent.ts:46</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="attachedartifacts"><span>attached<wbr/>Artifacts</span><a href="#attachedartifacts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">attachedArtifacts</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L82">server/src/ai/agent.ts:82</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="attachedfiles"><span>attached<wbr/>Files</span><a href="#attachedfiles" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">attachedFiles</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/FileMetadata.html" class="tsd-signature-type tsd-kind-interface">FileMetadata</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L81">server/src/ai/agent.ts:81</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="begininstruction"><span>begin<wbr/>Instruction</span><a href="#begininstruction" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">beginInstruction</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#39;&#39;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L84">server/src/ai/agent.ts:84</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="createdat"><span>created<wbr/>At</span><a href="#createdat" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">createdAt</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L32">server/src/ai/agent.ts:32</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="description"><span>description</span><a href="#description" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">description</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L62">server/src/ai/agent.ts:62</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="disablebalancecheck"><span>disable<wbr/>Balance<wbr/>Check</span><a href="#disablebalancecheck" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">disableBalanceCheck</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L39">server/src/ai/agent.ts:39</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="disablemarkup"><span>disable<wbr/>Markup</span><a href="#disablemarkup" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">disableMarkup</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L38">server/src/ai/agent.ts:38</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="fullcontextfiles"><span>full<wbr/>Context<wbr/>Files</span><a href="#fullcontextfiles" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">fullContextFiles</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L20">server/src/ai/agent.ts:20</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="history"><span>history</span><a href="#history" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">history</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L19">server/src/ai/agent.ts:19</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="id"><code class="tsd-tag">Optional</code><span>id</span><a href="#id" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">id</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L16">server/src/ai/agent.ts:16</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="iscontrolledbyhuman"><span>is<wbr/>Controlled<wbr/>By<wbr/>Human</span><a href="#iscontrolledbyhuman" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">isControlledByHuman</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L83">server/src/ai/agent.ts:83</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="ispublished"><span>is<wbr/>Published</span><a href="#ispublished" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">isPublished</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L40">server/src/ai/agent.ts:40</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="markuprate"><span>markup<wbr/>Rate</span><a href="#markuprate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">markupRate</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 2</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L37">server/src/ai/agent.ts:37</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="maxhistorymessages"><code class="tsd-tag">Optional</code><span>max<wbr/>History<wbr/>Messages</span><a href="#maxhistorymessages" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">maxHistoryMessages</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L74">server/src/ai/agent.ts:74</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="maxoutputtokens"><span>max<wbr/>Output<wbr/>Tokens</span><a href="#maxoutputtokens" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">maxOutputTokens</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L80">server/src/ai/agent.ts:80</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="modelname"><span>model<wbr/>Name</span><a href="#modelname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">modelName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L75">server/src/ai/agent.ts:75</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="openai"><code class="tsd-tag">Optional</code><span>openai</span><a href="#openai" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">openai</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">OpenAI</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L45">server/src/ai/agent.ts:45</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="ownerroomid"><code class="tsd-tag">Optional</code><span>owner<wbr/>Room<wbr/>Id</span><a href="#ownerroomid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">ownerRoomId</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L42">server/src/ai/agent.ts:42</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="privatecontext"><span>private<wbr/>Context</span><a href="#privatecontext" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">privateContext</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#39;&#39;</span></div><div class="tsd-comment tsd-typography"><p>Private, agent-specific context that is visible only to this agent — never to
94
+ </div></section></div></details></section></section>
95
+ <details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
96
+ <h2 class="tsd-anchor-link" id="properties-1">Properties<a href="#properties-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2></summary>
97
+ <section>
98
+ <section class="tsd-panel tsd-member">
99
+ <h3 class="tsd-anchor-link" id="agentname"><span>agent<wbr/>Name</span><a href="#agentname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
100
+ <div class="tsd-signature"><span class="tsd-kind-property">agentName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
101
+ <ul>
102
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L17">server/src/ai/agent.ts:17</a></li></ul></aside></section>
103
+ <section class="tsd-panel tsd-member">
104
+ <h3 class="tsd-anchor-link" id="agentnickname"><span>agent<wbr/>Nickname</span><a href="#agentnickname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
105
+ <div class="tsd-signature"><span class="tsd-kind-property">agentNickname</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
106
+ <ul>
107
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L18">server/src/ai/agent.ts:18</a></li></ul></aside></section>
108
+ <section class="tsd-panel tsd-member">
109
+ <h3 class="tsd-anchor-link" id="allowsearch"><span>allow<wbr/>Search</span><a href="#allowsearch" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
110
+ <div class="tsd-signature"><span class="tsd-kind-property">allowSearch</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources">
111
+ <ul>
112
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L113">server/src/ai/agent.ts:113</a></li></ul></aside></section>
113
+ <section class="tsd-panel tsd-member">
114
+ <h3 class="tsd-anchor-link" id="assistant"><code class="tsd-tag">Optional</code><span>assistant</span><a href="#assistant" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
115
+ <div class="tsd-signature"><span class="tsd-kind-property">assistant</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Assistant</span></div><aside class="tsd-sources">
116
+ <ul>
117
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L50">server/src/ai/agent.ts:50</a></li></ul></aside></section>
118
+ <section class="tsd-panel tsd-member">
119
+ <h3 class="tsd-anchor-link" id="attachedartifacts"><span>attached<wbr/>Artifacts</span><a href="#attachedartifacts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
120
+ <div class="tsd-signature"><span class="tsd-kind-property">attachedArtifacts</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources">
121
+ <ul>
122
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L116">server/src/ai/agent.ts:116</a></li></ul></aside></section>
123
+ <section class="tsd-panel tsd-member">
124
+ <h3 class="tsd-anchor-link" id="attachedfiles"><span>attached<wbr/>Files</span><a href="#attachedfiles" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
125
+ <div class="tsd-signature"><span class="tsd-kind-property">attachedFiles</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/FileMetadata.html" class="tsd-signature-type tsd-kind-interface">FileMetadata</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources">
126
+ <ul>
127
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L115">server/src/ai/agent.ts:115</a></li></ul></aside></section>
128
+ <section class="tsd-panel tsd-member">
129
+ <h3 class="tsd-anchor-link" id="begininstruction"><span>begin<wbr/>Instruction</span><a href="#begininstruction" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
130
+ <div class="tsd-signature"><span class="tsd-kind-property">beginInstruction</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#39;&#39;</span></div><aside class="tsd-sources">
131
+ <ul>
132
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L118">server/src/ai/agent.ts:118</a></li></ul></aside></section>
133
+ <section class="tsd-panel tsd-member">
134
+ <h3 class="tsd-anchor-link" id="createdat"><span>created<wbr/>At</span><a href="#createdat" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
135
+ <div class="tsd-signature"><span class="tsd-kind-property">createdAt</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span></div><aside class="tsd-sources">
136
+ <ul>
137
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L32">server/src/ai/agent.ts:32</a></li></ul></aside></section>
138
+ <section class="tsd-panel tsd-member">
139
+ <h3 class="tsd-anchor-link" id="description"><span>description</span><a href="#description" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
140
+ <div class="tsd-signature"><span class="tsd-kind-property">description</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
141
+ <ul>
142
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L66">server/src/ai/agent.ts:66</a></li></ul></aside></section>
143
+ <section class="tsd-panel tsd-member">
144
+ <h3 class="tsd-anchor-link" id="disablebalancecheck"><span>disable<wbr/>Balance<wbr/>Check</span><a href="#disablebalancecheck" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
145
+ <div class="tsd-signature"><span class="tsd-kind-property">disableBalanceCheck</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources">
146
+ <ul>
147
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L39">server/src/ai/agent.ts:39</a></li></ul></aside></section>
148
+ <section class="tsd-panel tsd-member">
149
+ <h3 class="tsd-anchor-link" id="disablemarkup"><span>disable<wbr/>Markup</span><a href="#disablemarkup" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
150
+ <div class="tsd-signature"><span class="tsd-kind-property">disableMarkup</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources">
151
+ <ul>
152
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L38">server/src/ai/agent.ts:38</a></li></ul></aside></section>
153
+ <section class="tsd-panel tsd-member">
154
+ <h3 class="tsd-anchor-link" id="enabledpacks"><code class="tsd-tag">Optional</code><span>enabled<wbr/>Packs</span><a href="#enabledpacks" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
155
+ <div class="tsd-signature"><span class="tsd-kind-property">enabledPacks</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-keyword">readonly</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div>
156
+ <div class="tsd-comment tsd-typography"><p>The packs the owning user has enabled, consulted only when
157
+ <a href="#promptfolder" class="tsd-kind-property">promptFolder</a> is a bare name — a pack-qualified one always resolves.</p>
158
+ <p>A thunk rather than an array because an agent outlives a toggle: the user
159
+ can enable a pack while this instance is cached, and a snapshot taken at
160
+ construction would need invalidating across every cached agent, room and
161
+ service. Reading through the thunk means there is nothing to invalidate.</p>
162
+ <p>Absent means &quot;scan no packs&quot;, which is exactly the behaviour from before
163
+ packs existed. Deliberately not in <code>AgentConfig</code> — it belongs to the user,
164
+ not the agent, and persisting it would freeze a copy of the enabled set.</p>
165
+ </div><aside class="tsd-sources">
166
+ <ul>
167
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L90">server/src/ai/agent.ts:90</a></li></ul></aside></section>
168
+ <section class="tsd-panel tsd-member">
169
+ <h3 class="tsd-anchor-link" id="fullcontextfiles"><span>full<wbr/>Context<wbr/>Files</span><a href="#fullcontextfiles" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
170
+ <div class="tsd-signature"><span class="tsd-kind-property">fullContextFiles</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></div><aside class="tsd-sources">
171
+ <ul>
172
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L20">server/src/ai/agent.ts:20</a></li></ul></aside></section>
173
+ <section class="tsd-panel tsd-member">
174
+ <h3 class="tsd-anchor-link" id="history"><span>history</span><a href="#history" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
175
+ <div class="tsd-signature"><span class="tsd-kind-property">history</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources">
176
+ <ul>
177
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L19">server/src/ai/agent.ts:19</a></li></ul></aside></section>
178
+ <section class="tsd-panel tsd-member">
179
+ <h3 class="tsd-anchor-link" id="historypin"><code class="tsd-tag">Optional</code><span>history<wbr/>Pin</span><a href="#historypin" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
180
+ <div class="tsd-signature"><span class="tsd-kind-property">historyPin</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div>
181
+ <div class="tsd-comment tsd-typography"><p>Index into <a href="#history" class="tsd-kind-property">history</a> below which the rolling window may trim, and at or
182
+ above which it may not. Protects a task that must survive intact from an agent
183
+ whose window is deliberately short.</p>
184
+ <p><strong>Deliberately not in <code>AgentConfig</code> and never saved.</strong> <code>maxHistoryMessages</code> is
185
+ operator configuration; this is transient state about the task in flight, and
186
+ persisting it would leave an agent looking as though its window had been
187
+ changed by hand. A restart clears it, costing at most the protection on one
188
+ task in progress.</p>
189
+ <p>It also needs no clearing. Re-pinning ends the previous pin, so an abandoned
190
+ task is reclaimed the next time one starts, and the worst a stale pin can do is
191
+ keep more history than intended — never drop any.</p>
192
+ </div><aside class="tsd-sources">
193
+ <ul>
194
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L108">server/src/ai/agent.ts:108</a></li></ul></aside></section>
195
+ <section class="tsd-panel tsd-member">
196
+ <h3 class="tsd-anchor-link" id="id"><code class="tsd-tag">Optional</code><span>id</span><a href="#id" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
197
+ <div class="tsd-signature"><span class="tsd-kind-property">id</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
198
+ <ul>
199
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L16">server/src/ai/agent.ts:16</a></li></ul></aside></section>
200
+ <section class="tsd-panel tsd-member">
201
+ <h3 class="tsd-anchor-link" id="iscontrolledbyhuman"><span>is<wbr/>Controlled<wbr/>By<wbr/>Human</span><a href="#iscontrolledbyhuman" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
202
+ <div class="tsd-signature"><span class="tsd-kind-property">isControlledByHuman</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources">
203
+ <ul>
204
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L117">server/src/ai/agent.ts:117</a></li></ul></aside></section>
205
+ <section class="tsd-panel tsd-member">
206
+ <h3 class="tsd-anchor-link" id="ispublished"><span>is<wbr/>Published</span><a href="#ispublished" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
207
+ <div class="tsd-signature"><span class="tsd-kind-property">isPublished</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources">
208
+ <ul>
209
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L40">server/src/ai/agent.ts:40</a></li></ul></aside></section>
210
+ <section class="tsd-panel tsd-member">
211
+ <h3 class="tsd-anchor-link" id="markuprate"><span>markup<wbr/>Rate</span><a href="#markuprate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
212
+ <div class="tsd-signature"><span class="tsd-kind-property">markupRate</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 2</span></div><aside class="tsd-sources">
213
+ <ul>
214
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L37">server/src/ai/agent.ts:37</a></li></ul></aside></section>
215
+ <section class="tsd-panel tsd-member">
216
+ <h3 class="tsd-anchor-link" id="maxhistorymessages"><code class="tsd-tag">Optional</code><span>max<wbr/>History<wbr/>Messages</span><a href="#maxhistorymessages" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
217
+ <div class="tsd-signature"><span class="tsd-kind-property">maxHistoryMessages</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
218
+ <ul>
219
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L92">server/src/ai/agent.ts:92</a></li></ul></aside></section>
220
+ <section class="tsd-panel tsd-member">
221
+ <h3 class="tsd-anchor-link" id="maxoutputtokens"><span>max<wbr/>Output<wbr/>Tokens</span><a href="#maxoutputtokens" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
222
+ <div class="tsd-signature"><span class="tsd-kind-property">maxOutputTokens</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources">
223
+ <ul>
224
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L114">server/src/ai/agent.ts:114</a></li></ul></aside></section>
225
+ <section class="tsd-panel tsd-member">
226
+ <h3 class="tsd-anchor-link" id="modelname"><span>model<wbr/>Name</span><a href="#modelname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
227
+ <div class="tsd-signature"><span class="tsd-kind-property">modelName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
228
+ <ul>
229
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L109">server/src/ai/agent.ts:109</a></li></ul></aside></section>
230
+ <section class="tsd-panel tsd-member">
231
+ <h3 class="tsd-anchor-link" id="openai"><code class="tsd-tag">Optional</code><span>openai</span><a href="#openai" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
232
+ <div class="tsd-signature"><span class="tsd-kind-property">openai</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">OpenAI</span></div><aside class="tsd-sources">
233
+ <ul>
234
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L49">server/src/ai/agent.ts:49</a></li></ul></aside></section>
235
+ <section class="tsd-panel tsd-member">
236
+ <h3 class="tsd-anchor-link" id="ownerroomid"><code class="tsd-tag">Optional</code><span>owner<wbr/>Room<wbr/>Id</span><a href="#ownerroomid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
237
+ <div class="tsd-signature"><span class="tsd-kind-property">ownerRoomId</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
238
+ <ul>
239
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L42">server/src/ai/agent.ts:42</a></li></ul></aside></section>
240
+ <section class="tsd-panel tsd-member">
241
+ <h3 class="tsd-anchor-link" id="pack"><code class="tsd-tag">Optional</code><span>pack</span><a href="#pack" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
242
+ <div class="tsd-signature"><span class="tsd-kind-property">pack</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
243
+ <div class="tsd-comment tsd-typography"><p>The pack this agent is filed under. See AgentConfig.pack.</p>
244
+ </div><aside class="tsd-sources">
245
+ <ul>
246
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L44">server/src/ai/agent.ts:44</a></li></ul></aside></section>
247
+ <section class="tsd-panel tsd-member">
248
+ <h3 class="tsd-anchor-link" id="packagentkey"><code class="tsd-tag">Optional</code><span>pack<wbr/>Agent<wbr/>Key</span><a href="#packagentkey" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
249
+ <div class="tsd-signature"><span class="tsd-kind-property">packAgentKey</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div>
250
+ <div class="tsd-comment tsd-typography"><p>The pack template's key, when this agent came from one.</p>
251
+ </div><aside class="tsd-sources">
252
+ <ul>
253
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L46">server/src/ai/agent.ts:46</a></li></ul></aside></section>
254
+ <section class="tsd-panel tsd-member">
255
+ <h3 class="tsd-anchor-link" id="privatecontext"><span>private<wbr/>Context</span><a href="#privatecontext" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
256
+ <div class="tsd-signature"><span class="tsd-kind-property">privateContext</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#39;&#39;</span></div>
257
+ <div class="tsd-comment tsd-typography"><p>Private, agent-specific context that is visible only to this agent — never to
66
258
  other agents. Injected into the agent's transient (uncached) prompt message
67
259
  rather than the cached system instructions, so it can change frequently without
68
260
  invalidating the prompt cache. In stories this holds the character's inventory
69
261
  and conditions; contrast with <a href="#description" class="tsd-kind-property">description</a>, which is the public
70
262
  appearance every other agent can see.</p>
71
- </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L71">server/src/ai/agent.ts:71</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="promptcachettl"><span>prompt<wbr/>Cache<wbr/>TTL</span><a href="#promptcachettl" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">promptCacheTTL</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L103">server/src/ai/agent.ts:103</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="promptfolder"><span>prompt<wbr/>Folder</span><a href="#promptfolder" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">promptFolder</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L72">server/src/ai/agent.ts:72</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="reasoningeffort"><span>reasoning<wbr/>Effort</span><a href="#reasoningeffort" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">reasoningEffort</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;low&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;medium&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;high&quot;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L78">server/src/ai/agent.ts:78</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="servicename"><span>service<wbr/>Name</span><a href="#servicename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">serviceName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L77">server/src/ai/agent.ts:77</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="smallmodelname"><code class="tsd-tag">Optional</code><span>small<wbr/>Model<wbr/>Name</span><a href="#smallmodelname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">smallModelName</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L76">server/src/ai/agent.ts:76</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="storagedir"><span>storage<wbr/>Dir</span><a href="#storagedir" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">storageDir</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L109">server/src/ai/agent.ts:109</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="systeminstruction"><span>system<wbr/>Instruction</span><a href="#systeminstruction" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">systemInstruction</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L73">server/src/ai/agent.ts:73</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="templateagentid"><code class="tsd-tag">Optional</code><span>template<wbr/>Agent<wbr/>Id</span><a href="#templateagentid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">templateAgentId</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L41">server/src/ai/agent.ts:41</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="toolnames"><span>tool<wbr/>Names</span><a href="#toolnames" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">toolNames</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L85">server/src/ai/agent.ts:85</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="totalcost"><span>total<wbr/>Cost</span><a href="#totalcost" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">totalCost</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L35">server/src/ai/agent.ts:35</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="totalinputtokens"><span>total<wbr/>Input<wbr/>Tokens</span><a href="#totalinputtokens" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">totalInputTokens</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L33">server/src/ai/agent.ts:33</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="totalmarkup"><span>total<wbr/>Markup</span><a href="#totalmarkup" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">totalMarkup</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L36">server/src/ai/agent.ts:36</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="totaloutputtokens"><span>total<wbr/>Output<wbr/>Tokens</span><a href="#totaloutputtokens" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">totalOutputTokens</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L34">server/src/ai/agent.ts:34</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="usemoderator"><span>use<wbr/>Moderator</span><a href="#usemoderator" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useModerator</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><div class="tsd-comment tsd-typography"><p>This agent intends to send MODERATE messages, so its room needs a moderator
263
+ </div><aside class="tsd-sources">
264
+ <ul>
265
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L75">server/src/ai/agent.ts:75</a></li></ul></aside></section>
266
+ <section class="tsd-panel tsd-member">
267
+ <h3 class="tsd-anchor-link" id="promptcachettl"><span>prompt<wbr/>Cache<wbr/>TTL</span><a href="#promptcachettl" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
268
+ <div class="tsd-signature"><span class="tsd-kind-property">promptCacheTTL</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources">
269
+ <ul>
270
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L137">server/src/ai/agent.ts:137</a></li></ul></aside></section>
271
+ <section class="tsd-panel tsd-member">
272
+ <h3 class="tsd-anchor-link" id="promptfolder"><span>prompt<wbr/>Folder</span><a href="#promptfolder" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
273
+ <div class="tsd-signature"><span class="tsd-kind-property">promptFolder</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
274
+ <ul>
275
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L76">server/src/ai/agent.ts:76</a></li></ul></aside></section>
276
+ <section class="tsd-panel tsd-member">
277
+ <h3 class="tsd-anchor-link" id="reasoningeffort"><span>reasoning<wbr/>Effort</span><a href="#reasoningeffort" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
278
+ <div class="tsd-signature"><span class="tsd-kind-property">reasoningEffort</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;low&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;medium&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;high&quot;</span></div><aside class="tsd-sources">
279
+ <ul>
280
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L112">server/src/ai/agent.ts:112</a></li></ul></aside></section>
281
+ <section class="tsd-panel tsd-member">
282
+ <h3 class="tsd-anchor-link" id="servicename"><span>service<wbr/>Name</span><a href="#servicename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
283
+ <div class="tsd-signature"><span class="tsd-kind-property">serviceName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
284
+ <ul>
285
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L111">server/src/ai/agent.ts:111</a></li></ul></aside></section>
286
+ <section class="tsd-panel tsd-member">
287
+ <h3 class="tsd-anchor-link" id="smallmodelname"><code class="tsd-tag">Optional</code><span>small<wbr/>Model<wbr/>Name</span><a href="#smallmodelname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
288
+ <div class="tsd-signature"><span class="tsd-kind-property">smallModelName</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
289
+ <ul>
290
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L110">server/src/ai/agent.ts:110</a></li></ul></aside></section>
291
+ <section class="tsd-panel tsd-member">
292
+ <h3 class="tsd-anchor-link" id="storagedir"><span>storage<wbr/>Dir</span><a href="#storagedir" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
293
+ <div class="tsd-signature"><span class="tsd-kind-property">storageDir</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
294
+ <ul>
295
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L143">server/src/ai/agent.ts:143</a></li></ul></aside></section>
296
+ <section class="tsd-panel tsd-member">
297
+ <h3 class="tsd-anchor-link" id="systeminstruction"><span>system<wbr/>Instruction</span><a href="#systeminstruction" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
298
+ <div class="tsd-signature"><span class="tsd-kind-property">systemInstruction</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
299
+ <ul>
300
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L91">server/src/ai/agent.ts:91</a></li></ul></aside></section>
301
+ <section class="tsd-panel tsd-member">
302
+ <h3 class="tsd-anchor-link" id="templateagentid"><code class="tsd-tag">Optional</code><span>template<wbr/>Agent<wbr/>Id</span><a href="#templateagentid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
303
+ <div class="tsd-signature"><span class="tsd-kind-property">templateAgentId</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
304
+ <ul>
305
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L41">server/src/ai/agent.ts:41</a></li></ul></aside></section>
306
+ <section class="tsd-panel tsd-member">
307
+ <h3 class="tsd-anchor-link" id="toolnames"><span>tool<wbr/>Names</span><a href="#toolnames" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
308
+ <div class="tsd-signature"><span class="tsd-kind-property">toolNames</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources">
309
+ <ul>
310
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L119">server/src/ai/agent.ts:119</a></li></ul></aside></section>
311
+ <section class="tsd-panel tsd-member">
312
+ <h3 class="tsd-anchor-link" id="totalcost"><span>total<wbr/>Cost</span><a href="#totalcost" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
313
+ <div class="tsd-signature"><span class="tsd-kind-property">totalCost</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources">
314
+ <ul>
315
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L35">server/src/ai/agent.ts:35</a></li></ul></aside></section>
316
+ <section class="tsd-panel tsd-member">
317
+ <h3 class="tsd-anchor-link" id="totalinputtokens"><span>total<wbr/>Input<wbr/>Tokens</span><a href="#totalinputtokens" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
318
+ <div class="tsd-signature"><span class="tsd-kind-property">totalInputTokens</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources">
319
+ <ul>
320
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L33">server/src/ai/agent.ts:33</a></li></ul></aside></section>
321
+ <section class="tsd-panel tsd-member">
322
+ <h3 class="tsd-anchor-link" id="totalmarkup"><span>total<wbr/>Markup</span><a href="#totalmarkup" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
323
+ <div class="tsd-signature"><span class="tsd-kind-property">totalMarkup</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources">
324
+ <ul>
325
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L36">server/src/ai/agent.ts:36</a></li></ul></aside></section>
326
+ <section class="tsd-panel tsd-member">
327
+ <h3 class="tsd-anchor-link" id="totaloutputtokens"><span>total<wbr/>Output<wbr/>Tokens</span><a href="#totaloutputtokens" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
328
+ <div class="tsd-signature"><span class="tsd-kind-property">totalOutputTokens</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources">
329
+ <ul>
330
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L34">server/src/ai/agent.ts:34</a></li></ul></aside></section>
331
+ <section class="tsd-panel tsd-member">
332
+ <h3 class="tsd-anchor-link" id="usemoderator"><span>use<wbr/>Moderator</span><a href="#usemoderator" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
333
+ <div class="tsd-signature"><span class="tsd-kind-property">useModerator</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div>
334
+ <div class="tsd-comment tsd-typography"><p>This agent intends to send MODERATE messages, so its room needs a moderator
72
335
  to route them.</p>
73
336
  <p>For a human-controlled agent it is also what removes the action and target
74
337
  pickers from the room's composer: the player types, the room forces the
@@ -78,59 +341,461 @@ by its own choice — either its perceive schema offers <code>moderate</code> as
78
341
  defer the routing decision, or it has no schema at all and answers in prose,
79
342
  which Room.parseAgentResponse converts. An agent that names its own targets
80
343
  keeps doing so.</p>
81
- </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L100">server/src/ai/agent.ts:100</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="vectorstore"><code class="tsd-tag">Optional</code><span>vector<wbr/>Store</span><a href="#vectorstore" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">vectorStore</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">VectorStore</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L47">server/src/ai/agent.ts:47</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Methods</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="addtoconversationhistory"><span>add<wbr/>To<wbr/>Conversation<wbr/>History</span><a href="#addtoconversationhistory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="addtoconversationhistory-1"><span class="tsd-kind-call-signature">addToConversationHistory</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">fromSelf</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#addtoconversationhistory-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">message</span>: <span class="tsd-signature-type">any</span></span></li><li><span><span class="tsd-kind-parameter">fromSelf</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L309">server/src/ai/agent.ts:309</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="attachartifact"><span>attach<wbr/>Artifact</span><a href="#attachartifact" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="attachartifact-1"><span class="tsd-kind-call-signature">attachArtifact</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">artifactId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#attachartifact-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Attaches an artifact to the agent</p>
82
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">artifactId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The artifact ID</p>
83
- </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L184">server/src/ai/agent.ts:184</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="attachdocument"><span>attach<wbr/>Document</span><a href="#attachdocument" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="attachdocument-1"><span class="tsd-kind-call-signature">attachDocument</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fileName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">fileData</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><a href="#attachdocument-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fileName</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">fileData</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L176">server/src/ai/agent.ts:176</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="canrespond"><span>can<wbr/>Respond</span><a href="#canrespond" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="canrespond-1"><span class="tsd-kind-call-signature">canRespond</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/Message.html" class="tsd-signature-type tsd-kind-interface">Message</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#canrespond-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">message</span>: <a href="../interfaces/Message.html" class="tsd-signature-type tsd-kind-interface">Message</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L241">server/src/ai/agent.ts:241</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="compact"><span>compact</span><a href="#compact" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="compact-1"><span class="tsd-kind-call-signature">compact</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><br/>    <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">newChars</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">newLength</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">originalChars</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">originalLength</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">success</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">summary</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">&gt;</span><a href="#compact-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Replace this agent's conversation history with a single summary message.
344
+ </div><aside class="tsd-sources">
345
+ <ul>
346
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L134">server/src/ai/agent.ts:134</a></li></ul></aside></section>
347
+ <section class="tsd-panel tsd-member">
348
+ <h3 class="tsd-anchor-link" id="vectorstore"><code class="tsd-tag">Optional</code><span>vector<wbr/>Store</span><a href="#vectorstore" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
349
+ <div class="tsd-signature"><span class="tsd-kind-property">vectorStore</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">VectorStore</span></div><aside class="tsd-sources">
350
+ <ul>
351
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L51">server/src/ai/agent.ts:51</a></li></ul></aside></section></section></details>
352
+ <details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
353
+ <h2 class="tsd-anchor-link" id="methods-1">Methods<a href="#methods-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2></summary>
354
+ <section>
355
+ <section class="tsd-panel tsd-member">
356
+ <h3 class="tsd-anchor-link" id="addtoconversationhistory"><span>add<wbr/>To<wbr/>Conversation<wbr/>History</span><a href="#addtoconversationhistory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
357
+ <ul class="tsd-signatures">
358
+ <li class="">
359
+ <div class="tsd-signature tsd-anchor-link" id="addtoconversationhistory-1"><span class="tsd-kind-call-signature">addToConversationHistory</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">fromSelf</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#addtoconversationhistory-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
360
+ <div class="tsd-description">
361
+ <div class="tsd-parameters">
362
+ <h4 class="tsd-parameters-title">Parameters</h4>
363
+ <ul class="tsd-parameter-list">
364
+ <li><span><span class="tsd-kind-parameter">message</span>: <span class="tsd-signature-type">any</span></span></li>
365
+ <li><span><span class="tsd-kind-parameter">fromSelf</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></span></li></ul></div>
366
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
367
+ <ul>
368
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L343">server/src/ai/agent.ts:343</a></li></ul></aside></div></li></ul></section>
369
+ <section class="tsd-panel tsd-member">
370
+ <h3 class="tsd-anchor-link" id="attachartifact"><span>attach<wbr/>Artifact</span><a href="#attachartifact" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
371
+ <ul class="tsd-signatures">
372
+ <li class="">
373
+ <div class="tsd-signature tsd-anchor-link" id="attachartifact-1"><span class="tsd-kind-call-signature">attachArtifact</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">artifactId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#attachartifact-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
374
+ <div class="tsd-description">
375
+ <div class="tsd-comment tsd-typography"><p>Attaches an artifact to the agent</p>
376
+ </div>
377
+ <div class="tsd-parameters">
378
+ <h4 class="tsd-parameters-title">Parameters</h4>
379
+ <ul class="tsd-parameter-list">
380
+ <li><span><span class="tsd-kind-parameter">artifactId</span>: <span class="tsd-signature-type">string</span></span>
381
+ <div class="tsd-comment tsd-typography"><p>The artifact ID</p>
382
+ </div></li></ul></div>
383
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
384
+ <ul>
385
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L218">server/src/ai/agent.ts:218</a></li></ul></aside></div></li></ul></section>
386
+ <section class="tsd-panel tsd-member">
387
+ <h3 class="tsd-anchor-link" id="attachdocument"><span>attach<wbr/>Document</span><a href="#attachdocument" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
388
+ <ul class="tsd-signatures">
389
+ <li class="">
390
+ <div class="tsd-signature tsd-anchor-link" id="attachdocument-1"><span class="tsd-kind-call-signature">attachDocument</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fileName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">fileData</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><a href="#attachdocument-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
391
+ <div class="tsd-description">
392
+ <div class="tsd-parameters">
393
+ <h4 class="tsd-parameters-title">Parameters</h4>
394
+ <ul class="tsd-parameter-list">
395
+ <li><span><span class="tsd-kind-parameter">fileName</span>: <span class="tsd-signature-type">string</span></span></li>
396
+ <li><span><span class="tsd-kind-parameter">fileData</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div>
397
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
398
+ <ul>
399
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L210">server/src/ai/agent.ts:210</a></li></ul></aside></div></li></ul></section>
400
+ <section class="tsd-panel tsd-member">
401
+ <h3 class="tsd-anchor-link" id="canrespond"><span>can<wbr/>Respond</span><a href="#canrespond" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
402
+ <ul class="tsd-signatures">
403
+ <li class="">
404
+ <div class="tsd-signature tsd-anchor-link" id="canrespond-1"><span class="tsd-kind-call-signature">canRespond</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/Message.html" class="tsd-signature-type tsd-kind-interface">Message</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#canrespond-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
405
+ <div class="tsd-description">
406
+ <div class="tsd-parameters">
407
+ <h4 class="tsd-parameters-title">Parameters</h4>
408
+ <ul class="tsd-parameter-list">
409
+ <li><span><span class="tsd-kind-parameter">message</span>: <a href="../interfaces/Message.html" class="tsd-signature-type tsd-kind-interface">Message</a></span></li></ul></div>
410
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
411
+ <ul>
412
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L275">server/src/ai/agent.ts:275</a></li></ul></aside></div></li></ul></section>
413
+ <section class="tsd-panel tsd-member">
414
+ <h3 class="tsd-anchor-link" id="compact"><span>compact</span><a href="#compact" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
415
+ <ul class="tsd-signatures">
416
+ <li class="">
417
+ <div class="tsd-signature tsd-anchor-link" id="compact-1"><span class="tsd-kind-call-signature">compact</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><br/>    <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">newChars</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">newLength</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">originalChars</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">originalLength</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">success</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">summary</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">&gt;</span><a href="#compact-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
418
+ <div class="tsd-description">
419
+ <div class="tsd-comment tsd-typography"><p>Replace this agent's conversation history with a single summary message.
84
420
  Uses the <code>compact_agent</code> prompt, resolved via the standard lookup order:
85
421
  user/<promptFolder> → user/root → common/<promptFolder> → common/root.
86
422
  On failure, the original history is restored.</p>
87
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><br/>    <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">newChars</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">newLength</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">originalChars</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">originalLength</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">success</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">summary</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L450">server/src/ai/agent.ts:450</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="deleteagent"><span>delete<wbr/>Agent</span><a href="#deleteagent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="deleteagent-1"><span class="tsd-kind-call-signature">deleteAgent</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#deleteagent-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L219">server/src/ai/agent.ts:219</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="detachartifact"><span>detach<wbr/>Artifact</span><a href="#detachartifact" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="detachartifact-1"><span class="tsd-kind-call-signature">detachArtifact</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">artifactId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#detachartifact-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Detaches an artifact from the agent</p>
88
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">artifactId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The artifact ID</p>
89
- </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L194">server/src/ai/agent.ts:194</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="editimage"><span>edit<wbr/>Image</span><a href="#editimage" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="editimage-1"><span class="tsd-kind-call-signature">editImage</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">prompt</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">imageProperties</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">referenceImageArtifactIds</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">artifactId</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">error</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">any</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><a href="#editimage-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">prompt</span>: <span class="tsd-signature-type">string</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">imageProperties</span>: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">referenceImageArtifactIds</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">artifactId</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">error</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">any</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L544">server/src/ai/agent.ts:544</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="finishagent"><span>finish<wbr/>Agent</span><a href="#finishagent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="finishagent-1"><span class="tsd-kind-call-signature">finishAgent</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#finishagent-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L215">server/src/ai/agent.ts:215</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="generateimage"><span>generate<wbr/>Image</span><a href="#generateimage" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="generateimage-1"><span class="tsd-kind-call-signature">generateImage</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">prompt</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">imageProperties</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">artifactId</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">error</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">any</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><a href="#generateimage-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Generates an image from a text prompt.</p>
90
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">prompt</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Text description of the image</p>
91
- </div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">imageProperties</span>: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>Optional provider-specific image options
423
+ </div>
424
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><br/>    <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">newChars</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">newLength</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">originalChars</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">originalLength</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">success</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">summary</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
425
+ <ul>
426
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L528">server/src/ai/agent.ts:528</a></li></ul></aside></div></li></ul></section>
427
+ <section class="tsd-panel tsd-member">
428
+ <h3 class="tsd-anchor-link" id="deleteagent"><span>delete<wbr/>Agent</span><a href="#deleteagent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
429
+ <ul class="tsd-signatures">
430
+ <li class="">
431
+ <div class="tsd-signature tsd-anchor-link" id="deleteagent-1"><span class="tsd-kind-call-signature">deleteAgent</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#deleteagent-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
432
+ <div class="tsd-description">
433
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
434
+ <ul>
435
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L253">server/src/ai/agent.ts:253</a></li></ul></aside></div></li></ul></section>
436
+ <section class="tsd-panel tsd-member">
437
+ <h3 class="tsd-anchor-link" id="detachartifact"><span>detach<wbr/>Artifact</span><a href="#detachartifact" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
438
+ <ul class="tsd-signatures">
439
+ <li class="">
440
+ <div class="tsd-signature tsd-anchor-link" id="detachartifact-1"><span class="tsd-kind-call-signature">detachArtifact</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">artifactId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#detachartifact-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
441
+ <div class="tsd-description">
442
+ <div class="tsd-comment tsd-typography"><p>Detaches an artifact from the agent</p>
443
+ </div>
444
+ <div class="tsd-parameters">
445
+ <h4 class="tsd-parameters-title">Parameters</h4>
446
+ <ul class="tsd-parameter-list">
447
+ <li><span><span class="tsd-kind-parameter">artifactId</span>: <span class="tsd-signature-type">string</span></span>
448
+ <div class="tsd-comment tsd-typography"><p>The artifact ID</p>
449
+ </div></li></ul></div>
450
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
451
+ <ul>
452
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L228">server/src/ai/agent.ts:228</a></li></ul></aside></div></li></ul></section>
453
+ <section class="tsd-panel tsd-member">
454
+ <h3 class="tsd-anchor-link" id="editimage"><span>edit<wbr/>Image</span><a href="#editimage" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
455
+ <ul class="tsd-signatures">
456
+ <li class="">
457
+ <div class="tsd-signature tsd-anchor-link" id="editimage-1"><span class="tsd-kind-call-signature">editImage</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">prompt</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">imageProperties</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">referenceImageArtifactIds</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">artifactId</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">error</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">any</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><a href="#editimage-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
458
+ <div class="tsd-description">
459
+ <div class="tsd-parameters">
460
+ <h4 class="tsd-parameters-title">Parameters</h4>
461
+ <ul class="tsd-parameter-list">
462
+ <li><span><span class="tsd-kind-parameter">prompt</span>: <span class="tsd-signature-type">string</span></span></li>
463
+ <li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">imageProperties</span>: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></span></li>
464
+ <li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">referenceImageArtifactIds</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div>
465
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">artifactId</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">error</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">any</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
466
+ <ul>
467
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L622">server/src/ai/agent.ts:622</a></li></ul></aside></div></li></ul></section>
468
+ <section class="tsd-panel tsd-member">
469
+ <h3 class="tsd-anchor-link" id="finishagent"><span>finish<wbr/>Agent</span><a href="#finishagent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
470
+ <ul class="tsd-signatures">
471
+ <li class="">
472
+ <div class="tsd-signature tsd-anchor-link" id="finishagent-1"><span class="tsd-kind-call-signature">finishAgent</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#finishagent-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
473
+ <div class="tsd-description">
474
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
475
+ <ul>
476
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L249">server/src/ai/agent.ts:249</a></li></ul></aside></div></li></ul></section>
477
+ <section class="tsd-panel tsd-member">
478
+ <h3 class="tsd-anchor-link" id="generateimage"><span>generate<wbr/>Image</span><a href="#generateimage" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
479
+ <ul class="tsd-signatures">
480
+ <li class="">
481
+ <div class="tsd-signature tsd-anchor-link" id="generateimage-1"><span class="tsd-kind-call-signature">generateImage</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">prompt</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">imageProperties</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">artifactId</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">error</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">any</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><a href="#generateimage-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
482
+ <div class="tsd-description">
483
+ <div class="tsd-comment tsd-typography"><p>Generates an image from a text prompt.</p>
484
+ </div>
485
+ <div class="tsd-parameters">
486
+ <h4 class="tsd-parameters-title">Parameters</h4>
487
+ <ul class="tsd-parameter-list">
488
+ <li><span><span class="tsd-kind-parameter">prompt</span>: <span class="tsd-signature-type">string</span></span>
489
+ <div class="tsd-comment tsd-typography"><p>Text description of the image</p>
490
+ </div></li>
491
+ <li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">imageProperties</span>: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></span>
492
+ <div class="tsd-comment tsd-typography"><p>Optional provider-specific image options
92
493
  (e.g. <code>width</code>, <code>height</code>, <code>quality</code>) passed through to the underlying AI service</p>
93
- </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">artifactId</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">error</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">any</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to <code>{ artifactId }</code> on success or <code>{ error }</code> on failure</p>
94
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L537">server/src/ai/agent.ts:537</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getattachedartifacts"><span>get<wbr/>Attached<wbr/>Artifacts</span><a href="#getattachedartifacts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getattachedartifacts-1"><span class="tsd-kind-call-signature">getAttachedArtifacts</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><a href="#getattachedartifacts-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets all attached artifact IDs</p>
95
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4><p>Array of artifact IDs</p>
96
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L202">server/src/ai/agent.ts:202</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getformattedmessages"><span>get<wbr/>Formatted<wbr/>Messages</span><a href="#getformattedmessages" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getformattedmessages-1"><span class="tsd-kind-call-signature">getFormattedMessages</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fromIndex</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><a href="#getformattedmessages-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets formatted messages from the agent's history starting from a specific index</p>
97
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fromIndex</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></span><div class="tsd-comment tsd-typography"><p>The index to start from (0-based)</p>
98
- </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4><p>Array of formatted messages</p>
99
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L251">server/src/ai/agent.ts:251</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getrawmessages"><span>get<wbr/>Raw<wbr/>Messages</span><a href="#getrawmessages" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getrawmessages-1"><span class="tsd-kind-call-signature">getRawMessages</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><a href="#getrawmessages-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets the raw (unformatted) content of every message in the agent's history.</p>
100
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4><p>Array of message content strings</p>
101
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L265">server/src/ai/agent.ts:265</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="hasprompt"><span>has<wbr/>Prompt</span><a href="#hasprompt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="hasprompt-1"><span class="tsd-kind-call-signature">hasPrompt</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#hasprompt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Whether <code>&lt;name&gt;.prompt</code> resolves for this agent, so a caller can tell an agent
494
+ </div></li></ul></div>
495
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">artifactId</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">error</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">any</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to <code>{ artifactId }</code> on success or <code>{ error }</code> on failure</p>
496
+ <aside class="tsd-sources">
497
+ <ul>
498
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L615">server/src/ai/agent.ts:615</a></li></ul></aside></div></li></ul></section>
499
+ <section class="tsd-panel tsd-member">
500
+ <h3 class="tsd-anchor-link" id="getattachedartifacts"><span>get<wbr/>Attached<wbr/>Artifacts</span><a href="#getattachedartifacts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
501
+ <ul class="tsd-signatures">
502
+ <li class="">
503
+ <div class="tsd-signature tsd-anchor-link" id="getattachedartifacts-1"><span class="tsd-kind-call-signature">getAttachedArtifacts</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><a href="#getattachedartifacts-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
504
+ <div class="tsd-description">
505
+ <div class="tsd-comment tsd-typography"><p>Gets all attached artifact IDs</p>
506
+ </div>
507
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4><p>Array of artifact IDs</p>
508
+ <aside class="tsd-sources">
509
+ <ul>
510
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L236">server/src/ai/agent.ts:236</a></li></ul></aside></div></li></ul></section>
511
+ <section class="tsd-panel tsd-member">
512
+ <h3 class="tsd-anchor-link" id="getformattedmessages"><span>get<wbr/>Formatted<wbr/>Messages</span><a href="#getformattedmessages" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
513
+ <ul class="tsd-signatures">
514
+ <li class="">
515
+ <div class="tsd-signature tsd-anchor-link" id="getformattedmessages-1"><span class="tsd-kind-call-signature">getFormattedMessages</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fromIndex</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><a href="#getformattedmessages-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
516
+ <div class="tsd-description">
517
+ <div class="tsd-comment tsd-typography"><p>Gets formatted messages from the agent's history starting from a specific index</p>
518
+ </div>
519
+ <div class="tsd-parameters">
520
+ <h4 class="tsd-parameters-title">Parameters</h4>
521
+ <ul class="tsd-parameter-list">
522
+ <li><span><span class="tsd-kind-parameter">fromIndex</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></span>
523
+ <div class="tsd-comment tsd-typography"><p>The index to start from (0-based)</p>
524
+ </div></li></ul></div>
525
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4><p>Array of formatted messages</p>
526
+ <aside class="tsd-sources">
527
+ <ul>
528
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L285">server/src/ai/agent.ts:285</a></li></ul></aside></div></li></ul></section>
529
+ <section class="tsd-panel tsd-member">
530
+ <h3 class="tsd-anchor-link" id="getrawmessages"><span>get<wbr/>Raw<wbr/>Messages</span><a href="#getrawmessages" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
531
+ <ul class="tsd-signatures">
532
+ <li class="">
533
+ <div class="tsd-signature tsd-anchor-link" id="getrawmessages-1"><span class="tsd-kind-call-signature">getRawMessages</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><a href="#getrawmessages-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
534
+ <div class="tsd-description">
535
+ <div class="tsd-comment tsd-typography"><p>Gets the raw (unformatted) content of every message in the agent's history.</p>
536
+ </div>
537
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4><p>Array of message content strings</p>
538
+ <aside class="tsd-sources">
539
+ <ul>
540
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L299">server/src/ai/agent.ts:299</a></li></ul></aside></div></li></ul></section>
541
+ <section class="tsd-panel tsd-member">
542
+ <h3 class="tsd-anchor-link" id="hasprompt"><span>has<wbr/>Prompt</span><a href="#hasprompt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
543
+ <ul class="tsd-signatures">
544
+ <li class="">
545
+ <div class="tsd-signature tsd-anchor-link" id="hasprompt-1"><span class="tsd-kind-call-signature">hasPrompt</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#hasprompt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
546
+ <div class="tsd-description">
547
+ <div class="tsd-comment tsd-typography"><p>Whether <code>&lt;name&gt;.prompt</code> resolves for this agent, so a caller can tell an agent
102
548
  that can run a kind of turn from one whose prompt folder has no prompt for it.</p>
103
549
  <p>False when the agent has no AI service or no paths yet — the answer to &quot;could
104
550
  this agent run that turn&quot; is then no, which is what a caller wants to hear.</p>
105
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L357">server/src/ai/agent.ts:357</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="historychars"><span>history<wbr/>Chars</span><a href="#historychars" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="historychars-1"><span class="tsd-kind-call-signature">historyChars</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><a href="#historychars-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>The size of this agent's conversation history in characters.</p>
106
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>Total characters across every message in history</p>
107
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L423">server/src/ai/agent.ts:423</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="instructedprompt"><span>instructed<wbr/>Prompt</span><a href="#instructedprompt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="instructedprompt-1"><span class="tsd-kind-call-signature">instructedPrompt</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">prompt</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">instructionFileName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">variables</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">saveResponse</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">cacheMessage</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">maxOutputChars</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#instructedprompt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">prompt</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">instructionFileName</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">variables</span>: <span class="tsd-signature-type">any</span></span></li><li><span><span class="tsd-kind-parameter">saveResponse</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></span></li><li><span><span class="tsd-kind-parameter">cacheMessage</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></span></li><li><span><span class="tsd-kind-parameter">maxOutputChars</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L362">server/src/ai/agent.ts:362</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="needscompaction"><span>needs<wbr/>Compaction</span><a href="#needscompaction" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="needscompaction-1"><span class="tsd-kind-call-signature">needsCompaction</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#needscompaction-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Whether this agent's history has grown past the compaction threshold.</p>
551
+ </div>
552
+ <div class="tsd-parameters">
553
+ <h4 class="tsd-parameters-title">Parameters</h4>
554
+ <ul class="tsd-parameter-list">
555
+ <li><span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span></li></ul></div>
556
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
557
+ <ul>
558
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L435">server/src/ai/agent.ts:435</a></li></ul></aside></div></li></ul></section>
559
+ <section class="tsd-panel tsd-member">
560
+ <h3 class="tsd-anchor-link" id="historychars"><span>history<wbr/>Chars</span><a href="#historychars" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
561
+ <ul class="tsd-signatures">
562
+ <li class="">
563
+ <div class="tsd-signature tsd-anchor-link" id="historychars-1"><span class="tsd-kind-call-signature">historyChars</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><a href="#historychars-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
564
+ <div class="tsd-description">
565
+ <div class="tsd-comment tsd-typography"><p>The size of this agent's conversation history in characters.</p>
566
+ </div>
567
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>Total characters across every message in history</p>
568
+ <aside class="tsd-sources">
569
+ <ul>
570
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L501">server/src/ai/agent.ts:501</a></li></ul></aside></div></li></ul></section>
571
+ <section class="tsd-panel tsd-member">
572
+ <h3 class="tsd-anchor-link" id="instructedprompt"><span>instructed<wbr/>Prompt</span><a href="#instructedprompt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
573
+ <ul class="tsd-signatures">
574
+ <li class="">
575
+ <div class="tsd-signature tsd-anchor-link" id="instructedprompt-1"><span class="tsd-kind-call-signature">instructedPrompt</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">prompt</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">instructionFileName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">variables</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">saveResponse</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">cacheMessage</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">maxOutputChars</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#instructedprompt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
576
+ <div class="tsd-description">
577
+ <div class="tsd-parameters">
578
+ <h4 class="tsd-parameters-title">Parameters</h4>
579
+ <ul class="tsd-parameter-list">
580
+ <li><span><span class="tsd-kind-parameter">prompt</span>: <span class="tsd-signature-type">string</span></span></li>
581
+ <li><span><span class="tsd-kind-parameter">instructionFileName</span>: <span class="tsd-signature-type">string</span></span></li>
582
+ <li><span><span class="tsd-kind-parameter">variables</span>: <span class="tsd-signature-type">any</span></span></li>
583
+ <li><span><span class="tsd-kind-parameter">saveResponse</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></span></li>
584
+ <li><span><span class="tsd-kind-parameter">cacheMessage</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></span></li>
585
+ <li><span><span class="tsd-kind-parameter">maxOutputChars</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></span></li></ul></div>
586
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
587
+ <ul>
588
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L440">server/src/ai/agent.ts:440</a></li></ul></aside></div></li></ul></section>
589
+ <section class="tsd-panel tsd-member">
590
+ <h3 class="tsd-anchor-link" id="needscompaction"><span>needs<wbr/>Compaction</span><a href="#needscompaction" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
591
+ <ul class="tsd-signatures">
592
+ <li class="">
593
+ <div class="tsd-signature tsd-anchor-link" id="needscompaction-1"><span class="tsd-kind-call-signature">needsCompaction</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#needscompaction-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
594
+ <div class="tsd-description">
595
+ <div class="tsd-comment tsd-typography"><p>Whether this agent's history has grown past the compaction threshold.</p>
108
596
  <p>An agent with <code>maxHistoryMessages</code> is excluded: a rolling window already
109
597
  bounds it, and the two mechanisms answer different needs. A window is for an
110
598
  agent whose old turns stop mattering — a moderator routing the next message
111
599
  does not need last hour's. Compaction is for one whose past must survive in
112
600
  some form, which is why it costs a model call to write a summary rather than
113
601
  dropping messages off the front.</p>
114
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>True when compaction is worth a call</p>
115
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L439">server/src/ai/agent.ts:439</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="notifystatechange"><span>notify<wbr/>State<wbr/>Change</span><a href="#notifystatechange" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="notifystatechange-1"><span class="tsd-kind-call-signature">notifyStateChange</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#notifystatechange-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Notifies listeners that the agent state has changed
602
+ </div>
603
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>True when compaction is worth a call</p>
604
+ <aside class="tsd-sources">
605
+ <ul>
606
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L517">server/src/ai/agent.ts:517</a></li></ul></aside></div></li></ul></section>
607
+ <section class="tsd-panel tsd-member">
608
+ <h3 class="tsd-anchor-link" id="notifystatechange"><span>notify<wbr/>State<wbr/>Change</span><a href="#notifystatechange" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
609
+ <ul class="tsd-signatures">
610
+ <li class="">
611
+ <div class="tsd-signature tsd-anchor-link" id="notifystatechange-1"><span class="tsd-kind-call-signature">notifyStateChange</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#notifystatechange-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
612
+ <div class="tsd-description">
613
+ <div class="tsd-comment tsd-typography"><p>Notifies listeners that the agent state has changed
116
614
  Triggers SSE updates if callback is registered</p>
117
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L235">server/src/ai/agent.ts:235</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="preparedprompt"><span>prepared<wbr/>Prompt</span><a href="#preparedprompt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="preparedprompt-1"><span class="tsd-kind-call-signature">preparedPrompt</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">promptFileName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">variables</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">saveResponse</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">cacheMessage</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#preparedprompt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">promptFileName</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">variables</span>: <span class="tsd-signature-type">any</span></span></li><li><span><span class="tsd-kind-parameter">saveResponse</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></span></li><li><span><span class="tsd-kind-parameter">cacheMessage</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L376">server/src/ai/agent.ts:376</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="save"><span>save</span><a href="#save" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="save-1"><span class="tsd-kind-call-signature">save</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#save-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Saves the agent to disk via AgentStoreService
615
+ </div>
616
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
617
+ <ul>
618
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L269">server/src/ai/agent.ts:269</a></li></ul></aside></div></li></ul></section>
619
+ <section class="tsd-panel tsd-member">
620
+ <h3 class="tsd-anchor-link" id="pinhistory"><span>pin<wbr/>History</span><a href="#pinhistory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
621
+ <ul class="tsd-signatures">
622
+ <li class="">
623
+ <div class="tsd-signature tsd-anchor-link" id="pinhistory-1"><span class="tsd-kind-call-signature">pinHistory</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#pinhistory-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
624
+ <div class="tsd-description">
625
+ <div class="tsd-comment tsd-typography"><p>Marks the current end of history as the start of a task the rolling window
626
+ must not trim into.</p>
627
+ <p>A no-op for an agent with no window: there is nothing to protect it from, and
628
+ a pin on an agent that keeps everything would only be a field to explain. That
629
+ is what makes it safe to call from a shared path — the Dungeon Master running
630
+ its own fight keeps its whole campaign either way.</p>
631
+ <p>Call it <em>before</em> the message that starts the task is added to history, so the
632
+ task's own opening instruction is inside the pin rather than the first thing
633
+ dropped.</p>
634
+ </div>
635
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
636
+ <ul>
637
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L368">server/src/ai/agent.ts:368</a></li></ul></aside></div></li></ul></section>
638
+ <section class="tsd-panel tsd-member">
639
+ <h3 class="tsd-anchor-link" id="preparedprompt"><span>prepared<wbr/>Prompt</span><a href="#preparedprompt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
640
+ <ul class="tsd-signatures">
641
+ <li class="">
642
+ <div class="tsd-signature tsd-anchor-link" id="preparedprompt-1"><span class="tsd-kind-call-signature">preparedPrompt</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">promptFileName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">variables</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">saveResponse</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">cacheMessage</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#preparedprompt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
643
+ <div class="tsd-description">
644
+ <div class="tsd-parameters">
645
+ <h4 class="tsd-parameters-title">Parameters</h4>
646
+ <ul class="tsd-parameter-list">
647
+ <li><span><span class="tsd-kind-parameter">promptFileName</span>: <span class="tsd-signature-type">string</span></span></li>
648
+ <li><span><span class="tsd-kind-parameter">variables</span>: <span class="tsd-signature-type">any</span></span></li>
649
+ <li><span><span class="tsd-kind-parameter">saveResponse</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></span></li>
650
+ <li><span><span class="tsd-kind-parameter">cacheMessage</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></span></li></ul></div>
651
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
652
+ <ul>
653
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L454">server/src/ai/agent.ts:454</a></li></ul></aside></div></li></ul></section>
654
+ <section class="tsd-panel tsd-member">
655
+ <h3 class="tsd-anchor-link" id="save"><span>save</span><a href="#save" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
656
+ <ul class="tsd-signatures">
657
+ <li class="">
658
+ <div class="tsd-signature tsd-anchor-link" id="save-1"><span class="tsd-kind-call-signature">save</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#save-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
659
+ <div class="tsd-description">
660
+ <div class="tsd-comment tsd-typography"><p>Saves the agent to disk via AgentStoreService
118
661
  Called automatically after conversation history changes</p>
119
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L210">server/src/ai/agent.ts:210</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="setonstatechange"><span>set<wbr/>On<wbr/>State<wbr/>Change</span><a href="#setonstatechange" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="setonstatechange-1"><span class="tsd-kind-call-signature">setOnStateChange</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#setonstatechange-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Sets the callback to be called when agent state changes
662
+ </div>
663
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
664
+ <ul>
665
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L244">server/src/ai/agent.ts:244</a></li></ul></aside></div></li></ul></section>
666
+ <section class="tsd-panel tsd-member">
667
+ <h3 class="tsd-anchor-link" id="setonstatechange"><span>set<wbr/>On<wbr/>State<wbr/>Change</span><a href="#setonstatechange" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
668
+ <ul class="tsd-signatures">
669
+ <li class="">
670
+ <div class="tsd-signature tsd-anchor-link" id="setonstatechange-1"><span class="tsd-kind-call-signature">setOnStateChange</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#setonstatechange-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
671
+ <div class="tsd-description">
672
+ <div class="tsd-comment tsd-typography"><p>Sets the callback to be called when agent state changes
120
673
  Used for SSE updates to push changes to connected clients</p>
121
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span><div class="tsd-comment tsd-typography"><p>Function to call when state changes</p>
122
- </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L227">server/src/ai/agent.ts:227</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="textprompt"><span>text<wbr/>Prompt</span><a href="#textprompt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="textprompt-1"><span class="tsd-kind-call-signature">textPrompt</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">prompt</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">jsonSchema</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">saveResponse</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">promptInstructions</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">cacheMessage</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">maxOutputChars</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#textprompt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">prompt</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">jsonSchema</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> = null</span></span></li><li><span><span class="tsd-kind-parameter">saveResponse</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></span></li><li><span><span class="tsd-kind-parameter">promptInstructions</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = null</span></span></li><li><span><span class="tsd-kind-parameter">cacheMessage</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></span></li><li><span><span class="tsd-kind-parameter">maxOutputChars</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L511">server/src/ai/agent.ts:511</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="trimhistoryifneeded"><span>trim<wbr/>History<wbr/>If<wbr/>Needed</span><a href="#trimhistoryifneeded" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="trimhistoryifneeded-1"><span class="tsd-kind-call-signature">trimHistoryIfNeeded</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">threshold</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#trimhistoryifneeded-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Trims conversation history to keep only the last N messages if maxHistoryMessages is set
674
+ </div>
675
+ <div class="tsd-parameters">
676
+ <h4 class="tsd-parameters-title">Parameters</h4>
677
+ <ul class="tsd-parameter-list">
678
+ <li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span>
679
+ <div class="tsd-comment tsd-typography"><p>Function to call when state changes</p>
680
+ </div></li></ul></div>
681
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
682
+ <ul>
683
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L261">server/src/ai/agent.ts:261</a></li></ul></aside></div></li></ul></section>
684
+ <section class="tsd-panel tsd-member">
685
+ <h3 class="tsd-anchor-link" id="textprompt"><span>text<wbr/>Prompt</span><a href="#textprompt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
686
+ <ul class="tsd-signatures">
687
+ <li class="">
688
+ <div class="tsd-signature tsd-anchor-link" id="textprompt-1"><span class="tsd-kind-call-signature">textPrompt</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">prompt</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">jsonSchema</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">saveResponse</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">promptInstructions</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">cacheMessage</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">maxOutputChars</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#textprompt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
689
+ <div class="tsd-description">
690
+ <div class="tsd-parameters">
691
+ <h4 class="tsd-parameters-title">Parameters</h4>
692
+ <ul class="tsd-parameter-list">
693
+ <li><span><span class="tsd-kind-parameter">prompt</span>: <span class="tsd-signature-type">string</span></span></li>
694
+ <li><span><span class="tsd-kind-parameter">jsonSchema</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> = null</span></span></li>
695
+ <li><span><span class="tsd-kind-parameter">saveResponse</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></span></li>
696
+ <li><span><span class="tsd-kind-parameter">promptInstructions</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = null</span></span></li>
697
+ <li><span><span class="tsd-kind-parameter">cacheMessage</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></span></li>
698
+ <li><span><span class="tsd-kind-parameter">maxOutputChars</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></span></li></ul></div>
699
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
700
+ <ul>
701
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L589">server/src/ai/agent.ts:589</a></li></ul></aside></div></li></ul></section>
702
+ <section class="tsd-panel tsd-member">
703
+ <h3 class="tsd-anchor-link" id="trimhistoryifneeded"><span>trim<wbr/>History<wbr/>If<wbr/>Needed</span><a href="#trimhistoryifneeded" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
704
+ <ul class="tsd-signatures">
705
+ <li class="">
706
+ <div class="tsd-signature tsd-anchor-link" id="trimhistoryifneeded-1"><span class="tsd-kind-call-signature">trimHistoryIfNeeded</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">threshold</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#trimhistoryifneeded-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
707
+ <div class="tsd-description">
708
+ <div class="tsd-comment tsd-typography"><p>Trims conversation history to keep only the last N messages if maxHistoryMessages is set
123
709
  Preserves system messages (role: 'developer') at the start of history
124
710
  Used for rolling window history management (e.g., moderator agents)</p>
125
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">threshold</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></span><div class="tsd-comment tsd-typography"><p>Allow history to grow 'threshold' messages past the limit before trimming a 'threshold'-sized chunk of messages at once</p>
126
- </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L327">server/src/ai/agent.ts:327</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="withsmallmodel"><span>with<wbr/>Small<wbr/>Model</span><a href="#withsmallmodel" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="withsmallmodel-1"><span class="tsd-kind-call-signature">withSmallModel</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#withsmallmodelt">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#withsmallmodelt">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#withsmallmodelt">T</a><span class="tsd-signature-symbol">&gt;</span><a href="#withsmallmodel-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="withsmallmodelt"><span class="tsd-kind-type-parameter">T</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#withsmallmodelt">T</a><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#withsmallmodelt">T</a><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L391">server/src/ai/agent.ts:391</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="compactionthresholdchars"><code class="tsd-tag">Static</code><span>compaction<wbr/>Threshold<wbr/>Chars</span><a href="#compactionthresholdchars" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="compactionthresholdchars-1"><span class="tsd-kind-call-signature">compactionThresholdChars</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><a href="#compactionthresholdchars-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>How large a history may grow, in characters, before it is worth compacting.</p>
711
+ <p>A <a href="#historypin" class="tsd-kind-property">historyPin</a> raises the floor: everything since the pin is kept even
712
+ when that is more than the window allows. The window still applies to whatever
713
+ came before it, so a specialist handed a second task drops the first.</p>
714
+ </div>
715
+ <div class="tsd-parameters">
716
+ <h4 class="tsd-parameters-title">Parameters</h4>
717
+ <ul class="tsd-parameter-list">
718
+ <li><span><span class="tsd-kind-parameter">threshold</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></span>
719
+ <div class="tsd-comment tsd-typography"><p>Allow history to grow 'threshold' messages past the limit before trimming a 'threshold'-sized chunk of messages at once</p>
720
+ </div></li></ul></div>
721
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
722
+ <ul>
723
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L398">server/src/ai/agent.ts:398</a></li></ul></aside></div></li></ul></section>
724
+ <section class="tsd-panel tsd-member">
725
+ <h3 class="tsd-anchor-link" id="withsmallmodel"><span>with<wbr/>Small<wbr/>Model</span><a href="#withsmallmodel" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
726
+ <ul class="tsd-signatures">
727
+ <li class="">
728
+ <div class="tsd-signature tsd-anchor-link" id="withsmallmodel-1"><span class="tsd-kind-call-signature">withSmallModel</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#withsmallmodelt">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#withsmallmodelt">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#withsmallmodelt">T</a><span class="tsd-signature-symbol">&gt;</span><a href="#withsmallmodel-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
729
+ <div class="tsd-description">
730
+ <section class="tsd-panel">
731
+ <h4>Type Parameters</h4>
732
+ <ul class="tsd-type-parameter-list">
733
+ <li><span id="withsmallmodelt"><span class="tsd-kind-type-parameter">T</span></span></li></ul></section>
734
+ <div class="tsd-parameters">
735
+ <h4 class="tsd-parameters-title">Parameters</h4>
736
+ <ul class="tsd-parameter-list">
737
+ <li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#withsmallmodelt">T</a><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div>
738
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#withsmallmodelt">T</a><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
739
+ <ul>
740
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L469">server/src/ai/agent.ts:469</a></li></ul></aside></div></li></ul></section>
741
+ <section class="tsd-panel tsd-member">
742
+ <h3 class="tsd-anchor-link" id="compactionthresholdchars"><code class="tsd-tag">Static</code><span>compaction<wbr/>Threshold<wbr/>Chars</span><a href="#compactionthresholdchars" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
743
+ <ul class="tsd-signatures">
744
+ <li class="">
745
+ <div class="tsd-signature tsd-anchor-link" id="compactionthresholdchars-1"><span class="tsd-kind-call-signature">compactionThresholdChars</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><a href="#compactionthresholdchars-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
746
+ <div class="tsd-description">
747
+ <div class="tsd-comment tsd-typography"><p>How large a history may grow, in characters, before it is worth compacting.</p>
127
748
  <p>Read per call rather than cached so an operator can retune a long-running
128
749
  server without restarting it. Characters rather than tokens because it is the
129
750
  one measure available without asking a tokenizer, and the threshold only has
130
751
  to be roughly right — four characters to a token is close enough to make
131
752
  100,000 mean &quot;about 25k tokens&quot;.</p>
132
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The threshold in characters</p>
133
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L415">server/src/ai/agent.ts:415</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="generatenickname"><code class="tsd-tag">Static</code><span>generate<wbr/>Nickname</span><a href="#generatenickname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="generatenickname-1"><span class="tsd-kind-call-signature">generateNickname</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><a href="#generatenickname-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Generates a nickname from an agent name by taking the first word</p>
134
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">agentName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The full agent name</p>
135
- </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>The first word as nickname, or the full name if empty</p>
136
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/b15141677fa1585e84a2baa64f121684482dd309/server/src/ai/agent.ts#L27">server/src/ai/agent.ts:27</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#agentname"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>agent<wbr/>Name</span></a><a href="#agentnickname"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>agent<wbr/>Nickname</span></a><a href="#allowsearch"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>allow<wbr/>Search</span></a><a href="#assistant"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>assistant</span></a><a href="#attachedartifacts"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>attached<wbr/>Artifacts</span></a><a href="#attachedfiles"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>attached<wbr/>Files</span></a><a href="#begininstruction"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>begin<wbr/>Instruction</span></a><a href="#createdat"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>created<wbr/>At</span></a><a href="#description"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>description</span></a><a href="#disablebalancecheck"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>disable<wbr/>Balance<wbr/>Check</span></a><a href="#disablemarkup"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>disable<wbr/>Markup</span></a><a href="#fullcontextfiles"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>full<wbr/>Context<wbr/>Files</span></a><a href="#history"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>history</span></a><a href="#id"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>id</span></a><a href="#iscontrolledbyhuman"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>is<wbr/>Controlled<wbr/>By<wbr/>Human</span></a><a href="#ispublished"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>is<wbr/>Published</span></a><a href="#markuprate"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>markup<wbr/>Rate</span></a><a href="#maxhistorymessages"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>max<wbr/>History<wbr/>Messages</span></a><a href="#maxoutputtokens"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>max<wbr/>Output<wbr/>Tokens</span></a><a href="#modelname"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>model<wbr/>Name</span></a><a href="#openai"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>openai</span></a><a href="#ownerroomid"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>owner<wbr/>Room<wbr/>Id</span></a><a href="#privatecontext"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>private<wbr/>Context</span></a><a href="#promptcachettl"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>prompt<wbr/>Cache<wbr/>TTL</span></a><a href="#promptfolder"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>prompt<wbr/>Folder</span></a><a href="#reasoningeffort"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>reasoning<wbr/>Effort</span></a><a href="#servicename"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>service<wbr/>Name</span></a><a href="#smallmodelname"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>small<wbr/>Model<wbr/>Name</span></a><a href="#storagedir"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>storage<wbr/>Dir</span></a><a href="#systeminstruction"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>system<wbr/>Instruction</span></a><a href="#templateagentid"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>template<wbr/>Agent<wbr/>Id</span></a><a href="#toolnames"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>tool<wbr/>Names</span></a><a href="#totalcost"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>total<wbr/>Cost</span></a><a href="#totalinputtokens"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>total<wbr/>Input<wbr/>Tokens</span></a><a href="#totalmarkup"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>total<wbr/>Markup</span></a><a href="#totaloutputtokens"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>total<wbr/>Output<wbr/>Tokens</span></a><a href="#usemoderator"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Moderator</span></a><a href="#vectorstore"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>vector<wbr/>Store</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#addtoconversationhistory"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>To<wbr/>Conversation<wbr/>History</span></a><a href="#attachartifact"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>attach<wbr/>Artifact</span></a><a href="#attachdocument"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>attach<wbr/>Document</span></a><a href="#canrespond"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>can<wbr/>Respond</span></a><a href="#compact"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compact</span></a><a href="#deleteagent"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Agent</span></a><a href="#detachartifact"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>detach<wbr/>Artifact</span></a><a href="#editimage"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>edit<wbr/>Image</span></a><a href="#finishagent"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>finish<wbr/>Agent</span></a><a href="#generateimage"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>generate<wbr/>Image</span></a><a href="#getattachedartifacts"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Attached<wbr/>Artifacts</span></a><a href="#getformattedmessages"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Formatted<wbr/>Messages</span></a><a href="#getrawmessages"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Raw<wbr/>Messages</span></a><a href="#hasprompt"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>has<wbr/>Prompt</span></a><a href="#historychars"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>history<wbr/>Chars</span></a><a href="#instructedprompt"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>instructed<wbr/>Prompt</span></a><a href="#needscompaction"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>needs<wbr/>Compaction</span></a><a href="#notifystatechange"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>notify<wbr/>State<wbr/>Change</span></a><a href="#preparedprompt"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>prepared<wbr/>Prompt</span></a><a href="#save"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>save</span></a><a href="#setonstatechange"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>On<wbr/>State<wbr/>Change</span></a><a href="#textprompt"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>text<wbr/>Prompt</span></a><a href="#trimhistoryifneeded"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>trim<wbr/>History<wbr/>If<wbr/>Needed</span></a><a href="#withsmallmodel"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>with<wbr/>Small<wbr/>Model</span></a><a href="#compactionthresholdchars"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compaction<wbr/>Threshold<wbr/>Chars</span></a><a href="#generatenickname"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>generate<wbr/>Nickname</span></a></div></details></div></details></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://github.com/your-org/briyah" class="tsd-nav-link">GitHub</a><a href="https://www.npmjs.com/package/briyah" class="tsd-nav-link">npm</a></nav><nav class="tsd-navigation"><a href="../modules.html">Briyah SDK - v1.5.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
753
+ </div>
754
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The threshold in characters</p>
755
+ <aside class="tsd-sources">
756
+ <ul>
757
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L493">server/src/ai/agent.ts:493</a></li></ul></aside></div></li></ul></section>
758
+ <section class="tsd-panel tsd-member">
759
+ <h3 class="tsd-anchor-link" id="generatenickname"><code class="tsd-tag">Static</code><span>generate<wbr/>Nickname</span><a href="#generatenickname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
760
+ <ul class="tsd-signatures">
761
+ <li class="">
762
+ <div class="tsd-signature tsd-anchor-link" id="generatenickname-1"><span class="tsd-kind-call-signature">generateNickname</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><a href="#generatenickname-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
763
+ <div class="tsd-description">
764
+ <div class="tsd-comment tsd-typography"><p>Generates a nickname from an agent name by taking the first word</p>
765
+ </div>
766
+ <div class="tsd-parameters">
767
+ <h4 class="tsd-parameters-title">Parameters</h4>
768
+ <ul class="tsd-parameter-list">
769
+ <li><span><span class="tsd-kind-parameter">agentName</span>: <span class="tsd-signature-type">string</span></span>
770
+ <div class="tsd-comment tsd-typography"><p>The full agent name</p>
771
+ </div></li></ul></div>
772
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>The first word as nickname, or the full name if empty</p>
773
+ <aside class="tsd-sources">
774
+ <ul>
775
+ <li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/ai/agent.ts#L27">server/src/ai/agent.ts:27</a></li></ul></aside></div></li></ul></section></section></details></div>
776
+ <div class="col-sidebar">
777
+ <div class="page-menu">
778
+ <div class="tsd-navigation settings">
779
+ <details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
780
+ <h3>Settings</h3></summary>
781
+ <div class="tsd-accordion-details">
782
+ <div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span>
783
+ <ul id="tsd-filter-options">
784
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
785
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
786
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div>
787
+ <div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
788
+ <details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
789
+ <h3>On This Page</h3></summary>
790
+ <div class="tsd-accordion-details">
791
+ <details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary>
792
+ <div><a href="#agentname"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>agent<wbr/>Name</span></a><a href="#agentnickname"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>agent<wbr/>Nickname</span></a><a href="#allowsearch"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>allow<wbr/>Search</span></a><a href="#assistant"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>assistant</span></a><a href="#attachedartifacts"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>attached<wbr/>Artifacts</span></a><a href="#attachedfiles"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>attached<wbr/>Files</span></a><a href="#begininstruction"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>begin<wbr/>Instruction</span></a><a href="#createdat"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>created<wbr/>At</span></a><a href="#description"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>description</span></a><a href="#disablebalancecheck"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>disable<wbr/>Balance<wbr/>Check</span></a><a href="#disablemarkup"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>disable<wbr/>Markup</span></a><a href="#enabledpacks"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>enabled<wbr/>Packs</span></a><a href="#fullcontextfiles"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>full<wbr/>Context<wbr/>Files</span></a><a href="#history"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>history</span></a><a href="#historypin"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>history<wbr/>Pin</span></a><a href="#id"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>id</span></a><a href="#iscontrolledbyhuman"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>is<wbr/>Controlled<wbr/>By<wbr/>Human</span></a><a href="#ispublished"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>is<wbr/>Published</span></a><a href="#markuprate"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>markup<wbr/>Rate</span></a><a href="#maxhistorymessages"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>max<wbr/>History<wbr/>Messages</span></a><a href="#maxoutputtokens"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>max<wbr/>Output<wbr/>Tokens</span></a><a href="#modelname"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>model<wbr/>Name</span></a><a href="#openai"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>openai</span></a><a href="#ownerroomid"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>owner<wbr/>Room<wbr/>Id</span></a><a href="#pack"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>pack</span></a><a href="#packagentkey"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>pack<wbr/>Agent<wbr/>Key</span></a><a href="#privatecontext"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>private<wbr/>Context</span></a><a href="#promptcachettl"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>prompt<wbr/>Cache<wbr/>TTL</span></a><a href="#promptfolder"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>prompt<wbr/>Folder</span></a><a href="#reasoningeffort"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>reasoning<wbr/>Effort</span></a><a href="#servicename"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>service<wbr/>Name</span></a><a href="#smallmodelname"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>small<wbr/>Model<wbr/>Name</span></a><a href="#storagedir"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>storage<wbr/>Dir</span></a><a href="#systeminstruction"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>system<wbr/>Instruction</span></a><a href="#templateagentid"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>template<wbr/>Agent<wbr/>Id</span></a><a href="#toolnames"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>tool<wbr/>Names</span></a><a href="#totalcost"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>total<wbr/>Cost</span></a><a href="#totalinputtokens"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>total<wbr/>Input<wbr/>Tokens</span></a><a href="#totalmarkup"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>total<wbr/>Markup</span></a><a href="#totaloutputtokens"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>total<wbr/>Output<wbr/>Tokens</span></a><a href="#usemoderator"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Moderator</span></a><a href="#vectorstore"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>vector<wbr/>Store</span></a></div></details>
793
+ <details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary>
794
+ <div><a href="#addtoconversationhistory"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>To<wbr/>Conversation<wbr/>History</span></a><a href="#attachartifact"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>attach<wbr/>Artifact</span></a><a href="#attachdocument"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>attach<wbr/>Document</span></a><a href="#canrespond"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>can<wbr/>Respond</span></a><a href="#compact"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compact</span></a><a href="#deleteagent"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Agent</span></a><a href="#detachartifact"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>detach<wbr/>Artifact</span></a><a href="#editimage"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>edit<wbr/>Image</span></a><a href="#finishagent"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>finish<wbr/>Agent</span></a><a href="#generateimage"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>generate<wbr/>Image</span></a><a href="#getattachedartifacts"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Attached<wbr/>Artifacts</span></a><a href="#getformattedmessages"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Formatted<wbr/>Messages</span></a><a href="#getrawmessages"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Raw<wbr/>Messages</span></a><a href="#hasprompt"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>has<wbr/>Prompt</span></a><a href="#historychars"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>history<wbr/>Chars</span></a><a href="#instructedprompt"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>instructed<wbr/>Prompt</span></a><a href="#needscompaction"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>needs<wbr/>Compaction</span></a><a href="#notifystatechange"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>notify<wbr/>State<wbr/>Change</span></a><a href="#pinhistory"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>pin<wbr/>History</span></a><a href="#preparedprompt"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>prepared<wbr/>Prompt</span></a><a href="#save"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>save</span></a><a href="#setonstatechange"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>On<wbr/>State<wbr/>Change</span></a><a href="#textprompt"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>text<wbr/>Prompt</span></a><a href="#trimhistoryifneeded"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>trim<wbr/>History<wbr/>If<wbr/>Needed</span></a><a href="#withsmallmodel"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>with<wbr/>Small<wbr/>Model</span></a><a href="#compactionthresholdchars"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compaction<wbr/>Threshold<wbr/>Chars</span></a><a href="#generatenickname"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>generate<wbr/>Nickname</span></a></div></details></div></details></div>
795
+ <div class="site-menu">
796
+ <nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://github.com/your-org/briyah" class="tsd-nav-link">GitHub</a><a href="https://www.npmjs.com/package/briyah" class="tsd-nav-link">npm</a></nav>
797
+ <nav class="tsd-navigation"><a href="../modules.html">Briyah SDK - v2.0.1</a>
798
+ <ul class="tsd-small-nested-navigation" id="tsd-nav-container">
799
+ <li>Loading...</li></ul></nav></div></div></div><footer>
800
+ <p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer>
801
+ <div class="overlay"></div></body></html>