# LangChain Social Media Agent: Automated Post Generation with Human Review

> LangChain's social-media-agent is a TypeScript LangGraph workflow that takes a URL, drafts Twitter and LinkedIn posts from its content, and holds them for human approval before scheduling. It is a practical template for teams who want AI-drafted social content without fully removing human judgment.

**langchain-ai/social-media-agent** — 📲 An agent for sourcing, curating, and scheduling social media posts with human-in-the-loop.

- Repository: https://github.com/langchain-ai/social-media-agent
- Stars: 2,812 · Forks: 508
- Language: TypeScript
- License: MIT
- Published: 2026-09-24 · Updated: 2026-09-24 · Language: en
- Canonical page: https://hysenlabs.com/projects/langchain-ai-social-media-agent

## What the social-media-agent does and who it is designed for

The social-media-agent takes a URL as input and produces draft posts for Twitter and LinkedIn. A human-in-the-loop flow handles authentication with the social platforms and lets the user review, edit, accept or reject each generated post before it is scheduled or published. The agent is aimed at developer teams and content teams who want to reduce manual drafting time while retaining editorial control.

The README distinguishes between a basic setup and a full setup. The basic mode supports web scraping via FireCrawl and social post generation, but it cannot parse content from GitHub, Twitter or YouTube URLs, does not ingest data from Slack, and has no image selection or upload capability. The full setup adds Google Vertex AI for YouTube video content, Supabase for image storage, a Twitter developer account for media uploads, a LinkedIn developer account for posting, and an optional Slack integration for ingesting post ideas from a Slack channel.

This distinction matters for adoption decisions. A team that wants only text posts from general web URLs can get started with four API keys. A team that needs images, Slack-driven content sourcing or GitHub content parsing needs to work through a longer setup before the agent is useful.

## LangGraph workflow and human-in-the-loop design

The agent is built on LangGraph, which is LangChain's framework for constructing stateful, multi-step workflows. The workflow runs as a server process managed by the LangGraph CLI. Each run is triggered by passing a URL, which the agent scrapes using FireCrawl, summarizes using the Anthropic LLM, and uses to draft platform-specific posts.

The human-in-the-loop mechanism, called HITL in the README, pauses the workflow after drafts are generated and routes them to an Agent Inbox, a separate UI the README describes as a viewer for inspecting and approving runs. The user can make changes to the draft text, accept it, or reject it. Only accepted posts proceed to scheduling.

Cron scheduling is built into the project. The scripts directory contains create-cron.ts, delete-cron.ts and list-crons.ts scripts to manage recurring runs. Running yarn cron:create triggers the scheduled post creation flow.

The LangGraph server itself is started locally with:

```bash
yarn langgraph:in_mem:up
```

Under the hood this executes the @langchain/langgraph-cli dev command on port 54367. Once the server is running, generating a post is a single command:

```bash
yarn generate_post
```

Output can be inspected in LangSmith or in the Agent Inbox. LangSmith tracing is optional but the README notes that a LangSmith API key is required to run the LangGraph server locally.

## Installing and configuring the agent

The agent requires Node.js with Yarn and Python with pip. Start by cloning the repository:

```bash
git clone https://github.com/langchain-ai/social-media-agent.git
```

Move into the directory and install Node dependencies:

```bash
cd social-media-agent
yarn install
```

Copy the quickstart environment file and fill in the required API keys:

```bash
cp .env.quickstart.example .env
```

The quickstart .env needs ANTHROPIC_API_KEY for LLM generations, FIRECRAWL_API_KEY for web scraping, ARCADE_API_KEY for social media authentication and scheduling, and optionally LANGSMITH_API_KEY with LANGSMITH_TRACING_V2=true for tracing.

You also need to install the LangGraph CLI separately:

```bash
pip install langgraph-cli
```

For posting to a LinkedIn organization rather than a personal account, the README requires setting POST_TO_LINKEDIN_ORGANIZATION=true and providing the LINKEDIN_ORGANIZATION_ID from the company page URL. The README gives a concrete example: if the company URL is linkedin.com/company/12345678/admin/dashboard/, the ID is 12345678.

## Authentication approaches: Arcade versus raw developer accounts

The agent supports two mutually exclusive authentication methods for social platforms. Using Arcade is the quickest path: create an Arcade account, obtain an API key, and set TWITTER_USER_ID and LINKEDIN_USER_ID in .env. Arcade handles the OAuth flows on your behalf. Setting USE_ARCADE_AUTH=true in .env activates this path.

The alternative is to use your own Twitter and LinkedIn developer accounts directly. This requires a Twitter developer account for reading tweet content and uploading media, and a LinkedIn developer account for posting. The README describes this as more involved but notes it gives you direct control over the credentials without routing through a third-party service.

You cannot use both methods simultaneously. The choice affects more than credentials: Arcade integration is what enables cron scheduling through the agent's scripts, while the raw developer account path requires implementing your own scheduling logic.

