DEV Community

Manoj Kumar
Manoj Kumar

Posted on

I Connected Two AI Agents to a Newsroom with Switch. Here's What Actually Happened.

#ai

I Connected Two AI Agents to a Newsroom with Switch. Here's What Actually Happened.

How I built a Researcher–Skeptic workflow, debugged a missing agent response, and learned to make AI collaboration more reliable.

By Manoj Kumar Dadala | Flip the Switch Hackathon 2026

From talking to AI agents to working with them

Most of my experience with AI agents began in individual coding sessions.

I would give an agent a task, wait for its response, review the output, and decide what to do next.

That works when one person is controlling one agent.

But real teams work differently.

A task appears in a shared conversation. Different people contribute information, challenge assumptions, and make decisions. The relevant context needs to remain visible to everyone.

I wanted to explore what happens when AI agents join that process.

That's what drew me to Switch.

Switch connects AI agents to team-chat applications so they can participate in shared rooms alongside people.

For the Flip the Switch Hackathon, I used it to experiment with an AI-assisted newsroom called TruthDesk.

The goal was simple:

One human editor, two AI agents, one shared investigation.

What followed taught me some unexpected lessons about AI-agent orchestration.

1. Understanding the Switch workflow

Switch brings agents into a collaborative environment.

Instead of interacting with an agent only through its own terminal or application, a team can communicate through an existing chat platform.

Switch provides the connection between the conversation and the agent.

For my project, the components were:

Component Responsibility
Mattermost Shared newsroom conversation
Switch Room association, message ingestion, and agent routing
Researcher Investigates claims and identifies evidence
Skeptic Challenges interpretations and missing context
Human editor Reviews findings and makes decisions
TruthDesk Independently verifies quotations and prepares evidence reports

One distinction is important: Switch is the collaboration layer; TruthDesk is the evidence-verification application I built around that collaboration.

They solve different problems.

2. Setting up my first newsroom

I worked with a local Switch environment and Mattermost.

I created a newsroom channel called:

truthdesk-newsroom

The next step was associating the Mattermost channel with a Switch room and making the agents available to that room.

I used two separate agent identities:

  • truthdesk-researcher
  • truthdesk-skeptic

Why two agents?

Because I didn't want two assistants producing similar summaries.

I wanted two different responsibilities.

Researcher: Examine the claim and identify relevant source material.

Skeptic: Challenge the Researcher's interpretation and identify conclusions that go beyond the source.

The intended conversation was:

Human editor
    |
    | Posts an investigation request
    v
Mattermost newsroom
    |
    | Connected through Switch
    v
Researcher + Skeptic
    |
    | Return their findings
    v
Human reviews the discussion
Enter fullscreen mode Exit fullscreen mode

The room provides the shared context for this collaboration.

It also makes the interaction inspectable: the human can see what was requested and what each agent actually said.

A useful lesson for beginners

Before configuring multiple agents, verify one simple interaction.

  1. Create or select your chat channel.
  2. Associate it with a Switch room.
  3. Make one agent available in that room.
  4. Send a short request addressed to that agent.
  5. Confirm an actual response appears.
  6. Only then introduce a second agent.

Don't start by debugging a complex multi-agent task.

First prove that the basic message path works.

For installation and configuration, start with the official Switch resources.

3. Giving the agents a real task

I chose a newsroom investigation because it naturally requires multiple perspectives.

For testing, I used a fictional city-council notice involving electric scooters.

The claim suggested that a city had banned all electric scooters.

The synthetic source document actually described something narrower: rental scooters were restricted on one street during particular hours.

That difference made the investigation useful.

The Researcher's responsibility was to identify what the source supported.

The Skeptic's responsibility was to challenge an interpretation that extended the restriction to every scooter across the city.

During earlier testing, I observed authentic Researcher and Skeptic activity in the Mattermost newsroom.

This was the first meaningful milestone.

The agents were participating in a shared environment rather than producing isolated answers in separate sessions.

[Screenshot: Historical Researcher and Skeptic responses in Mattermost]

But observing agent responses also raised another question:

How could I verify the evidence they provided?

4. Adding an independent evidence checker

This is where TruthDesk came in.

I built a Python Evidence Engine that compares agent quotations with separately registered source documents.

For each finding, the system records:

  • Investigation ID
  • Agent identity
  • Source ID
  • Exact quotation
  • Agent conclusion
  • Citation-verification result

The important design choice was keeping agent conclusions separate from source verification.

Consider the synthetic scooter notice.

The original text refers to:

rental electric scooters

Now deliberately change the quotation to:

all electric scooters

The meaning changes.

My Evidence Engine detects that the altered quotation is not present in the registered source.

The original quotation returns VERIFIED.

The modified quotation returns FAILED.

This demonstration uses deterministic synthetic fixtures. It does not imply that the historical agents fabricated those words.

[Screenshot: TruthDesk VERIFIED versus FAILED comparison]

The larger lesson is applicable to other Switch projects.

If your agents produce information that matters, consider what evidence can independently confirm their outputs.

An agent's response is a record of what it said.

It isn't automatically proof that what it said was correct.

5. The debugging incident that changed my understanding

After observing historical agent activity, I tried another Mattermost connectivity test.

The message appeared in the chat channel.

But the expected agent response never arrived.

Initially, this looked like an agent problem.

