Phase 5: Adapt Agenternal to use the shared package
Replace local backend/memory/, backend/db/models.py memory models, and backend/tools/ with imports from the agenternal pip package.
Steps
pip install -e ../agenternal-pkg in backend venv
- Delete
backend/memory/ directory
- Split
backend/db/models.py — keep User, Notification, UserSettings only, import Base from package
- Update
backend/main.py:
- Add
agenternal.configure(...) call in lifespan
- Wire
on_notification and get_memory_config callbacks
- Update all
api/*.py to import from agenternal.*
- Update
agent/graph.py tool imports
- Update
requirements.txt — add agenternal dependency, remove packages now owned by the package
- Test everything
Risk
- Circular imports from lazy imports — verify at runtime
- Notification callback wiring must match existing signature
Depends on: hdviettt/agenternal-pkg#4
Phase 5: Adapt Agenternal to use the shared package
Replace local
backend/memory/,backend/db/models.pymemory models, andbackend/tools/with imports from theagenternalpip package.Steps
pip install -e ../agenternal-pkgin backend venvbackend/memory/directorybackend/db/models.py— keepUser,Notification,UserSettingsonly, importBasefrom packagebackend/main.py:agenternal.configure(...)call in lifespanon_notificationandget_memory_configcallbacksapi/*.pyto import fromagenternal.*agent/graph.pytool importsrequirements.txt— addagenternaldependency, remove packages now owned by the packageRisk
Depends on: hdviettt/agenternal-pkg#4