For GitHub content parsing, a GitHub personal access token is needed and set as GITHUB_TOKEN. For Slack content ingestion, a Slack app with read permissions is required.

## Limitations and cases where this tool is not the right fit

The basic setup explicitly excludes image handling. If your social posts require images, you need the full setup with Supabase configured and a Twitter developer account with media upload permissions. The README lists this as a known gap in the quickstart flow.

The agent generates posts using Anthropic's API. Teams already committed to a different LLM provider would need to modify the graph code; the README does not describe a provider-agnostic configuration. The pyproject.toml for the Slack integration also lists langchain-openai as a dependency, meaning the Slack component uses OpenAI rather than Anthropic, which may complicate cost tracking or vendor policy.

LangSmith is described as required for the LangGraph server local run, which introduces a dependency on a hosted service even for local development. Teams that need a fully air-gapped setup cannot use this agent as documented.

Content sourced from Twitter or YouTube URLs requires the full setup. Teams whose content pipeline feeds primarily from those platforms cannot use the basic mode.

The Slack messaging component is a separate Python project in slack-messaging/ with its own pyproject.toml, uv.lock and FastAPI server. Setting up the full Slack integration requires running two separate services.

## Comparing this agent to n8n social posting workflows

n8n is a workflow automation platform that offers pre-built nodes for Twitter, LinkedIn and other social networks, and can be self-hosted. An n8n workflow for social posting is configured through a visual editor and does not require writing TypeScript, but it also does not provide an LLM-native human-in-the-loop review step by default.

LangChain's social-media-agent is code-first: the graph is defined in TypeScript, prompts live in the src directory, and customization means editing source files. The README includes a Customization section describing how to modify prompts and post style. This approach is more work to set up initially but gives developers full control over the generation logic.

The Agent Inbox review step is a key differentiator. n8n supports approval steps through its Wait node, but they require custom configuration. The social-media-agent ships with the HITL flow as a first-class part of the workflow.

The social-media-agent is best for teams already invested in the LangChain and LangGraph ecosystem. Teams without that investment may find n8n's lower code overhead more practical.

## Maintenance and project status

The last push was on 2026-09-18, which is within two weeks of today. The repository is not archived and shows active development. The repository has no tagged GitHub releases, so there is no versioned changelog to track breaking changes.

The pyproject.toml for the Slack component pins several security-related floors explicitly, including starlette at 0.49.1 or later to address CVE-2025-62727 and CVE-2025-64439, urllib3 at 2.6.3 or later, and cryptography at 46.0.5 or later. The comments in pyproject.toml explain the rationale for each pin, which is a useful indicator of maintenance attention. The project is licensed under MIT.

## Conclusion

LangChain social-media-agent is a good starting point for a developer team that already uses the LangChain ecosystem and wants to automate first drafts of social posts with a human-in-the-loop gate. It requires Anthropic API access, a LangSmith account for the server runtime, and either Arcade or direct Twitter and LinkedIn developer accounts. The basic setup works without GitHub, Slack or image handling; those features require additional API credentials and account setup. Before adopting it for production use, verify that your team has the required accounts and that the Arcade authentication flow covers the social platforms you need, because removing Arcade in favour of raw developer credentials adds significant configuration overhead.

## FAQ

### What is the LangChain social-media-agent?

It is a TypeScript LangGraph workflow that takes a URL as input, scrapes its content using FireCrawl, drafts Twitter and LinkedIn posts using an Anthropic LLM, and presents them for human review before scheduling. The README describes it as an agent for sourcing, curating, and scheduling social media posts with human-in-the-loop.

### Can I run the LangChain social-media-agent for free?

The repository is open-source under MIT, but running it requires paid API keys: Anthropic for LLM generation, FireCrawl (with 500 free credits for new users as noted in the README), and Arcade for social media authentication. LangSmith offers a free tier. The total cost depends on usage volume.

### Does the social-media-agent support platforms other than Twitter and LinkedIn?

The README describes Twitter and LinkedIn as the two supported publishing targets. The Slack integration is for ingesting content ideas into the agent, not for publishing posts.

### What does human-in-the-loop mean in this agent?

After the agent drafts a post, the workflow pauses and routes the draft to an Agent Inbox where a human can review, edit, accept or reject it. Only accepted posts proceed to scheduling. This step is built into the LangGraph workflow and cannot be bypassed without modifying the graph code.

## Sources

- [Issues](https://github.com/langchain-ai/social-media-agent/issues)
- [langchain-ai/social-media-agent on GitHub](https://github.com/langchain-ai/social-media-agent)
- [License: MIT](https://github.com/langchain-ai/social-media-agent/blob/main/LICENSE)
- [README](https://github.com/langchain-ai/social-media-agent/blob/main/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/langchain-ai-social-media-agent
