For example:
A react agent
from llama_index.core.tools import QueryEngineTool
from llama_index.core.agent import ReActAgent
tool = QueryEngineTool.from_defaults(
query_engine,
name="<name>",
description="<some useful description>",
)
agent = ReActAgent.from_tools([tool], llm=llm, verbose=True)
A context chat engine (either one is similar in terms of creating)
from llama_index.core.chat_engine import ContextChatEngine, CondensePlusContextChatEngine
chat_engine = CondensePlusContextChatEngine.from_defaults(
retriever,
llm=llm,
)