Guide for integrating Reddit search capabilities with PraisonAI agents, including API setup and configuration
export REDDIT_USER_AGENT=[USER]
export REDDIT_CLIENT_SECRET=xxxxxx
export REDDIT_CLIENT_ID=xxxxxx
[USER] in this format script:APP:v1.0(by/u/USERNAME)
pip install praisonai langchain_community praw
export OPENAI_API_KEY="Enter your API key"
from praisonaiagents import Agent
from langchain_community.tools.reddit_search.tool import RedditSearchRun
agent = Agent(name="RedditSearchAgent",instructions="Search Reddit for information", tools=[RedditSearchRun],)
agent.start("Search Reddit for information about the latest AI advancements in subreddit all")
from praisonaiagents import Agent, Task, PraisonAIAgents
from langchain_community.tools.reddit_search.tool import RedditSearchRun
agent = Agent(name="RedditSearchAgent",instructions="Search Reddit for information", tools=[RedditSearchRun],)
task = Task(description="Search Reddit for information about the latest AI news in subreddit all", agent=agent)
agents = PraisonAIAgents(agents=[agent],tasks=[task])
agents.start()
tools.py
from langchain_community.tools.reddit_search.tool import RedditSearchRun
agents.yaml
framework: crewai
topic: research about the causes of lung disease
roles:
research_analyst:
backstory: Experienced in analyzing scientific data related to respiratory health.
goal: Analyze data on lung diseases
role: Research Analyst
tasks:
data_analysis:
description: Gather and analyze data on the causes and risk factors of lung
diseases.
expected_output: Report detailing key findings on lung disease causes.
tools:
- 'RedditSearchRun'
Guide for integrating Reddit search capabilities with PraisonAI agents, including API setup and configuration
export REDDIT_USER_AGENT=[USER]
export REDDIT_CLIENT_SECRET=xxxxxx
export REDDIT_CLIENT_ID=xxxxxx
[USER] in this format script:APP:v1.0(by/u/USERNAME)
pip install praisonai langchain_community praw
export OPENAI_API_KEY="Enter your API key"
from praisonaiagents import Agent
from langchain_community.tools.reddit_search.tool import RedditSearchRun
agent = Agent(name="RedditSearchAgent",instructions="Search Reddit for information", tools=[RedditSearchRun],)
agent.start("Search Reddit for information about the latest AI advancements in subreddit all")
from praisonaiagents import Agent, Task, PraisonAIAgents
from langchain_community.tools.reddit_search.tool import RedditSearchRun
agent = Agent(name="RedditSearchAgent",instructions="Search Reddit for information", tools=[RedditSearchRun],)
task = Task(description="Search Reddit for information about the latest AI news in subreddit all", agent=agent)
agents = PraisonAIAgents(agents=[agent],tasks=[task])
agents.start()
tools.py
from langchain_community.tools.reddit_search.tool import RedditSearchRun
agents.yaml
framework: crewai
topic: research about the causes of lung disease
roles:
research_analyst:
backstory: Experienced in analyzing scientific data related to respiratory health.
goal: Analyze data on lung diseases
role: Research Analyst
tasks:
data_analysis:
description: Gather and analyze data on the causes and risk factors of lung
diseases.
expected_output: Report detailing key findings on lung disease causes.
tools:
- 'RedditSearchRun'