Perhaps the model had reached a usage limit.

Perhaps the agent instructions were wrong.

Perhaps the mention wasn't recognized.

Instead of guessing, I examined the available message and bridge evidence.

I confirmed that:

  • The Mattermost post existed.
  • Its channel-to-room association was valid.
  • The relevant agent was still a room member.
  • No corresponding Switch message mapping existed for the target post.

Then I found an important log entry:

AgentConnection sweep skipped:
the event loop was blocked for 3712.4s
Enter fullscreen mode Exit fullscreen mode

Switch subsequently reported that its lease had not been renewed in time.

The controller connection closed, the Mattermost delivery consumer stopped, and websocket connections disconnected before the bridge restarted.

That evidence indicated that the target request had failed at the ingestion stage.

The agent wasn't merely refusing to answer.

There was no evidence that it had been invoked for that post.

I also found a separate Researcher usage-limit event, but it belonged to a different message.

That distinction matters.

Blaming the target failure on quota would have been an unsupported conclusion.

What this taught me

A message appearing in Mattermost proves that Mattermost stored it.

It does not prove that Switch imported it.

A message existing inside Switch does not necessarily prove an agent executed.

An agent producing output does not prove the output is correct.

These are separate stages requiring separate checks.

6. A troubleshooting checklist for new Switch builders

When an agent doesn't respond, investigate in this order.

Check Question
Chat platform Was the message actually posted?
Channel association Is the intended channel connected to the expected Switch room?
Room membership Is the target agent available in that room?
Ingestion Did Switch receive the post?
Addressing Was the intended agent identified?
Execution Did an agent invocation occur?
Provider Was execution blocked by authentication, connectivity, or usage limits?
Response Was the output delivered back to the conversation?

The key is locating the first stage without evidence of success.

For example:

If Mattermost stored the message but Switch never ingested it, changing the agent prompt is unlikely to solve the problem.

If Switch routed the message but the model provider rejected execution, debugging the bridge is unlikely to solve that problem.

Treat each layer independently.

That's the most practical lesson I learned during this hackathon.

7. Designing for agent failures

The experience changed TruthDesk's workflow design.

Instead of displaying an optimistic status such as “Agent completed,” I added local evidence states:

  • Not Captured
  • Captured Pending Import
  • Imported/Validated
  • Rejected

These statuses represent observed local actions.

They do not claim that Switch successfully delivered a request or executed an agent.

I also preserved original agent messages, source references, and content hashes.

Completed imports are protected against overwrite.

For future automation, I implemented an offline-tested Mattermost read-only connector foundation using documented post-retrieval APIs and explicit author identity mappings.

It is not yet connected to an authorized live Mattermost identity.

That limitation is intentional: I didn't want a demonstration to depend on extracting credentials or bypassing administrative permissions.

8. What I would build differently next time

If I restarted this project, I would organize development around four milestones.

Milestone 1: One reliable agent

Establish one verified request-and-response interaction.

Milestone 2: Two distinct agents

Give the second agent a clear responsibility that improves the human's decision.

Milestone 3: Observable execution

Record which messages were posted, ingested, routed, executed, and answered.

Milestone 4: Independently checked output

Verify important claims or artifacts against evidence the agents don't control.

I would also keep the human approval boundary explicit from the beginning.

For TruthDesk, publication remains refused unless the separate approval requirements are satisfied.

The evidence engine deliberately does not issue a real-world factual truth verdict.

9. What works today

TruthDesk currently has:

  • Historical Switch-mediated Mattermost agent activity.
  • A local Researcher/Skeptic investigation workflow.
  • Deterministic citation verification.
  • Source provenance and SHA-256 hashes.
  • Agent conclusion and conflict reporting.
  • Persistent local workflow states.
  • A synthetic VERIFIED/FAILED demonstration.
  • Human approval and publication-refusal safeguards.
  • An offline-tested Mattermost connector foundation.

The local Python tests passed at the latest reported development checkpoint.

However, the project does not yet have reliable fully automated end-to-end Switch delivery and TruthDesk import.

That is a real limitation of the current prototype.

10. Explore the project

Source code: TruthDesk on GitHub

To run the local dashboard after following the repository's installation instructions:

python -m truthdesk_evidence.dashboard_cli `
  --host 127.0.0.1 `
  --port 8765 `
  --work-dir work\investigations
Enter fullscreen mode Exit fullscreen mode

Open:

http://127.0.0.1:8765/

The synthetic evidence demonstration is available at:

http://127.0.0.1:8765/demo/proof

For your own Switch setup, begin with the official Switch quickstart and resources.

11. The biggest lesson

Before this hackathon, I mostly thought of agent reliability as a question of whether the AI could complete its assigned task.

Building with Switch taught me that reliability starts earlier.

Did the message reach the room?

Did the correct agent receive it?

Did execution happen?

Did the response arrive?

And can we independently verify what the response says?

A team needs answers to all of those questions before it can rely on an AI workflow.

That's what I learned while building TruthDesk.

I still have integration work to finish, but I've come away with a clearer understanding of what trustworthy agent collaboration requires.

A good agent workflow doesn't just produce an answer. It makes the path to that answer observable.


Author:Manoj Kumar Dadala

Project:TruthDesk

Event:Flip the Switch Hackathon 2026

Tags:#Switch #AI #Agents #BuildInPublic

Top comments (0)