Social media
- Slack
- Typefully
- Notion
A Slack-based social media agent that drafts posts and threads for X, LinkedIn, Threads, Bluesky, and Mastodon through Typefully, manages the publishing queue, and pulls briefs from Notion.
- Slack
- Typefully
- Notion
agent/agent.tstypescriptimport { defineAgent } from "eve";
/**
* Root agent runtime configuration.
*
* @remarks
* Sets the model and the session budget for the Typefully social media agent; the rest of the agent's surface
* (channels, connections, tools, skills, subagents) is discovered from the filesystem under
* `agent/`. Conversation history is compacted once it reaches 75% of the context window, and the
* per-session token limits cap runaway sessions. Raise them if long content work hits the caps.
*/
export default defineAgent({
compaction: { thresholdPercent: 0.75 },
limits: {
maxInputTokensPerSession: 500_000,
maxOutputTokensPerSession: 20_000,
},
model: "anthropic/claude-sonnet-5",
});
Typefully Social Media Agent eve Template
A Slack-based social media agent built on eve. Team members @mention it in Slack and it runs their social presence through Typefully: drafting posts and threads for X, LinkedIn, Threads, Bluesky, and Mastodon, scheduling and managing the publishing queue, uploading media, reading analytics, and pulling briefs from Notion. Long-form pieces are shared as Notion pages.
- Lives in Slack. Answers @mentions and DMs, replies in threads, and renders approvals as buttons.
- Works on your Typefully account. The connection authenticates with your Typefully API key (
TYPEFULLY_API_KEY), so drafts and scheduling run against your real workspace. Plain drafting is friction-free; scheduling or publishing a post (publish_at) and deleting drafts, comments, or threads pause for approval before they run. - Pulls from and drafts into Notion. Briefs and source material come from Notion pages through the same user-scoped OAuth flow, long-form pieces are drafted back as pages, and page updates and moves are gated on approval.
- Stores files in Vercel Blob. Export threads, save images and attachments, and read them back, authenticated by the project's OIDC token.
- Posts a weekly analytics digest. Every Monday it pulls Typefully post and follower analytics and posts two tables to a Slack channel you choose (
TYPEFULLY_ANALYTICS_CHANNEL).
Deploy
Deploying with the button provisions everything the agent needs and wires it up for you:
- a Slack connector (sets
SLACK_CONNECTOR, with the event trigger pointed at/eve/v1/slack), - a prompt for your Typefully API key (sets
TYPEFULLY_API_KEY), - a Notion connector (sets
NOTION_CONNECTOR), - a Vercel Blob store for the asset tools.
Once deployed, @mention the bot in your Slack workspace to start working on your social posts.
Tech stack
One secret to manage. Slack and Notion authenticate through Vercel Connect, and Vercel Blob and AI Gateway through Vercel OIDC — no keys to manage for any of them. The one credential you supply is the Typefully API key, set as the TYPEFULLY_API_KEY environment variable in the Vercel project (and in .env.local for local development).
Quick start with an AI coding agent
If you're working with an AI coding agent like Claude Code or Cursor, you can use this prompt to have it help you with building your agent:
What's inside
Pairing with the content agent template
The eve content agent template is a full content assistant with a house voice and style skills for long-form surfaces this agent doesn't cover (blog posts, release notes, newsletters). Instead of merging all of that into this agent, you can deploy it as its own agent and let this one delegate to it through eve's remote agents feature.
- Deploy the content agent template as its own Vercel project.
- Add a remote subagent file to this repo. The filename is the tool name, and
vercelOidc()handles deployment-to-deployment auth with no shared secret:
- Set
CONTENT_AGENT_URLin this project's environment and mention the new subagent inagent/instructions.mdso the agent knows when to hand off.
The remote agent runs in its own deployment with its own skills and connections, and it never sees this agent's conversation history, so this agent packs everything the writer needs into the call message. The result comes back as a normal tool result, the same shape as the local researcher and reviewer subagents.
Local development
Link the project you deployed (or a fresh one) and pull its environment:
Then run the development server and link a model provider with /model in the TUI:
You can chat with the agent directly in the dev TUI to test the Typefully, Notion, and Blob flows. The Slack surface itself only runs against a deployment. Ship changes with:
Linting and formatting
This project uses Ultracite (a Biome preset) for linting and formatting:
Setting up the connectors by hand
The Deploy button provisions these for you. To set them up manually (for a project you didn't create with the button), use the Vercel CLI:
Customizing
- Behavior: edit
agent/instructions.md. It describes the whole workflow: load the right skill first, ground work in the user's real social sets and drafts, draft freely but schedule and delete only on approval, draft long pieces into Notion, and get a fresh-eyes review before proposing a draft. - Approval gates: edit the approval policy in
agent/connections/typefully.ts(theDELETE_TOOLS/PUBLISH_TOOLSlists and thepublish_atcheck) and theAPPROVAL_REQUIRED_TOOLSlist inagent/connections/notion.tsto change which MCP tools pause for a human decision. - Skills: edit or add skills in
agent/skills/. Each folder holds aSKILL.mdplus its reference files. The five*-styleskills carry per-platform guidance and abanned-words.jsonthat thelint_against_styletool checks drafts against;writing-qualitycarries the generic prose rules. The reviewer subagent keeps its own identical copy ofwriting-qualityunderagent/subagents/reviewer/skills/. - Model: edit
agent/agent.ts(or run/modelin the dev TUI). - Tools: add or change tools in
agent/tools/. The filename is the tool name. - Weekly analytics digest: set
TYPEFULLY_ANALYTICS_CHANNELto the Slack channel id it should post to. Change the day or time inagent/schedules/weekly-analytics.ts(the cron is evaluated in UTC), and editagent/tools/post_analytics_report.tsto change the report format. In dev, trigger a run withcurl -X POST http://localhost:3000/eve/v1/dev/schedules/weekly-analytics.
The agent auto-updates as you edit these files.
Learn more
- eve documentation: the framework powering this agent.
- Vercel Connect: manages the Slack and Notion credentials.
- Typefully: the social publishing platform the agent works through.
- Vercel Blob: object storage for the asset tools.