Agent
Publishing from an agent
What the conversation looks like, and what happens underneath.
You say what to post. The agent calls list_accounts, then publish. You never see an id.
Publishing is not instant. publish returns 202 with a post id, targets sit in publishing, and the agent polls get_post until each target is published or failed.
A full round trip
1. list_accounts -> [{ id: "acc_01H...", platform: "threads", status: "active" }]
2. publish -> { id: "post_01H...", status: "publishing" }
3. get_post -> targets[0].status === "publishing"
4. get_post (4s later) -> targets[0].status === "published", url: "https://..."
5. reply -> answers the post (replyTo omitted)
6. list_replies -> the thread, including that reply
7. reply + replyTo -> answers that reply, one level deeperWhat can I actually say to it?
These are ordinary sentences, not commands. The agent picks the tools; you do not name them.
What channels do I have connected? Post this to Threads: shipped nested replies today. Split this into a thread and post it, break it wherever it reads best. Post it and tell me once it is really up. Grab the image at that link and post it with this caption. I have the photo on my laptop, give me somewhere to upload it. How did yesterday's post do? Show me the replies on that post and answer the ones asking about pricing. Hide that reply. Delete the post I put up an hour ago. How much of today's posting allowance is left?
Common questions
How long does publishing take?
publish comes back immediately with 202 and a post id, and the channels finish afterwards. The agent polls get_post until every target has left publishing.
What happens if the text is too long for one of the channels?
Nothing is published anywhere and no rows are created. The check runs before anything goes out, because a post that landed on two channels out of three is harder to clean up than one that was refused.
Is it safe to retry twice?
Yes. retry_post only touches targets that failed and skips the ones that already went out, so a second call cannot double-post.