Reddit is full of people describing problems out loud. Founders ask what others are building, site owners ask why Google is ignoring their pages, and small business owners ask for help they cannot find elsewhere. Every one of those threads is a chance to be useful, and for a product, a chance to be found.
Doing that by hand does not scale. So for my capstone I built Subreach, an automation system that reads Reddit, decides which threads are worth a reply, writes the reply and posts it. The product it promotes is a SaaS tool.
The interesting part was not the posting. It was deciding how the work should be divided between agents, and what each one is allowed to do. This article walks through that design.
Proof it runs
Both agents running live, combined into one short video.
Refer LinkedIn Article to verify videos
The design in one picture
Subreach is two agents that share the same engine but have opposite jobs.
- Agent 1, the marketing agent, is the only one allowed to mention the product.
- Agent 2, the knowledge agent, is never allowed to mention it. Its only job is to give useful answers to real SEO problems.
Each agent runs in its own Chrome instance, with its own configuration, its own list of subreddits, its own search queries and its own prompt files. They do not share state, so a change to one cannot break the other.
The pipeline both agents follow
Every agent moves a post through the same stages:
- Search. Build Reddit search requests from the subreddit list and query templates, sorted by newest, limited to the last day, 25 results per request and up to 2 pages.
- Raw storage and duplicate check. Save what was fetched, then drop any post that was already commented on, so the same thread is never answered twice.
- AI intent filter. A language model reads the post against the agent's rules and returns a single word, APPROVE or REJECT.
- Queue. Approved posts go into a first-in-first-out queue with their URL, subreddit and timestamps.
- Commenting. A comment is generated for the next post in the queue, then typed and submitted in a logged-in browser session.
- Tracking. Every successful comment is recorded, which feeds the duplicate check on the next cycle.
Data files are append-only, and every model call is logged to a usage ledger, so nothing happens silently.
Agent 1: the marketing agent
Job: promote that one product, and nothing else.
Where it looks. It watches 30 subreddits and searches each one for five query templates: "what are you building", "saas ideas", "today I built", "looking for feedback" and "side project". These are the phrases that tend to show up in threads where sharing your own project is part of the point.
How it decides. The approval step checks every post against a rules file. The rule is deliberately narrow: only approve posts that explicitly invite people to share what they are building, such as a "What are you building?" thread, a build in public thread or a weekly check-in. Founder stories, indirect promotion and plain advice requests are rejected, even when they are on topic. The agent only speaks where self-promotion is welcome.
How it writes. The comment is generated by gpt-4o-mini from a prompt file. That prompt contains a hard rule for the product link: it cannot end a sentence or be followed by punctuation, and it has to flow straight into a lowercase word, so it reads like part of a sentence rather than a pasted ad. The generator checks that the exact link string is present in the output. If it is missing, it retries once at a higher temperature before giving up on that post.
Subreddits monitored (30): r/StartupAccelerators, r/startups, r/smallbusiness, r/GrowthHacking, r/microsaas, r/micro_saas, r/SaaSSolopreneurs, r/SaaS, r/indiehackers, r/buildinpublic, r/ShowMeYourSaaS, r/indie_startups, r/Entrepreneur, r/EntrepreneurRideAlong, r/SideProject, r/SideHustle, r/Startup_Ideas, r/StartupMarketing, r/GrowthMarketing, r/MarketingAutomation, r/ContentMarketing, r/SEO, r/TechStartups, r/IndieDev, r/DigitalMarketing, r/SaaSMarketing, r/Devpreneur, r/Solopreneur, r/NoCode and r/Automation.
Agent 2: the knowledge agent
Job: be genuinely useful to people with SEO problems, with no promotion at all.
Where it looks. It watches 8 subreddits and searches for seven query templates built around real problems: "why is my website not ranking", "google not indexing my site", "sitemap error", "meta description help", "impressions but no clicks", "on page seo help" and "keyword research beginner".
How it decides. It follows the same pipeline, but its goal is different. It looks for people who are stuck on a concrete SEO issue and can be helped with a real answer.
How it writes. Its comment prompt contains an explicit instruction not to promote anything. No product link and no mention of the product, ever, on this track. The writing itself is shaped by a detailed persona file: a 16-item personalization checklist, eight named comment patterns (for example short and direct, or a stack of reasons), a target mix of lengths across a day (roughly 35 percent short, 40 percent medium and 25 percent long) and a list of stock phrases to avoid because they read as machine-written. The aim is that a profile's recent comments read like they came from one consistent person.
Subreddits monitored (8): r/SEO, r/TechSEO, r/Wordpress, r/blogging, r/smallbusiness, r/Entrepreneur, r/digital_marketing and r/webdev.
Why two agents instead of one
Promotion and help pull in opposite directions. A single agent asked to do both has to balance them inside one prompt, and the balance tends to slide toward whichever instruction is stronger. Splitting by intent made each agent simpler to write, simpler to test and simpler to reason about. The marketing agent has one narrow permission. The knowledge agent has one hard prohibition. Neither can quietly drift into the other's job.
Cost-aware model routing
Not every step needs the same model. The filtering step runs on every fetched post and only has to output one word, so it uses gpt-5-nano, set through an environment variable and chosen for cost. Comment generation runs far less often and needs better writing, so it uses gpt-4o-mini. Matching the model to the job kept the running cost down without touching comment quality.
Pacing and reliability
Both agents share the same timing configuration:
- A delay of 60 to 120 seconds between fetching a post and commenting on it
- 3 to 5 minutes between comments
- A 15 minute break after each full cycle
- A randomized wait between subreddits drawn from four tiers, so the rhythm is not a fixed interval
- Exponential backoff when a subreddit fetch fails, and a longer backoff when Reddit returns a rate limit response
Comments are typed into an already logged-in Chrome tab over the Chrome DevTools Protocol using Playwright, with a small per-keystroke delay, and submitted with Ctrl+Enter.
What I learned
- Separate agents by intent, not by task. The same pipeline can serve two very different goals when the rules around it are different.
- A cheap model is enough for a yes or no decision. Save the stronger model for output a person will read.
- Small constraints matter. The link rule and the narrow approval rule did more for quality than any amount of general instruction.
- Configuration over code. Subreddits, queries and timing live in config files, so changing the target audience does not mean touching the logic.
A limitation worth stating
The cost estimate in the filter service applies one flat per-token rate, labelled with older model pricing, to every call. The filter actually runs on gpt-5-nano, which is cheaper, so the logged figure overestimates the real filtering cost. It is a useful ceiling, not an accurate bill, and it is the first thing I would fix next.
Explore the project
The full code, including both agents and their configuration, is on GitHub: github.com/bluntjudg/autopilot
Top comments (0)