haive.agents.rag.base.agent¶

Base RAG Agent - retrieval-augmented generation.

Uses OpenAI embeddings by default to avoid HuggingFace/CUDA issues.

Classes¶

BaseRAGAgent

Base RAG agent that performs retrieval then answers.

Module Contents¶

class haive.agents.rag.base.agent.BaseRAGAgent¶

Bases: haive.agents.base.agent.Agent

Base RAG agent that performs retrieval then answers.

Uses OpenAI embeddings + FAISS vector store by default. Add documents via add_documents() before querying.

add_documents(documents)¶

Add documents to the vector store for retrieval.

Parameters:

documents (list[langchain_core.documents.Document])

Return type:

None

build_graph()¶

Build: retrieve -> generate answer.

Return type:

langgraph.graph.StateGraph

compile(**kwargs)¶

Compile the RAG graph.

Return type:

Any

model_post_init(__context)¶

Initialize the mixin with state tracking attributes after Pydantic validation.

Parameters:

__context (Any)

Return type:

None