Provides AI agents with Reddit interaction capabilities including post retrieval, commenting, and subreddit monitoring via PRAW.
# Source: https://github.com/agno-agi/agno | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
import json
from os import getenv
from typing import Callable, Dict, List, Optional, Union
from agno.tools import Toolkit
from agno.utils.log import log_debug, log_error, log_info, logger
try:
import praw # type: ignore
except ImportError:
raise ImportError("praw` not installed. Please install using `pip install praw`")
class RedditTools(Toolkit):
def __init__(
self,
reddit_instance: Optional[praw.Reddit] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
user_agent: Optional[str] = None,
username: Opt
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key