repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | --- |
| #2 | title: Breaking Changes in v1.0.0 |
| #3 | description: 'Complete list of breaking changes when upgrading from v0.x to v1.0.0 ' |
| #4 | icon: "triangle-exclamation" |
| #5 | iconType: "solid" |
| #6 | --- |
| #7 | |
| #8 | <Warning> |
| #9 | **Important:** This page lists all breaking changes. Please review carefully before upgrading. |
| #10 | </Warning> |
| #11 | |
| #12 | ## API Version Changes |
| #13 | |
| #14 | ### Removed v1.0 API Support |
| #15 | |
| #16 | **Breaking Change:** The v1.0 API format is completely removed and no longer supported. |
| #17 | |
| #18 | #### Before (v0.x) |
| #19 | ```python |
| #20 | # This was supported in v0.x |
| #21 | config = { |
| #22 | "version": "v1.0" # ❌ No longer supported |
| #23 | } |
| #24 | |
| #25 | result = m.add( |
| #26 | "memory content", |
| #27 | user_id="alice" |
| #28 | ) |
| #29 | ``` |
| #30 | |
| #31 | #### After (v1.0.0 ) |
| #32 | ```python |
| #33 | # v1.1 is the minimum supported version |
| #34 | config = { |
| #35 | "version": "v1.1" # ✅ Required minimum |
| #36 | } |
| #37 | |
| #38 | result = m.add( |
| #39 | "memory content", |
| #40 | user_id="alice" |
| #41 | ) |
| #42 | ``` |
| #43 | |
| #44 | **Error Message:** |
| #45 | ``` |
| #46 | ValueError: The v1.0 API format is no longer supported in mem0ai 1.0.0+. |
| #47 | Please use v1.1 format which returns a dict with 'results' key. |
| #48 | ``` |
| #49 | |
| #50 | ## Parameter Removals |
| #51 | |
| #52 | ### 1. version Parameter in Method Calls |
| #53 | |
| #54 | **Breaking Change:** Version parameter removed from method calls. |
| #55 | |
| #56 | #### Before (v0.x) |
| #57 | ```python |
| #58 | result = m.add("content", user_id="alice", version="v1.0") |
| #59 | ``` |
| #60 | |
| #61 | #### After (v1.0.0 ) |
| #62 | ```python |
| #63 | result = m.add("content", user_id="alice") |
| #64 | ``` |
| #65 | |
| #66 | ### 2. async_mode Parameter (Platform Client) |
| #67 | |
| #68 | **Change:** For `MemoryClient` (Platform API), `async_mode` now defaults to `True` but can still be configured. |
| #69 | |
| #70 | #### Before (v0.x) |
| #71 | ```python |
| #72 | from mem0 import MemoryClient |
| #73 | |
| #74 | client = MemoryClient(api_key="your-key") |
| #75 | result = client.add("content", user_id="alice", async_mode=True) |
| #76 | result = client.add("content", user_id="alice", async_mode=False) |
| #77 | ``` |
| #78 | |
| #79 | #### After (v1.0.0 ) |
| #80 | ```python |
| #81 | from mem0 import MemoryClient |
| #82 | |
| #83 | client = MemoryClient(api_key="your-key") |
| #84 | |
| #85 | # async_mode now defaults to True, but you can still override it |
| #86 | result = client.add("content", user_id="alice") # Uses async_mode=True by default |
| #87 | |
| #88 | # You can still explicitly set it to False if needed |
| #89 | result = client.add("content", user_id="alice", async_mode=False) |
| #90 | ``` |
| #91 | |
| #92 | ## Response Format Changes |
| #93 | |
| #94 | ### Standardized Response Structure |
| #95 | |
| #96 | **Breaking Change:** All responses now return a standardized dictionary format. |
| #97 | |
| #98 | #### Before (v0.x) |
| #99 | ```python |
| #100 | # Could return different formats based on version configuration |
| #101 | result = m.add("content", user_id="alice") |
| #102 | # With v1.0: Returns [{"id": "...", "memory": "...", "event": "ADD"}] |
| #103 | # With v1.1: Returns {"results": [{"id": "...", "memory": "...", "event": "ADD"}]} |
| #104 | ``` |
| #105 | |
| #106 | #### After (v1.0.0 ) |
| #107 | ```python |
| #108 | # Always returns standardized format |
| #109 | result = m.add("content", user_id="alice") |
| #110 | # Always returns: {"results": [{"id": "...", "memory": "...", "event": "ADD"}]} |
| #111 | |
| #112 | # Access results consistently |
| #113 | for memory in result["results"]: |
| #114 | print(memory["memory"]) |
| #115 | ``` |
| #116 | |
| #117 | ## Configuration Changes |
| #118 | |
| #119 | ### Version Configuration |
| #120 | |
| #121 | **Breaking Change:** Default API version changed. |
| #122 | |
| #123 | #### Before (v0.x) |
| #124 | ```python |
| #125 | # v1.0 was supported |
| #126 | config = { |
| #127 | "version": "v1.0" # ❌ No longer supported |
| #128 | } |
| #129 | ``` |
| #130 | |
| #131 | #### After (v1.0.0 ) |
| #132 | ```python |
| #133 | # v1.1 is minimum, v1.1 is default |
| #134 | config = { |
| #135 | "version": "v1.1" # ✅ Minimum supported |
| #136 | } |
| #137 | |
| #138 | # Or omit for default |
| #139 | config = { |
| #140 | # version defaults to v1.1 |
| #141 | } |
| #142 | ``` |
| #143 | |
| #144 | ### Memory Configuration |
| #145 | |
| #146 | **Breaking Change:** Some configuration options have changed defaults. |
| #147 | |
| #148 | #### Before (v0.x) |
| #149 | ```python |
| #150 | from mem0 import Memory |
| #151 | |
| #152 | # Default configuration in v0.x |
| #153 | m = Memory() # Used default settings suitable for v0.x |
| #154 | ``` |
| #155 | |
| #156 | #### After (v1.0.0 ) |
| #157 | ```python |
| #158 | from mem0 import Memory |
| #159 | |
| #160 | # Default configuration optimized for v1.0.0 |
| #161 | m = Memory() # Uses v1.1+ optimized defaults |
| #162 | |
| #163 | # Explicit configuration recommended |
| #164 | config = { |
| #165 | "version": "v1.1", |
| #166 | "vector_store": { |
| #167 | "provider": "qdrant", |
| #168 | "config": { |
| #169 | "host": "localhost", |
| #170 | "port": 6333 |
| #171 | } |
| #172 | } |
| #173 | } |
| #174 | m = Memory.from_config(config) |
| #175 | ``` |
| #176 | |
| #177 | ## Method Signature Changes |
| #178 | |
| #179 | ### Search Method |
| #180 | |
| #181 | **Enhanced but backward compatible:** |
| #182 | |
| #183 | #### Before (v0.x) |
| #184 | ```python |
| #185 | results = m.search( |
| #186 | "query", |
| #187 | user_id="alice", |
| #188 | filters={"key": "value"} # Simple key-value only |
| #189 | ) |
| #190 | ``` |
| #191 | |
| #192 | #### After (v1.0.0 ) |
| #193 | ```python |
| #194 | # Basic usage remains the same |
| #195 | results = m.search("query", user_id="alice") |
| #196 | |
| #197 | # Enhanced filtering available (optional) |
| #198 | results = m.search( |
| #199 | "query", |
| #200 | user_id="alice", |
| #201 | filters={ |
| #202 | "AND": [ |
| #203 | {"key": "value"}, |
| #204 | {"score": {"gte": 0.8}} |
| #205 | ] |
| #206 | }, |
| #207 | rerank=True # New parameter |
| #208 | ) |
| #209 | ``` |
| #210 | |
| #211 | ## Error Handling Changes |
| #212 | |
| #213 | ### New Error Types |
| #214 | |
| #215 | **Breaking Change:** More specific error types and messages. |
| #216 | |
| #217 | #### Before (v0.x) |
| #218 | ```python |
| #219 | try: |
| #220 | result = m.add("content", user_id="alice", version="v1.0") |
| #221 | except Exception as e: |
| #222 | print(f"Generic error: {e}") |
| #223 | ``` |
| #224 | |
| #225 | #### After (v1.0.0 ) |
| #226 | ```python |
| #227 | try: |
| #228 | result = m.add("content", user_id="alice") |
| #229 | except ValueError as e: |
| #230 | if "v1.0 API format is no longer supported" in str(e): |
| #231 | # Handle version error specifically |
| #232 | print("Please upgrade your code to use v1.1+ format") |
| #233 | else: |
| #234 | print(f"Value error: {e}") |
| #235 | except Exception as e: |
| #236 | print(f"Unexpected error: {e}") |
| #237 | ``` |
| #238 | |
| #239 | ### Validation Changes |
| #240 | |
| #241 | **Breaking Change:** Stricter parameter validation. |
| #242 | |
| #243 | #### Before (v0.x) |
| #244 | ```python |
| #245 | # Some invalid parameters might have been ignored |
| #246 | result = m.add( |
| #247 | "content", |
| #248 | user_id="alice", |
| #249 | invalid_param="ignored" # Might have been silently ignored |
| #250 | ) |
| #251 | ``` |
| #252 | |
| #253 | #### After (v1.0.0 ) |
| #254 | ```python |
| #255 | # Strict validation - unknown parameters cause errors |
| #256 | try: |
| #257 | result = m.add( |
| #258 | "content", |
| #259 | user_id="alice", |
| #260 | invalid_param="value" # ❌ Will raise TypeError |
| #261 | ) |
| #262 | except TypeError as e: |
| #263 | print(f"Invalid parameter: {e}") |
| #264 | ``` |
| #265 | |
| #266 | ## Import Changes |
| #267 | |
| #268 | ### No Breaking Changes in Imports |
| #269 | |
| #270 | **Good News:** Import statements remain the same. |
| #271 | |
| #272 | ```python |
| #273 | # These imports work in both v0.x and v1.0.0 |
| #274 | from mem0 import Memory, AsyncMemory |
| #275 | from mem0 import MemoryConfig |
| #276 | ``` |
| #277 | |
| #278 | ## Dependency Changes |
| #279 | |
| #280 | ### Minimum Python Version |
| #281 | |
| #282 | **Potential Breaking Change:** Check Python version requirements. |
| #283 | |
| #284 | #### Before (v0.x) |
| #285 | - Python 3.8+ supported |
| #286 | |
| #287 | #### After (v1.0.0 ) |
| #288 | - Python 3.9+ required (check current requirements) |
| #289 | |
| #290 | ### Package Dependencies |
| #291 | |
| #292 | **Breaking Change:** Some dependencies updated with potential breaking changes. |
| #293 | |
| #294 | ```bash |
| #295 | # Check for conflicts after upgrade |
| #296 | pip install --upgrade mem0ai |
| #297 | pip check # Verify no dependency conflicts |
| #298 | ``` |
| #299 | |
| #300 | ## Data Migration |
| #301 | |
| #302 | ### Database Schema |
| #303 | |
| #304 | **Good News:** No database schema changes required. |
| #305 | |
| #306 | - Existing memories remain compatible |
| #307 | - No data migration required |
| #308 | - Vector store data unchanged |
| #309 | |
| #310 | ### Memory Format |
| #311 | |
| #312 | **Good News:** Memory storage format unchanged. |
| #313 | |
| #314 | - Existing memories work with v1.0.0 |
| #315 | - Search continues to work with old memories |
| #316 | - No re-indexing required |
| #317 | |
| #318 | ## Testing Changes |
| #319 | |
| #320 | ### Test Updates Required |
| #321 | |
| #322 | **Breaking Change:** Update tests for new response format. |
| #323 | |
| #324 | #### Before (v0.x) |
| #325 | ```python |
| #326 | def test_add_memory(): |
| #327 | result = m.add("content", user_id="alice") |
| #328 | assert isinstance(result, list) # ❌ No longer true |
| #329 | assert len(result) > 0 |
| #330 | ``` |
| #331 | |
| #332 | #### After (v1.0.0 ) |
| #333 | ```python |
| #334 | def test_add_memory(): |
| #335 | result = m.add("content", user_id="alice") |
| #336 | assert isinstance(result, dict) # ✅ Always dict |
| #337 | assert "results" in result # ✅ Always has results key |
| #338 | assert len(result["results"]) > 0 |
| #339 | ``` |
| #340 | |
| #341 | ## Rollback Considerations |
| #342 | |
| #343 | ### Safe Rollback Process |
| #344 | |
| #345 | If you need to rollback: |
| #346 | |
| #347 | ```bash |
| #348 | # 1. Rollback package |
| #349 | pip install mem0ai==0.1.20 # Last stable v0.x |
| #350 | |
| #351 | # 2. Revert code changes |
| #352 | git checkout previous_commit |
| #353 | |
| #354 | # 3. Test functionality |
| #355 | python test_mem0_functionality.py |
| #356 | ``` |
| #357 | |
| #358 | ### Data Safety |
| #359 | |
| #360 | - **Safe:** Memories stored in v0.x format work with v1.0.0 |
| #361 | - **Safe:** Rollback doesn't lose data |
| #362 | - **Safe:** Vector store data remains intact |
| #363 | |
| #364 | ## Next Steps |
| #365 | |
| #366 | 1. **Review all breaking changes** in your codebase |
| #367 | 2. **Update method calls** to remove deprecated parameters |
| #368 | 3. **Update response handling** to use standardized format |
| #369 | 4. **Test thoroughly** with your existing data |
| #370 | 5. **Update error handling** for new error types |
| #371 | |
| #372 | <CardGroup cols={2}> |
| #373 | <Card title="Migration Guide" icon="arrow-right" href="/migration/v0-to-v1"> |
| #374 | Step-by-step migration instructions |
| #375 | </Card> |
| #376 | <Card title="API Changes" icon="code" href="/migration/api-changes"> |
| #377 | Complete API reference changes |
| #378 | </Card> |
| #379 | </CardGroup> |
| #380 | |
| #381 | <Warning> |
| #382 | **Need Help?** If you encounter issues during migration, check our [GitHub Discussions](https://github.com/mem0ai/mem0/discussions) or community support channels. |
| #383 | </Warning> |