Overview1Single Request2Fixed Assistant3Real Tools4Multiple Agents5Approval Gatessoon6Agents Review Agentssoon



Part 3 of the series "The Stages of AI Use in Detail" – Stage 4: Multiple agents with separate roles. An overview of all six stages can be found in the introductory article.

Continued from Part 2: More tool calls were running at the same time, and that is exactly what became the problem.

Not every gap in the pipeline shows up right away – some only surface just before the finish line. That is what happened with a fully prepared Halloween dessert post: On October 30 it was put on hold with the note "Duplicate: article 257 already ran on Oct 27 and 29." No checking program had raised an alarm – it was only noticed during the review before approval. The pipeline had two independently working parts that both thought they had been the first to have the good idea. This moment shows why more tool access alone is not enough: Without a place that keeps the overview, several agents end up working past each other. When people hear that ketovavaria.de runs its social media channels "automatically", they usually picture a bot that comes up with its own topics and cheerfully posts away. The reality is more sober and, I think, also more interesting: It is not an autonomous AI doing the posting, but a pipeline with several checkpoints and one control point where I have the final say.

What this is about:

  • Who has which task in the pipeline – from the social agent to the posting program
  • How a post moves from the first preview through my approval to publication
  • Which mishaps occurred, above all the Halloween duplicate, and which rules came out of them
  • Why this stays at A2 on the MIT autonomy scale

Not a Black Box, but a Chain of Responsibilities

The social media automation for ketovavaria.de, my blog for pescatarian keto recipes, consists of several specialized agents plus a small Python program that carries out the actual publishing step. A social agent writes the texts for each platform, a designer agent supplies the matching image, and a dedicated writer agent takes over long-form copy when needed. A coordinator agent combines text and image into a preview and manages the queue. A developer agent builds and repairs the technical pipeline when something gets stuck. According to the process, only I can approve posts and activate the global live switch. The role model is built so that no agent is supposed to publish behind my back – none of them has that task, and every approval is documented with my name.

Architecture of the ketovavaria.de social pipeline: the social, designer and writer agents feed into the coordinator agent; once I approve, the Python publish program posts to Instagram, Facebook, X and Pinterest. The developer agent builds and repairs the program.
The roles in the pipeline – from the social agent to the global live switch. Tap to open the diagram at full size.

What the Bots Post To

Four channels are active: Instagram, the Facebook page, X and Pinterest. For each approved post, the image, text, alt text and a desired publication time are stored, and the program then posts automatically at the requested time. Since October 24, 2026, videos can be published as well, i.e. Instagram Reels and Facebook videos. The first video deployment was a launch video that went live on Instagram and Facebook – X was still blocked at the time.

The adapter for X had been written well before that, including OAuth2 authentication, text and image upload, and automatic token refresh. Even so, it stayed switched off for a long time because API access was missing. That access is now in place, and X posts along with the others. The second hurdle remains: whenever kidneys are mentioned, the mandatory disclaimer has to go into the text, and it quickly collides with the 280-character limit. This is not solved with an exception but through validation: if an X text including the disclaimer does not fit into 280 characters, it is blocked and has to be shortened. Pinterest had the same kind of hurdle with its access token – that has since been fixed, and the channel posts along too.


◉
Instagram


f
Facebook


X
X


P
Pinterest

From Topic Suggestion to Finished Preview

Every post starts with a content preview. The social agent writes the texts to suit each platform: for Instagram, visually driven with three to five hashtags and a clear call to action; for X, shorter with one or two hashtags. The designer agent takes care of the image; the social agent itself therefore produces neither images nor longer article texts, but concentrates on the social formats. The coordinator bundles text and image into a preview, which I look at before anything heads toward publication.

Approval Is Not a Formality

This is where what is called "human in the loop" comes in: a person deliberately sits in the automated flow as the checking and decision-making authority, not just as an onlooker. Only when I explicitly confirm the preview with an OK does the process continue – the iron rule of the entire pipeline: no approval, nothing happens. Why this is handled so strictly is explained in the article on AI hallucinations. Technically, this is secured by a gate made of three conditions, and nothing gets past it without the status approved. How this gate interacts with the scheduled invocation is the topic of Part 4.

