@statelyai/agent 2.0.0-next.3 → 2.0.0-next.5

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 (37) hide show
  1. package/.changeset/calm-beans-talk.md +5 -0
  2. package/.changeset/long-guests-explode.md +5 -0
  3. package/.changeset/nice-pants-rule.md +10 -0
  4. package/.changeset/odd-kiwis-compare.md +5 -0
  5. package/.changeset/pre.json +4 -0
  6. package/CHANGELOG.md +23 -0
  7. package/architecture.tldr +797 -0
  8. package/dist/index.d.mts +198 -140
  9. package/dist/index.d.ts +198 -140
  10. package/dist/index.js +4397 -148
  11. package/dist/index.mjs +4397 -149
  12. package/examples/chatbot.ts +9 -5
  13. package/examples/cot.ts +2 -4
  14. package/examples/jugs.ts +2 -2
  15. package/examples/learn-from-feedback.ts +7 -7
  16. package/examples/newspaper.ts +1 -1
  17. package/examples/rewoo.ts +62 -0
  18. package/examples/river-crossing.ts +2 -2
  19. package/examples/serverless.ts +71 -0
  20. package/examples/simple.ts +1 -1
  21. package/examples/ticTacToe.ts +6 -2
  22. package/examples/wiki.ts +2 -2
  23. package/package.json +14 -12
  24. package/readme.md +57 -0
  25. package/src/agent.test.ts +387 -30
  26. package/src/agent.ts +177 -64
  27. package/src/decide.test.ts +24 -2
  28. package/src/decide.ts +34 -78
  29. package/src/index.ts +1 -0
  30. package/src/{strategies/chainOfThought.ts → policies/chainOfThoughtPolicy.ts} +7 -9
  31. package/src/policies/index.ts +3 -0
  32. package/src/{strategies/shortestPath.test.ts → policies/shortestPathPolicy.test.ts} +2 -2
  33. package/src/{strategies/shortestPath.ts → policies/shortestPathPolicy.ts} +8 -8
  34. package/src/{strategies/simple.ts → policies/toolPolicy.ts} +27 -26
  35. package/src/text.ts +17 -22
  36. package/src/types.ts +162 -166
  37. package/src/agent-experimental.ts +0 -221
@@ -0,0 +1,5 @@
1
+ ---
2
+ '@statelyai/agent': major
3
+ ---
4
+
5
+ "Strategy" has been renamed to "policy", and "score" has been renamed to "reward".
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@statelyai/agent": major
3
+ ---
4
+
5
+ Set ai as peer dependency
@@ -0,0 +1,10 @@
1
+ ---
2
+ '@statelyai/agent': major
3
+ ---
4
+
5
+ - The `machine` and `machineHash` properties were removed from `AgentObservation` and `AgentObservationInput`
6
+ - The `defaultOptions` property was removed from `Agent`
7
+ - `AgentDecideOptions` was renamed to `AgentDecideInput`
8
+ - The `execute` property was removed from `AgentDecideInput`
9
+ - The `episodeId` optional property was added to `AgentDecideInput`, `AgentObservationInput`, and `AgentFeedbackInput`
10
+ - `decisionId` was added to `AgentObservationInput` and `AgentFeedbackInput`
@@ -0,0 +1,5 @@
1
+ ---
2
+ '@statelyai/agent': minor
3
+ ---
4
+
5
+ You can now add **insights** for observations made. Insights are additional context about the observations made, which can be useful for agent decision making.
@@ -5,10 +5,14 @@
5
5
  "@statelyai/agent": "1.1.6"
6
6
  },
7
7
  "changesets": [
8
+ "calm-beans-talk",
8
9
  "cyan-carpets-perform",
9
10
  "fast-donkeys-argue",
10
11
  "grumpy-dolphins-think",
11
12
  "light-hats-drive",
13
+ "long-guests-explode",
14
+ "nice-pants-rule",
15
+ "odd-kiwis-compare",
12
16
  "old-jobs-check",
13
17
  "old-teachers-tap",
14
18
  "pink-eagles-deliver",
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @statelyai/agent
2
2
 
3
+ ## 2.0.0-next.5
4
+
5
+ ### Major Changes
6
+
7
+ - [`2abec3e`](https://github.com/statelyai/agent/commit/2abec3e4d13d75f0ae1840f6dd2812f8fe9fb8d1) Thanks [@davidkpiano](https://github.com/davidkpiano)! - "Strategy" has been renamed to "policy", and "score" has been renamed to "reward".
8
+
9
+ - [`56ebde3`](https://github.com/statelyai/agent/commit/56ebde34ef7c897c1b845f026a5b38f41ef6a36f) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Set ai as peer dependency
10
+
11
+ ### Minor Changes
12
+
13
+ - [`ea0c45e`](https://github.com/statelyai/agent/commit/ea0c45e5f099ea270a8ebd49fc3f700cc5827320) Thanks [@davidkpiano](https://github.com/davidkpiano)! - You can now add **insights** for observations made. Insights are additional context about the observations made, which can be useful for agent decision making.
14
+
15
+ ## 2.0.0-next.4
16
+
17
+ ### Major Changes
18
+
19
+ - [`4a79bac`](https://github.com/statelyai/agent/commit/4a79bacbda33340b34a4b6271c2bd0fa2673ce25) Thanks [@davidkpiano](https://github.com/davidkpiano)! - - The `machine` and `machineHash` properties were removed from `AgentObservation` and `AgentObservationInput`
20
+ - The `defaultOptions` property was removed from `Agent`
21
+ - `AgentDecideOptions` was renamed to `AgentDecideInput`
22
+ - The `execute` property was removed from `AgentDecideInput`
23
+ - The `episodeId` optional property was added to `AgentDecideInput`, `AgentObservationInput`, and `AgentFeedbackInput`
24
+ - `decisionId` was added to `AgentObservationInput` and `AgentFeedbackInput`
25
+
3
26
  ## 2.0.0-next.3
4
27
 
5
28
  ### Major Changes