1) how should i think about the distinction between an agent and a workflow?
2) i built a system that querys a simple json file for 1 single CSV (short content). i want to expand on it by adding another JSON file that contains content from a blog (longer). in this case is QueryEngineTool necessary?
main reason for confusion is when I look at the workflow documentation they never use a QueryEngineTool
https://docs.llamaindex.ai/en/stable/examples/workflow/rag/but in the agent cookbooks a bunch of imports are used:
https://github.com/run-llama/python-agents-tutorial/blob/main/5_memory.pyright now i handle it like this without using that import:
try:
# Load appropriate data based on query type
json_data = load_marketing_data() if is_logo_query else load_json_data()
result = await w.run(
query=user_message.content,
list_of_dict=json_data,
llm=llm,
table_name=DEFAULT_TABLE_NAME,
timeout=10
)