Skip to content

refactor: consume agenternal-pkg instead of local memory modules #77

@hdviettt

Description

@hdviettt

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

  1. pip install -e ../agenternal-pkg in backend venv
  2. Delete backend/memory/ directory
  3. Split backend/db/models.py — keep User, Notification, UserSettings only, import Base from package
  4. Update backend/main.py:
    • Add agenternal.configure(...) call in lifespan
    • Wire on_notification and get_memory_config callbacks
  5. Update all api/*.py to import from agenternal.*
  6. Update agent/graph.py tool imports
  7. Update requirements.txt — add agenternal dependency, remove packages now owned by the package
  8. Test everything

Risk

  • Circular imports from lazy imports — verify at runtime
  • Notification callback wiring must match existing signature

Depends on: hdviettt/agenternal-pkg#4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions