cve-kgrag-db / code /src /agents /__init__.py
DuyTa's picture
Add code/: full CVE-KGRAG project source snapshot
27f6252 verified
Raw
History Blame Contribute Delete
1.01 kB
"""
Agentic Adaptive RAG for CVE-KGRAG.
Components
----------
- agent_config : Central configuration for agent + Mem0
- prompts : All LLM prompt templates (single source of truth)
- memory : Mem0 OSS wrapper for long-term recall
- tools : 3 agent tools (search, traverse_kg, search_web)
- middleware : RAGMiddleware hooks for deterministic policy enforcement
- adaptive_rag : LangGraph state machine with 10 nodes
Usage
-----
from src.agents.adaptive_rag import compile_agent_graph
graph = compile_agent_graph(llm_client, rag_system, graph_service, memory)
state = {"messages": [HumanMessage(content="What is CVE-2021-44228?")],
"mem0_user_id": "session_123"}
for event in graph.stream(state):
print(event)
"""
from src.agents.adaptive_rag import compile_agent_graph, RAGState
from src.agents.memory import CVEKGMemory
from src.agents.tools import create_agent_tools
__all__ = ["compile_agent_graph", "RAGState", "CVEKGMemory", "create_agent_tools"]