Find answers from the community

Updated 2 days ago

The Distinction Between an Agent and a Workflow

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.py

right now i handle it like this without using that import:
Plain Text
        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
            )
L
F
4 comments
a workflow can be anything (inclduing an agent). An agent is a more specific implementation

The workflow examples are all mostly lower-level -- they implement the query engine itself for example, instead of using an existing one
does the addition of a loop turn it into an agent? or is that not always the case. like let's say i have an index and store my data, and i add a loop to repeatedly make the LLM retry to drive insights.
I think it just depends on your definition of "agent" -- I would worry less about labels and just build what you need haha

To me, an "agentic application" is anything the involves LLMs making decisions. An "agent" is a specific instance of an "agentic application", that relvolves around tool use, memory, and looping
okok thanks haha
Add a reply
Sign up and join the conversation on Discord