HomeGenie
LEARN — Documentation

Multi-Agent Newsroom

Agentic Workflows

So far, we've seen the AI generate single, self-contained widgets and background scripts. But what happens when a task is too complex for a single script? What if we want to build a true Agentic Workflow, where specialized AI agents collaborate, pass data to each other, and report back to a manager?

Welcome to the bleeding edge of HomeGenie 2.0. In this example, we use Gemini Automan to create a fully unattended "News Agency".

The Concept

Instead of writing complex C# threading logic by hand, we will use Vibe Coding to describe a corporate hierarchy:

  1. A Director (a persistent background daemon) that wakes up every 60 minutes.
  2. A Scout (a temporary worker) tasked with crawling the web for raw RSS feeds and saving them to a shared folder.
  3. A Chief Editor (a temporary worker) tasked with reading the raw data, asking the built-in AI to summarize it, and publishing a clean Markdown file to the UI.

Here is the exact prompt we sent to Automan:

I want you to act as the Director of a news agency. You must orchestrate a team of two helpers to do a job automatically once every 60 minutes.

  1. Create a "News Scout" agent: It must fetch RSS feeds from BBC and ANSA. Extract the raw text from the working feeds and save it to a file named 'raw_news.txt' inside the 'SharedAutomanWorkspace'. Once done, emit 'Completed' status to terminate itself cleanly.
  2. Create a "Chief Editor" agent: It must read the 'raw_news.txt' file from the 'SharedAutomanWorkspace'. Then, it MUST use the pure text completion API (Prompt.Ask) to summarize the content into a clean Markdown list of the "Top 10 most important facts of the day". Save this AI summary into a Markdown file named 'top10_news.md' in the same shared workspace. Expose this file on the UI so I can open it from the settings, and emit 'Completed'.
  3. You, as the Director, must run as a persistent daemon. In your Main loop, orchestrate the agents using native threading: first trigger the "News Scout" using Program.WithName().Run() and wait for it with Program.WaitFor(). Once the Scout is finished, trigger the "Chief Editor" and wait for it. Repeat this cycle every 60 minutes.

The Orchestration in Action

Once the prompt is submitted, the magic unfolds live on the HomeGenie dashboard.

Automan orchestrating the Scout and Editor agents

Here is what happens under the hood, completely autonomously:

  1. The Director Takes Charge: Automan generates the Director program (1044). The Director immediately uses the Prompt.Schedule API to commission the creation of its two sub-agents, waiting patiently for the AI to compile them.
  2. The Scout Gathers Intel: Once generated, the Director triggers the Scout (1045). The Scout goes online, downloads the XML feeds, parses the text, and writes it to a secure, shared workspace (SharedAutomanWorkspace). Once done, it emits a Completed signal and the system gracefully puts it back to sleep.
  3. The Editor Synthesizes: The Director, sensing the Scout is done, wakes up the Chief Editor (1046). The Editor reads the heavy text file and calls the Prompt.Ask API—effectively an AI asking another AI to process data. The Editor receives the summary, formats it in Markdown, saves it, and goes to sleep.

Integrated UI Delivery

The most impressive part of this workflow isn't just the background orchestration; it's the seamless delivery of the final product to the user.

Reading the AI-generated Markdown file directly from the UI

Because we instructed the Editor to expose the file on the UI, HomeGenie automatically generated a configuration card. With a single click on the settings icon, we can open the top10_news.md file directly in HomeGenie's native editor and read our freshly baked, AI-summarized daily news.

Inspect, Package, and Share

This example proves that HomeGenie is a true Multi-Agent Operating System. But it doesn't stop at generation.

Once Automan creates these specialized sub-agents, they are not black boxes. You can open any of them in the HomeGenie code editor, inspect the C# logic they generated, and tweak them manually.

Even better, these agents are fully integrated into HomeGenie's packaging system. Did you ask the AI to create a brilliant "News Agency" workflow? You can group the Director and its sub-agents together, click Create Package, and share the archive with the community. Other users can import your AI-generated agency into their HomeGenie setup with a single click, instantly expanding their system's capabilities without writing a single line of code.


📥 Download Resources

Want to run your own News Agency? Download the archive and the chat history below to inspect how Automan structured the C# logic for these three cooperating agents.

menu_open Browse Content
forum Users Forum