Commit ceba13f
authored
Merge pull request #68 from redis/docs/restructure-memory-documentation
This PR includes a few changes: a new feature, a performance fix, a bug fix, and docs enhancements.
New feature: Reconstruct working memory messages from long-term storage
If you turn on the index_all_messages_in_long_term_memory setting (off by default), the server will copy all messages found in working memory sessions to long-term storage. Later, if a client requests a working memory session by ID, and the server does not find one (because it's expired or you deleted it), the server will try to reconstruct the session from long-term storage by searching for messages with that session ID. This allows you to set a TTL on working memory and expire it quickly, but retain the ability to restore the session from working memory if a user resumes the session later.
NOTE: This setting requires some care, so it's disabled by default. You most likely want to set TTLs on working memory if you use this feature. Also, if you use long-term search without specifying memory types, you may get duplicates of the same information (one from a message, one from episodic or semantic memory).
Bug fix: calculating remaining context works better now
There was a bug in how we calculated remaining context after updating a working memory session.
Defaults change: Turn off query optimization by default
Long-term search was optimizing all queries by default. This introduces latency and is mostly useful if you're searching directly with user queries, which most agents won't do (instead, an LLM will search through function calls).
Docs: Restructures the documentation to provide a cleaner, more logical organization.File tree
46 files changed
+3962
-1231
lines changed- .github/workflows
- agent-memory-client
- agent_memory_client
- tests
- agent_memory_server
- utils
- docs
- examples
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
46 files changed
+3962
-1231
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| |||
364 | 369 | | |
365 | 370 | | |
366 | 371 | | |
367 | | - | |
368 | | - | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
369 | 381 | | |
370 | 382 | | |
371 | 383 | | |
| |||
885 | 897 | | |
886 | 898 | | |
887 | 899 | | |
888 | | - | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | | - | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | 900 | | |
897 | 901 | | |
898 | 902 | | |
| |||
1477 | 1481 | | |
1478 | 1482 | | |
1479 | 1483 | | |
1480 | | - | |
1481 | | - | |
| 1484 | + | |
| 1485 | + | |
1482 | 1486 | | |
1483 | 1487 | | |
1484 | 1488 | | |
| |||
1595 | 1599 | | |
1596 | 1600 | | |
1597 | 1601 | | |
1598 | | - | |
1599 | | - | |
| 1602 | + | |
| 1603 | + | |
1600 | 1604 | | |
1601 | 1605 | | |
1602 | 1606 | | |
| |||
1620 | 1624 | | |
1621 | 1625 | | |
1622 | 1626 | | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
1623 | 1688 | | |
1624 | 1689 | | |
1625 | 1690 | | |
| |||
1674 | 1739 | | |
1675 | 1740 | | |
1676 | 1741 | | |
| 1742 | + | |
1677 | 1743 | | |
1678 | 1744 | | |
1679 | 1745 | | |
| |||
1706 | 1772 | | |
1707 | 1773 | | |
1708 | 1774 | | |
| 1775 | + | |
1709 | 1776 | | |
1710 | 1777 | | |
1711 | 1778 | | |
| |||
1764 | 1831 | | |
1765 | 1832 | | |
1766 | 1833 | | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
1767 | 1840 | | |
1768 | 1841 | | |
1769 | 1842 | | |
| |||
2143 | 2216 | | |
2144 | 2217 | | |
2145 | 2218 | | |
| 2219 | + | |
| 2220 | + | |
| 2221 | + | |
| 2222 | + | |
| 2223 | + | |
2146 | 2224 | | |
2147 | 2225 | | |
2148 | 2226 | | |
| |||
2287 | 2365 | | |
2288 | 2366 | | |
2289 | 2367 | | |
| 2368 | + | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
| 2396 | + | |
| 2397 | + | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
2290 | 2402 | | |
2291 | 2403 | | |
2292 | 2404 | | |
| |||
2757 | 2869 | | |
2758 | 2870 | | |
2759 | 2871 | | |
2760 | | - | |
| 2872 | + | |
2761 | 2873 | | |
2762 | 2874 | | |
2763 | 2875 | | |
| |||
2861 | 2973 | | |
2862 | 2974 | | |
2863 | 2975 | | |
2864 | | - | |
| 2976 | + | |
2865 | 2977 | | |
2866 | 2978 | | |
2867 | 2979 | | |
| |||
0 commit comments