Post with AutoGen

Post to social media
with AutoGen.

Register PostLake as one function in AutoGen and any agent in your conversation can publish to every social network — one call, one normalised response it can read and act on. Or connect PostLake's MCP server and skip the registration.

Get started free →

No card for the free tier · one API for every network · full MCP access

The fastest way: ask your agent

Prefer no code at all? Connect PostLake's hosted MCP server to your AI assistant (Claude, ChatGPT, Cursor and others) and just ask it to post. It authorizes over OAuth — no key to paste. See the MCP guide.

Post with AutoGen

This is the whole integration — connect your accounts once in the dashboard, then:

from autogen import ConversableAgent, register_function
import requests

def post_to_social(text: str, platforms: list[str]) -> dict:
    """Publish a post to the given social networks via PostLake."""
    r = requests.post(
        "https://api.postlake.dev/v1/posts",
        headers={"Authorization": "Bearer YOUR_API_KEY"},
        json={"text": text, "platforms": platforms, "profile": "my-brand"},
    )
    return r.json()

register_function(
    post_to_social,
    caller=assistant,      # the agent that decides to post
    executor=user_proxy,   # the agent that runs the call
    description="Publish a post to social networks.",
)

Step by step

  1. Create a PostLake API key (Settings → API Keys) and connect your accounts under a profile.
  2. Define one Python function that POSTs to /v1/posts — the snippet above is all of it.
  3. Register it with register_function, naming the agent that calls it and the agent that executes it.
  4. Run the conversation — when the assistant decides to publish, it gets back one normalised result with each network's live URL.

Good to know

Why PostLake

One call, every network

List the platforms in one request and PostLake posts to all of them, returning a single normalised shape — your code never branches per platform.

No app setup

PostLake manages each network's developer app and OAuth for you — nothing to register or get reviewed yourself.

Agent-safe

Idempotency keys mean a retry never double-posts, and analytics come back normalised so an agent can decide what to post next.

Honest pricing

A free tier to start, then usage-based credits — one per post. You only pay for posts that actually publish.

Common questions

How do I let an AutoGen agent post to social media?

Write one Python function that calls PostLake's /v1/posts endpoint and register it with AutoGen's register_function, naming a caller and an executor agent. The agent can then publish to every network through that single function.

Do I need a function per social network in AutoGen?

No — one function calling PostLake covers every network, so your agent setup stays small and there's no per-platform code to maintain.

Can AutoGen use PostLake over MCP?

Yes. PostLake is an MCP server, so an MCP-capable AutoGen setup can use its posting tools directly instead of registering a custom function.

More guides

Python · Node.js · n8n · Make · Zapier · All guides · Full docs

One API and MCP server for every major network. Free to start.

Get started free →