Tutorial // Marketing2026-07-1513 min read

Create an AI Social Media Manager Agent with Eve.dev

Build an autonomous AI social media manager that researches trends, generates week-long content schedules, and durably posts content over time using Eve.dev.

Varun Raj Manoharan
Varun Raj Manoharan
Eve.devAI Social MediaContent AutomationMarketing AgentTypeScript

Summary

TL;DR: Stop scheduling tweets manually. Use Eve.dev to build an agent that plans an entire week of social media content, stores it in its durable memory, and automatically posts updates day by day.

Content consistency is the hardest part of social media marketing. While you can use LLMs to write 10 tweets, you still have to manually copy-paste them into a scheduling tool.

What if the AI could manage the schedule itself?

Using Eve.dev, we can build a Social Media Manager agent that creates a strategy, drafts content, and uses durable execution to systematically publish posts over several days without requiring a complex web of cron jobs.

Defining the Social Media Agent

Our workspace needs an agent with access to web search (for trends) and a posting API.

TEXT
/eve
  /agents
    /social_media
      instructions.md
      /tools
        get_trending_topics.ts
        post_to_twitter.ts
        wait_until.ts

Step 1: The Persona

In /eve/agents/social_media/instructions.md:

MARKDOWN
# AI Social Media Manager

You manage the Twitter account for a SaaS startup. Your goal is to maintain an active, engaging presence.

## Workflow
1. Use `get_trending_topics` to find out what developers are talking about today.
2. Draft a batch of 3 high-quality tweets based on these trends.
3. Use `post_to_twitter` to post the first one immediately.
4. Use the `wait_until` tool to sleep for exactly 8 hours.
5. Wake up and post the next tweet in your queue.
6. Repeat until the batch is done, then research new topics.

Step 2: The Posting Tool

Create /eve/agents/social_media/tools/post_to_twitter.ts:

TypeScript
import { tool } from '@eve/core';
import { z } from 'zod';
// Assuming a twitter client SDK is installed

export default tool({
  name: 'post_to_twitter',
  description: 'Publishes a text post to the Twitter timeline.',
  schema: z.object({
    text: z.string().max(280)
  }),
  execute: async ({ text }) => {
    console.log(`[Twitter] Posting: "${text}"`);
    // await twitterClient.v2.tweet(text);
    return { success: true, timestamp: new Date().toISOString() };
  }
});

Step 3: Precise Scheduling with wait_until

Instead of waiting a set number of days, let's create a tool that lets the LLM decide exactly what time it should post next.

Create /eve/agents/social_media/tools/wait_until.ts:

TypeScript
import { tool, suspend } from '@eve/core';
import { z } from 'zod';

export default tool({
  name: 'wait_until',
  description: 'Suspends the agent until a specific ISO datetime.',
  schema: z.object({
    isoDateTime: z.string()
  }),
  execute: async ({ isoDateTime }) => {
    return suspend({
      type: 'scheduled_wakeup',
      wakeUpAt: isoDateTime,
      message: `Agent hibernating until ${isoDateTime}`
    });
  }
});

Step 4: Initializing the Agent

To start this autonomous loop, you just need to kick off the agent once.

TypeScript
import { Eve } from '@eve/core';

const eve = new Eve({ workspace: './eve' });

async function startCampaign() {
  const agent = await eve.getAgent('social_media');
  
  // Start the infinite loop
  await agent.run({
    id: 'weekly_twitter_campaign',
    input: "Start a new content cycle. It is currently Monday morning. Focus on AI and TypeScript."
  });
}

The LLM will research, post, and then call wait_until(isoDateTime). The script will gracefully exit. Your backend infrastructure (like a simple worker checking the database every minute) will detect when the target time is reached and call agent.resume(id: 'weekly_twitter_campaign').

The agent wakes up, remembers it has 2 drafted tweets remaining in its context window, posts the next one, and suspends itself again.

Conclusion

By combining the reasoning power of an LLM with the stateful, durable workflow engine of Eve.dev, you can replace entire SaaS scheduling platforms with a few files of TypeScript. The agent isn't just generating text; it's managing the dimension of time.

FAQ

Why not just run the agent on a Cron job every 8 hours? If you use a basic Cron job, the agent starts completely blank every time. It wouldn't know what it tweeted yesterday or what strategy it was following. Eve.dev's wait_until keeps the continuous thought process alive across days.

Is it safe to let an AI post directly to social media? For production accounts, you should implement a Human-in-the-Loop tool. Instead of post_to_twitter, use a request_approval tool that sends a Slack message to a human manager with the drafted tweet. Once approved, the agent resumes and posts it.

Available for new projects

Let's build something great.

Have a project in mind? We are an elite software and AI development studio ready to bring your ideas to production. Let's talk about your roadmap.