Learn how to automate complex tasks using QuantaLogic's intelligent agent system, combining multiple tools and reasoning capabilities.
Overview
Task automation enables your agent to:
- Process web content
- Analyze and summarize information
- Integrate multiple tools
- Perform multi-step reasoning tasks
importosfromquantalogicimportAgentfromquantalogic.console_print_eventsimportconsole_print_eventsfromquantalogic.console_print_tokenimportconsole_print_tokenfromquantalogic.toolsimport(LLMTool,MarkitdownTool)# Set API keyos.environ["OPENAI_API_KEY"]="your-openai-key"# Define model and toolsMODEL_NAME="gpt-4o-mini"agent=Agent(model_name=MODEL_NAME,tools=[MarkitdownTool(),LLMTool(model_name=MODEL_NAME,on_token=console_print_token),],)
# Analyze and summarize latest AI researchresult=agent.solve_task(""" 1. Read the latest news about AI from arxiv.org 2. Select the top 5 articles based on impact 3. Summarize key points of each article """,streaming=True)print(result)
# Comprehensive research taskresult=agent.solve_task(""" 1. Research emerging AI technologies 2. Compare different machine learning approaches 3. Create a summary report with pros and cons """,streaming=True)print(result)
# Summarize complex documentsresult=agent.solve_task(""" 1. Read a long research paper 2. Extract key findings 3. Write an executive summary """,streaming=True)print(result)
importosfromquantalogicimportAgentfromquantalogic.console_print_eventsimportconsole_print_eventsfromquantalogic.console_print_tokenimportconsole_print_tokenfromquantalogic.toolsimport(LLMTool,MarkitdownTool)# Set API keyos.environ["OPENAI_API_KEY"]="your-openai-key"# Initialize agent with task automation toolsMODEL_NAME="gpt-4o-mini"agent=Agent(model_name=MODEL_NAME,tools=[MarkitdownTool(),LLMTool(model_name=MODEL_NAME,on_token=console_print_token),],)# Configure event monitoringagent.event_emitter.on(event=["task_complete","task_think_start","task_think_end","tool_execution_start","tool_execution_end",],listener=console_print_events)# Execute a complex taskresult=agent.solve_task(""" 1. Read the latest news about AI from arxiv.org 2. Select the top 5 articles based on impact 3. Summarize key points of each article """,streaming=True)print(result)
Task Complexity
Start with simple tasks and gradually increase complexity.