What this looks like day to day is shown by the real editorial calendar of ketovavaria.de in the backend – with scheduled, approved and published posts per day, sorted by platform icons.

Editorial calendar of ketovavaria.de for calendar week 46: weekly view with scheduled, approved and published social media posts per day, tagged by platform (backend interface in German).
The editorial calendar for week 46 – 21 slots, every status at a glance (the backend itself is in German).

The Queue: Every Post Has a File

A post doesn't just land "somewhere"; it gets its own dated queue folder with a status file, an image file and the text files for each platform. The sequence is fixed: every new entry starts in the status draft. After my OK on the preview, the texts and alt text are checked against the content rules, which I describe in the next section. Only then is the status set to approved – with a note of who granted the approval and when. This note always names me; it serves traceability, not the distribution of approval rights.

After that, the status moves on: after posting it is set to published, to partial if only some of the channels worked, or to failed if the run failed. The status cancelled does not arise during posting; it is set by hand to stop a post before it is due.

Validation: the Content Bouncer

Before a post is approved and published, the pipeline checks it against a fixed set of content rules. Errors block publication. These include the disclaimer "Nicht als medizinischer Rat zu verstehen" ("not to be taken as medical advice") whenever kidneys are mentioned, a ban on healing or benefit claims such as "hilft" (helps), "heilt" (heals), "schützt" (protects) or "nierenfreundlich" (kidney-friendly), strict adherence to the pescatarian line (no meat, no bacon, no ham – except when meat explicitly appears in the text as a debunked myth), a ban on direct affiliate links, mandatory alt text for images, no inline link in Instagram texts (link in bio applies there), and the 280-character and two-hashtag limit on X. A test shows that the validator works reliably: a test text deliberately written to break the rules produced six errors when checked.

The Actual Publishing Run

Only once I have approved a post does the small Python program take over. What happens then is unspectacular, and that is exactly the point. Every run goes through the same five stations, shown here as a sequence:

Sequence diagram of a publishing run: the systemd timer wakes the Python program. It uploads the image to the media library and gets the public URL back, creates a media container via the platform API, polls its status, publishes via media_publish, receives a post ID or error 9007, and finally writes the entry on the links page.
The timeline of a single run, station by station. Tap to open the diagram at full size.
Station 1 · Scheduled invocation

A timer starts a run every five minutes, and the program checks which approved entries are due. How the timer is set up is described in Part 4.

Station 2 · Making the image publicly accessible

For Instagram, the image is first made publicly accessible via the media library, because the Instagram API strictly requires an image URL and does not accept a local file.

Station 3 · Creating the container and waiting

Next, the program creates a media container on the platform and queries its processing status before starting the publishing attempt. For images, the pipeline waits up to 60 seconds; for Reels, up to about ten minutes, because videos need significantly more processing time. Waiting is no guarantee: Instagram sometimes still reports a container as not ready even afterwards. For this case there is a dedicated retry logic, more on that further below.

Station 4 · Publishing

Only then is the post published. For each channel, the pipeline writes the result – status, link and post ID – to a results log and a log file.

Station 5 · Updating the links page

Each post has a target article on ketovavaria.de, unless it is deliberately marked as "no link". This target article is used to automatically update the page ketovavaria.de/links/, which the "link in bio" on Instagram points to.

Mishap 1: The Post Without a Target Article

Anyone who has read Part 2 already knows the first mishap: one post was missing its target article, the links page was not updated, and anyone arriving via "link in bio" couldn't find the matching article. Since October 27, 2026, the target article has therefore been mandatory. The program looks for it in the text itself, and if it is still missing after that, validation fails – except for posts that I deliberately mark as "no link".

Mishap 2: The Halloween Post and the Duplicate

The introduction already touched on the case; here are the details: the Halloween dessert post sat fully prepared in the queue, scheduled for October 31, but not yet approved. During the review before approval, it turned out that the same article had already run twice in the days before. This was recorded as an entry in the post's file, in a single matter-of-fact sentence:

The actual note from October 30 (original in German)
Duplikat: Artikel 257 lief am 27. und 29.10. bereits
(Duplicate: article 257 already ran on Oct 27 and 29)

