Skip to content

Phase 3: Flow 2 - Recommendation Engine #11

@jaydee829

Description

@jaydee829

Phase 3: Flow 2 - Recommendation Engine (A2A & MCP)

Goal: Build a user-facing agentic system using A2A for collaboration and MCP for data tools.

  • Architecture Strategy:
    • Hybrid Access: Flow 1 (ETL) remains on direct SQLAlchemy for performance. Flow 2 (Agents) uses MCP.
    • Coarse-Grained Tools: MCP tools encapsulate complex logic (e.g., Search + Filter in one call) to ensure ACID compliance and reduce agent-tool chatter.
  • Order of Work:
    1. MCP Server Implementation:
      • Expose the Postgres/pgvector database as an MCP server.
      • Implement coarse-grained tools like find_recommendations and log_suggestion.
    2. Experiment: Search Strategies:
      • Implement internal search tool using google-genai.
      • Implement standalone search service with A2A interface.
      • Compare results in MLFlow.
    3. Intelligent Filter Agent:
      • Implement re-read logic and duplicate avoidance via find_recommendations.
    4. Trope-RAG Justification Engine:
      • Build "Justification Prompts" that anchor the LLM's reasoning in retrieved trope facts.
    5. A2A Agent Mesh:
      • Coordinate Search, Filter, Rank agents via A2A messaging.
  • Packages: langchain, fastmcp, a2a-sdk (or equivalent LF implementation), google-genai.
  • Files/Classes:
    • src/agentic_librarian/mcp/server.py: [NEW] FastMCP server defining tools like get_similar_tropes, check_read_status.
    • src/agentic_librarian/agents/a2a_mesh.py: [NEW] Agent discovery and communication logic following A2A spec.
    • src/agentic_librarian/agents/specialized/: Individual agent logic for search, filter, and rank.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions