Prompt
Instructions for the linkedin_writer agent: when handed a webinar record (title, date, speakers, 3 takeaways), write a LinkedIn post inviting operations managers to register. Around 120 words, name the speakers, include the date and timezone, end with the registration link. Call get_brand_memory first, then draft_post with networks ['linkedin'] and schedule_post for 7 days before the event at 09:00. How to do it
- Mint a key Create a key with draft and schedule permissions, scoped to LinkedIn.
- Connect Open MCPServerStreamableHttp with url https://app.socialhandoff.com/mcp and an Authorization header in an async context.
- Attach to the specialist Pass the server in mcp_servers on linkedin_writer only, and set it as a handoff from your main agent.
- Run Run with Runner.run and inspect the trace for the draft_post and schedule_post calls.
- Approve The post waits as pending in the inbox until someone approves it.
Example draft
Running a warehouse where every week has a different peak? On October 16 at 16:00 CET, Maya Okafor and Tom Lindqvist are walking through how they plan labor for weeks they cannot predict. You will leave with: A way to forecast from 3 weeks of data instead of 3 years. A shift template that absorbs a 20% swing without overtime. The one report they check every morning. 45 minutes, with time for questions. Register here: https://example.com/webinars/peak-planning
Gotchas
- Pass the timezone to schedule_post. The event time in the post text and the publish time are separate, and both should be checked in review.
- Line breaks are kept on LinkedIn, but markdown lists are not rendered. Plain lines read cleanest.
- LinkedIn joins any thread into one post and carries one image. Design the agent's output for a single post.
- Character limit: 3,000 characters for a post. The feed shows the first few lines and hides the rest behind a see more link.
- Media per post: LinkedIn allows multi-image posts, documents, and video. SocialHandoff publishes 1 image per post.
- Alt text: Supported on images through the API's alt text field. Not available for video or documents.
- Threads: LinkedIn has no threads. If a draft has several parts, SocialHandoff joins them into one post.
Frequently asked questions
Can the agent read post analytics?
With the analytics permission, get_insights returns per-post metrics where LinkedIn provides them. Best-time suggestions are labeled heuristics.
What stops the agent from spamming drafts?
Per-account daily limits, duplicate protection, and your instructions. The inbox shows every draft, and you can revoke the key at any time.