All guides

Integration guide

Connect Facebook Pages to Hermes Agent or OpenClaw with Composio

Identify the right managed Page, read its current content, prepare a reviewed update, publish only after approval, and verify the provider result.

Start with the Page, not the post

Imagine asking your agent to announce a changed opening time. The risky part is not drafting one sentence; it is selecting the correct Page, preserving the approved wording, and proving where the update landed. Composio's current Facebook toolkit supports Facebook Pages, not personal profiles, and separates Page discovery, reading, posting, comments, insights, and messaging into distinct actions.

1. Connect the Facebook user who manages the Page

The hosted steps are identical for Hermes Agent and OpenClaw. Open Dashboard → Integrations, choose Facebook, select Connect, and complete the Meta authorization screen. Review the Pages and permissions shown there. The connected Facebook user must already have sufficient Page access; connecting an account cannot grant a Page role that does not exist.

Keep Meta passwords, two-factor codes, and tokens out of agent chat. If the integration later cannot publish or read engagement, verify the user's current Page access and reconnect when permissions have changed.

2. Resolve the target with a read-only prompt

Use my connected Facebook account. List every Page I can manage, with Page name and Page ID, then show the five latest posts for the Page named Northwind Workshop. Do not post, comment, react, message, update settings, or delete anything.

Replace the example Page name with yours. The current toolkit documents FACEBOOK_LIST_MANAGED_PAGES, FACEBOOK_GET_PAGE_DETAILS, and FACEBOOK_GET_PAGE_POSTS. The agent should run composio connections, then composio search facebook for the live schemas. Never infer a Page ID from its public URL or reuse one from an older conversation.

3. Review the exact write and its destination

  1. Ask for a draft with the target Page name and ID printed above it.
  2. Review factual claims, dates, links, mentions, media rights, and any local-time wording.
  3. Approve the final text and media as a single package.
  4. Allow one write using the action whose current schema matches the content type.
  5. Read the new post back from the Page and return its post ID or permalink.

Plain updates use FACEBOOK_CREATE_POST; photo workflows have FACEBOOK_CREATE_PHOTO_POST and FACEBOOK_CREATE_MULTI_PHOTO_POST. The presence of separate actions is a reason to inspect the schema, not to guess which fields accept an upload. Do not use deprecated video actions when the current search returns another supported route.

Comments, messages, and moderation need a policy

Read before replying. FACEBOOK_GET_COMMENTS, FACEBOOK_GET_PAGE_CONVERSATIONS, and FACEBOOK_GET_CONVERSATION_MESSAGES can gather context. Writes such as FACEBOOK_CREATE_COMMENT and FACEBOOK_SEND_MESSAGE speak publicly or directly as the Page. Define which routine questions the agent may answer, what it must escalate, and which topics always need review. Billing disputes, threats, account details, legal claims, and unclear complaints should not receive improvised automatic responses.

Insights are also scoped to the Page and the provider's available metrics. Use FACEBOOK_GET_POST_INSIGHTS or FACEBOOK_GET_PAGE_INSIGHTS, record the requested reporting window, and describe missing data rather than inventing zeros. A successful Composio call means the provider returned a response; only a follow-up read establishes that the intended write is visible on the correct Page.

Self-hosted setup for Hermes Agent and OpenClaw

For an installation you run yourself, create a server in your own Composio project, select this app and the tools you need, and connect the intended account. Copy the complete generated MCP URL for that user. The examples below use Composio Platform MCP and a Composio project API key in x-api-key. An app password or provider API key belongs in the app connection flow, not in this header.

Set COMPOSIO_API_KEY in the environment of the agent process and replace the URL placeholder below. Merge the entry into your existing configuration. Keep your project key out of chat and source control. A connection on OpenClaw Launch does not automatically transfer to your own Composio project; Composio connections are scoped to their project and user.

Hermes Agent

Add the server under mcp_servers in ~/.hermes/config.yaml. You can set the environment variable in ~/.hermes/.env.

mcp_servers:
  composio:
    url: "YOUR_GENERATED_PLATFORM_MCP_URL"
    headers:
      x-api-key: "${COMPOSIO_API_KEY}"
    connect_timeout: 60
    timeout: 180

Run hermes mcp test composio to check discovery, then start a new session or use /reload-mcp in the Hermes CLI. See the Hermes MCP configuration reference for reload behavior and tool filters.

OpenClaw

Use a release with the native openclaw mcp commands. Its server definitions belong under mcp.servers in ~/.openclaw/openclaw.json:

{
  "mcp": {
    "servers": {
      "composio": {
        "url": "YOUR_GENERATED_PLATFORM_MCP_URL",
        "transport": "streamable-http",
        "headers": {
          "x-api-key": "${COMPOSIO_API_KEY}"
        }
      }
    }
  }
}

Ensure the Gateway service receives the environment variable, restarting that service after changing its environment. Run openclaw mcp doctor composio --probe and begin a new agent session. If your version lacks these commands, update before using this config. The native registry is separate from mcporter. See OpenClaw's MCP reference and HTTP transport fields.

Discovery confirms the MCP connection. Finish with this guide's first read request to check access to the actual app. The hosted composio shell commands earlier in this guide are supplied by OpenClaw Launch; a standalone MCP setup exposes tools through the agent's MCP client instead.

Frequently asked questions

Does the Facebook Composio integration work with Hermes Agent?

Yes. The managed connection and action workflow are identical for Hermes Agent and OpenClaw on OpenClaw Launch.

Can the integration post to my personal Facebook profile?

No. The current Composio Facebook toolkit supports Facebook Pages, not personal accounts. Select a Page the connected Facebook user is allowed to manage.

How do I prevent posting to the wrong Page?

Begin by listing managed Pages, display the chosen Page name and ID in the approval request, and pass only the current schema fields after approval. Read the post back from that Page before reporting success.

Can an agent automatically answer every comment or message?

The tools can support replies and messages when Page permissions allow them, but automatic sending needs a clear policy, escalation rules, and a review boundary for sensitive or ambiguous conversations.

Related guides

Connect Facebook to your managed agent

Use the same integrations dashboard with a Hermes Agent or OpenClaw instance.

Open Integrations