Repository navigation
Commit e897d9f
SIN-Agent
feat(bundle): add Honcho behavioral-memory backend (lazy, graceful)
Implements strategic architecture: SCKG (code) + Honcho (behavioral) + SQLite (fallback).
Honcho is a battle-tested behavioral-memory service (honcho-ai 2.1.2) that
stores CONVERSATIONS, PREFERENCES, and PEER-MODELS — complementary to SCKG
which only knows about CODE STRUCTURE.
**New: HonchoBackend class in memory.py**
- Lazy initialization (no import cost if unused)
- 1s timeout + 0 retries for fast-fail
- Graceful degradation: returns False/None on any failure
- Optional dependency: honcho-ai (not required)
**SINMemory now accepts honcho_workspace + honcho_base_url**
**New method: get_context_for_query(query)**
The killer feature: combines SCKG code knowledge + Honcho behavioral insights
into a single structured dict for LLM prompt injection.
**Updated: get_stats() now includes honcho status**
**New CLI sub-commands:**
sin memory honcho-status # check if Honcho is reachable
sin memory honcho-retain # store a message in Honcho
sin memory honcho-chat # ask Honcho peer a question
sin context query <query> # unified code + behavioral context
**Tests: 157 → 163 (+6 new, 0 regressions)**
- test_memory_with_honcho_unavailable
- test_honcho_backend_init_lazy
- test_honcho_backend_get_status
- test_honcho_retain_message_unavailable
- test_memory_get_context_for_query
- test_memory_stats_includes_honcho
**memory.doc.md updated with Honcho section + combined-stack example.
**AGENTS.md updated (both copies):
- New Priority -9.5 HONCHO PFLICHT mandate
- Documents complementarity to SCKG
- Lists trigger phrases and install instructions
**Compatibility:**
- 163/163 tests pass
- 0 breaking changes
- All previous commands still work
- Honcho completely optional
Bundle now exposes 3 distinct memory layers:
1. SQLite (always) — durable facts
2. SCKG (if installed) — code knowledge graph
3. Honcho (if reachable) — behavioral + session history
This is the foundation for cross-session agent intelligence.1 parent 0badfa9 commit e897d9f
4 files changed
Lines changed: 614 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1601 | 1601 | | |
1602 | 1602 | | |
1603 | 1603 | | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 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 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
1604 | 1705 | | |
1605 | 1706 | | |
1606 | 1707 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
10 | 16 | | |
11 | 17 | | |
| 18 | + | |
12 | 19 | | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
16 | 23 | | |
17 | 24 | | |
18 | 25 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
24 | 31 | | |
25 | 32 | | |
26 | 33 | | |
| |||
31 | 38 | | |
32 | 39 | | |
33 | 40 | | |
34 | | - | |
35 | | - | |
| 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 | + | |
| 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 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
36 | 124 | | |
37 | 125 | | |
38 | 126 | | |
39 | 127 | | |
40 | 128 | | |
41 | 129 | | |
42 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
43 | 135 | | |
44 | 136 | | |
45 | 137 | | |
| |||
49 | 141 | | |
50 | 142 | | |
51 | 143 | | |
52 | | - | |
| 144 | + | |
53 | 145 | | |
| 146 | + | |
54 | 147 | | |
55 | 148 | | |
56 | | - | |
| 149 | + | |
57 | 150 | | |
58 | 151 | | |
59 | 152 | | |
60 | 153 | | |
61 | 154 | | |
62 | 155 | | |
63 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
64 | 163 | | |
65 | 164 | | |
66 | 165 | | |
67 | 166 | | |
68 | 167 | | |
69 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
70 | 172 | | |
71 | 173 | | |
72 | 174 | | |
73 | 175 | | |
74 | 176 | | |
| 177 | + | |
| 178 | + | |
0 commit comments