Reddit Consensus Agent
An autonomous AI agent that provides tasteful insights by analyzing Reddit discussions and community feedback.
Features
- Elegant Console UI: Clean side-by-side dashboard with responsive layout
- Async Parallel Tool Execution: Uses asyncio for fast, concurrent Reddit API calls
- Two-Phase Research: Initial research followed by critical analysis
- Community-Driven: Analyzes real Reddit discussions and user opinions
- Balanced Insights: Provides both pros and cons based on community feedback
- Configurable AI Models: Uses
gpt-4.1-miniby default, but supports other OpenAI models viaconfig.py
Architecture
- Agent State Management: Tracks research progress and findings
- Reddit Tools: Async tools for searching posts and analyzing comments
- Prompt Templates: Centralized prompts for consistent AI interactions
- Parallel Processing: Simultaneous tool execution for faster results
Quick Start
Installation
# Install from PyPI
pip install reddit-consensus
# Or clone and install from source
git clone https://github.com/jashvira/reddit-consensus.git
cd reddit-consensus
uv sync
Interactive Session (Recommended)
# If installed from PyPI
ask-reddit
# If running from source
python ask_reddit.py
The interactive session will:
- Check your API keys (or help you enter them)
- Ask what you'd like insights on
- Analyze Reddit discussions with elegant dashboard
- Show balanced insights with pros/cons
- Offer to answer another query
Programmatic Usage
import asyncio
from reddit_consensus.recommender import AutonomousRedditConsensus
async def main():
agent = AutonomousRedditConsensus()
result = await agent.process_query("Best cafes in Adelaide Hills")
agent.print_results()
asyncio.run(main())
Setup
1. Install Dependencies
uv sync
2. API Keys
You can either set environment variables or enter them when prompted:
Option A: Environment Variables (Recommended)
export OPENAI_API_KEY="your-openai-api-key"
export REDDIT_CLIENT_ID="your-reddit-client-id"
export REDDIT_CLIENT_SECRET="your-reddit-client-secret"
export REDDIT_USER_AGENT="YourApp/1.0 (by /u/yourusername)"
Option B: Enter When Prompted
Run python ask_reddit.py and the interactive session will help you enter credentials.
3. Get API Keys
- OpenAI: https://platform.openai.com/
- Reddit: https://www.reddit.com/prefs/apps/ (create "script" app)
Requirements
- Python 3.11+
- OpenAI API access
- Reddit API credentials
Metadata
Release files for reddit-consensus 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| reddit_consensus-0.1.2.tar.gz | 26.5 kB | With provenance | Details for reddit_consensus-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| reddit_consensus-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for reddit_consensus-0.1.2-py3-none-any.whl |
Total release size: 51.6 kB
Release files / reddit_consensus-0.1.2.tar.gz
| Download URL | reddit_consensus-0.1.2.tar.gz |
|---|---|
| Size | 26.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f7e3e7afed9b760b0a665ceff4d20de870bf2b365d28182d6d2bcc75d591f912
|
|
BLAKE2b-256 checksum How to use checksums |
a95305a2a05dd5cb8e9e220e5dbf74c2b25265aee18f3a35074a29bfe49facd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 8, 2025.
Transparency logRelease files / reddit_consensus-0.1.2-py3-none-any.whl
| Download URL | reddit_consensus-0.1.2-py3-none-any.whl |
|---|---|
| Size | 25.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc9270d6e1899cba92831df29d9d5182eaf0b9b9bd0f8d05f5a97090a8fb9bfb
|
|
BLAKE2b-256 checksum How to use checksums |
afb62b70d48816730b2465ea8c325c97c518e311053a37038df3d39577be079c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 8, 2025.
Transparency logSecurity for reddit-consensus 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for reddit_consensus-0.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 8, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.