The post was first put on hold and withdrawn entirely on November 1. No checking program wrote that note: validation had not flagged anything – and couldn't have, because the pipeline has no automatic duplicate detection so far. The duplicate was noticed at the point where all drafts converge, not at the source.

The rule that came out of it: for the time being, duplicates are caught by hand. Before approval, the coordinator and I check whether an article has recently been linked already. Automatic duplicate detection is on the list.

Mishap 3: The False Token Alarm

At one point, the pipeline reported "IG-Token ungültig" ("IG token invalid"). The token was valid. The cause lay in the check itself: it had queried the Instagram login via the general Facebook Graph endpoint instead of Instagram's own endpoint – it was simply asking the wrong server.

The check is part of the daily token maintenance, which runs on its own timer; how the scheduled parts of the pipeline work together is shown in Part 4. The rule from the false alarm: a warning about an IG token is only a real problem once Instagram's own endpoint confirms it. Switching the check itself over to that endpoint has not been completed yet.

Built-in Robustness: What the Pipeline Catches on Its Own

Besides my approval, the pipeline has safeguards that kick in without my involvement. The manual kill switch – from the global live switch to turning off the timer – is covered in Part 4.

Retries: Instagram reports error 9007, "media not ready yet", conspicuously often. It occurs when the pipeline tries to publish a container that Instagram has not finished processing – even if it waited beforehand. Since October 25, 2026, retry logic waits briefly in this case and tries again; the details are in Part 4. That is no guarantee, but it is an error the pipeline resolves without me – unlike the duplicate above, which needed a place with an overview, not just patience.

Idempotent reruns: For failed or only partially successful runs, the pipeline skips, on the next attempt, the channels on which the post has already appeared successfully. A run is therefore idempotent: repeating it does not create duplicate posts.

File lock: A manually started publishing run and the timer run share the same file lock. It ensures that the two never work on the queue at the same time. Skipping channels that have already been posted to is independent of this.

Redaction: Tokens never appear in plain text in any log or warnings file; all output first passes through a redaction function.

Backups: Before every code change to the pipeline, a dated backup copy is created. If a change goes wrong, a rollback to the last working state is possible at any time.

What I Measure About the Impact – and What Is Still Open

There is also a separate measurement script that only reads and posts nothing itself. It produces a funnel report from Instagram, the Facebook page and X with metrics such as impressions, link clicks, profile visits and, for Facebook, page actions as well, optionally also broken down per post. By default it covers the last seven days, but it can be set to selectable periods going back a maximum of 30 days. If a platform API doesn't deliver a value, the script enters an empty value with a reason in an error list – nothing is estimated or filled in. X was already provided for in the script before the channel went live; there are no reliable impact figures yet for any of the three channels.

What I Hand Over at This Stage – and What I Keep

I hand over coordinating every single step myself – I no longer follow in detail which agent is doing what at any given moment. I keep the one moment where everything comes together before it goes live. The Halloween duplicate also shows the limit of this stage, though: the pipeline does not detect duplicate topics on its own; so far only the coordinator and I catch them before approval. What has long stopped being manual work, on the other hand, is the triggering: a timer starts the runs every five minutes without me lifting a finger – and still nothing goes out that I have not approved. How automatic starts and manual approval fit together is shown in Part 4 of this series.

Conclusion

What runs at ketovavaria.de is not an autonomous bot swarm, but a conservatively built pipeline with clear roles, several checkpoints and me at the decisive point. Mandatory approval, validation, retry logic, idempotent reruns and rollback via backup copies are in operation and proven. Every mishap of the past few weeks has led to a clear rule, but for two of them the rule is still manual work rather than code: the coordinator and I check for duplicates by hand before every approval, and the token check has not yet been switched over to Instagram's own endpoint. It also remains open whether the posts bring more people to the recipes; reliable data and a fixed weekly routine for measuring insights are still missing. On the MIT autonomy scale, the pipeline therefore remains at A2 Delegated: the agents work in multiple steps within firmly defined access and permissions, but none of them decides on publishing itself. Small A3 elements exist only in technical subtasks such as the automatic retry on error 9007.

Sources