A workflow demonstrating how the Research Agent can gather, analyze, and synthesize information from various sources.

Quick Start

1

Install Package

First, install the PraisonAI Agents package:

pip install praisonaiagents
2

Set API Key

Set your OpenAI API key as an environment variable:

export OPENAI_API_KEY=your_api_key_here
3

Create Script

Create a new file research_assistant.py:

from praisonaiagents import Agent, Tools
from praisonaiagents.tools import duckduckgo

# Create Research Agent
research_agent = Agent(
    name="ResearchAssistant",
    role="Research Specialist",
    goal="Conduct comprehensive research and analysis",
    instructions="You are a Research Agent",
    tools=[duckduckgo]
)

# Conduct research
response = research_agent.start(
    "Research about AI developments in 2024"
)

# Save research findings
with open('research_report.md', 'w') as f:
    f.write(response)

Understanding Research Process

The Research Agent employs a systematic approach to information gathering and analysis:

  1. Web Search: Uses DuckDuckGo to find relevant sources
  2. Content Analysis: Evaluates source credibility and relevance
  3. Information Synthesis: Combines findings into coherent insights
  4. Report Generation: Creates structured research reports

Features

Web Research

Comprehensive online information gathering.

Content Analysis

In-depth evaluation of sources.

Information Synthesis

Integration of multiple sources.

Report Generation

Structured research documentation.

Example Usage

from praisonaiagents import Agent, Tools
from praisonaiagents.tools import duckduckgo

agent = Agent(instructions="You are a Research Agent", tools=[duckduckgo])
agent.start("Research about AI 2024")

Next Steps

Was this page helpful?