Thousands of posts, one five-minute briefing. This is what AI agents can build for diplomats.

A politics student with limited coding experience built a working Telegram discourse-monitoring pipeline in a month. What that means for diplomats, and why checking the output still matters.

Artemios Apostoli Student author

Article · 8 November 2026 · 9 min read

A smartphone on a table showing a Telegram bot conversation
Photo: Lana Codes / Unsplash

Diplomatic desks that track online narratives face a volume problem before they even reach analysis. Telegram channels relating to Russian military activities in Ukraine produce thousands of posts per week, far more than most missions have the staff or resources to sift through. I chose this conflict because it is a hybrid war, and much of it is fought through information warfare and political technology, which leave a paper trail that is easier to track than most other conflicts.

Too Many Posts, Too Few Analysts

Most of this material is in Russian, spread across dozens of channels and published around the clock. Noticing a shift in framing, a sudden rise in escalatory language or several channels pushing the same line at once requires language skills, regional knowledge and time, which usually fall on the same few people who are expected to cover everything else on their desk. For a small mission or a single diplomat, systematic monitoring is therefore often done sporadically or not at all. At an estimated 3,000 posts a week averaging around 120 words each, a desk would need to get through roughly 360,000 words of mostly Russian text every week, almost two-thirds the length of War and Peace.

Why a Politics Student?

I am currently studying Politics, Sociology and East European Studies at UCL, and I volunteer on the AI for Diplomacy project. While I have followed the development of large language models (LLMs) for the last two years and previously built a legal tech prototype for a competition that detects numerical inconsistencies in contracts, my coding experience before this project only extended to reading and understanding code rather than writing it from scratch. Every stage of this pipeline was built by explaining what I wanted to an AI coding tool and checking what it produced.

Through this project, I set out to demonstrate the ability of LLMs to enhance the work of individual diplomats and condense days of analysts' work into a five-minute briefing that diplomats can build and run themselves.

A Five-Minute Weekly Briefing

Over the last month, I built a working discourse tracking pipeline. It scrapes a curated set of Telegram channels, scores claims by who is framed as the aggressor and who is framed as the victim, flags anomalies against a rolling baseline and writes a weekly briefing that a diplomat could read in five minutes.

Flow diagram of the pipeline's six stages: Collect, Score, Flag, Identify, Chart and Brief, each with a one-line description

The channels are drawn from a published academic dataset of war-related Telegram channels on both sides of the conflict [1], meaning that the user does not need to read Russian or spend hours on Telegram themselves. Each post is scored for its rhetoric, including destructive language, escalation signals and in-group versus out-group framing (how each side portrays itself and its opponents), before the pipeline extracts the claims made and the people, places and organisations named, and groups posts by type. All of this feeds into a dashboard with three outputs. The first is a set of 19 analyst charts covering volume, sentiment, escalation language, bot amplification and the novelty of each claim. The second is a plain-language weekly briefing split into coordination and disinformation signals, escalation early warning and situational awareness, with an appendix of translated quotes that tags the propaganda technique used and adds a secondary fact-check. The third is a lighter daily note comparing the last 24 hours to the previous month. The aim is to surface patterns and propaganda techniques rather than to referee the factual claims of the war.

How It Was Built: Agents, Skills and Loops

Screenshot of the Russian Discourse Monitor dashboard showing a weekly diplomat briefing with coordination and escalation sections

I built the pipeline using Claude Code, Anthropic's agentic coding tool, which can carry out coding tasks on its own. Three of its features stood out: agents, skills and loops. An agent is an instance of the AI given a task and the tools needed to complete it, such as reading and editing files or running tests, which it then carries out with limited supervision. A skill is a saved procedure the AI can follow again without being re-explained, such as how to compile a report or label the people and places mentioned. A loop is a repeated cycle in which the AI proposes a change, tests it against a fixed set of rules and either keeps or discards it before moving to the next cycle. Together, they let me describe what I wanted at a conceptual level rather than write most of the pipeline by hand.

To build the pipeline, I relied on Claude Code's agents to write and modify each component, its skills to encode repeatable procedures such as running the scraper or launching the dashboard, and its loop feature to test and refine each change before I reviewed it.

In practice, my role was to describe each stage in plain terms, including what it should take in, what it should produce and what would count as an error, before reviewing the result. The rules that the loop tested against are part of the project itself, in the form of a suite of automated tests and a set of data checks that flag problems such as missing values, outdated statistics or records that no longer link up.

For example, once the main stages were in place, I used a prompt along the lines of: "/loop Smoke-test this pipeline end-to-end. Verify that all of the code works with minimal bloat. Produce a full log of anything you do. Use subagents liberally. Use Graphify to search the codebase. Stop once you can run this pipeline without any bugs, issues or inconsistencies." Here, a smoke test is a quick end-to-end run to check that nothing breaks, subagents are extra agents working in parallel and Graphify maps how the files in the code connect. Claude Code then ran the pipeline, split the checks between subagents, fixed what it found and repeated the cycle until it ran cleanly, leaving me with a log to review rather than code to write.

Catching My Own Bias

A diplomat does not need to code to use a tool built this way. They need to be able to specify a problem precisely enough for an AI to produce a working first version, and enough subject knowledge to know when that version is wrong.

My own pipeline was not exempt from that last point. It initially scored discourse from pro-Russian channels only, a reasonable starting scope for the case study but not a defensible one for a tool meant to inform judgement rather than confirm it. On review, I found that the in-group and out-group scoring itself was asymmetric, measuring hostility convincingly in one direction and barely at all in the other. I addressed this by broadening the channel set to include pro-Ukrainian and opposition sources and correcting the underlying scoring logic, although this depended on me identifying the asymmetry myself rather than the pipeline flagging it. This is the exact limitation that I need to emphasise for anyone attempting similar projects – the democratisation of coding does not mean that all AI-generated code will be suitable for real-world use. Checking the code and the output of my project is what kept it a legitimate tool, rather than a sycophantic echo chamber.

Discourse and narrative monitoring is not a new field, and my intention was never to reinvent the wheel. Civil society organisations and research groups have tracked Russian state media and Telegram networks for several years, and academic work has applied sentiment and propaganda-technique analysis to political text for well over a decade, including a large-scale study analysing over 750,000 Russian pro-government media articles from 2000 to 2022 to trace the dynamics of anti-Western and anti-Ukrainian propaganda [2]. My own pipeline does not meet that standard of academic rigour. It draws on five years of posts from a curated sample of Telegram channels rather than a twenty-year archive, its briefings only cover the most recent few weeks, and it has not been peer reviewed. My intention is to demonstrate a capability rather than to substitute for research of that depth.

Scope and Limits

While the pipeline draws on five years of historical data from each channel, its briefings focus on the last few weeks, and after the initial download every run only processes new messages, so a weekly update never needs to start from scratch. For comparison, reading the five-year archive by hand, at an estimated 3,000 posts a week and one minute per post, would take around 13,000 hours, or more than six years of full-time work.

This is a demonstration of what can be done rather than a tool intended for practical use, so it has not been tested by diplomats or analysts.

The Barrier Is No Longer Technical

The main takeaway is that this was built in a month by a politics student with limited coding experience, which has major implications for narrow, specialised uses in diplomacy, particularly by less technical staff. While I am conscious of the IT restrictions diplomats work under, I urge them to consider building small, highly specialised tools of their own wherever a specific informational need is not already being met. The barrier is no longer technical skill, it is knowing precisely what the tool needs to do and being able to articulate that clearly enough for an LLM to build it correctly, while still offering sufficient oversight.

That freedom comes with a responsibility that sits with the diplomat, not the LLM. Having researched AI adoption in the legal industry, I believe that AI must complement professional judgement rather than replace it, especially where a single unchecked hallucination (an AI confidently inventing information) can cause significant reputational damage. A dozen self-built tools spread across different desks create a validation problem that nobody currently owns: who checks that a pipeline's logic is sound, or that its output is treated as one analyst's source rather than an institutional verdict? I was only able to catch the bias in my own pipeline because I built the whole thing and understood every stage of it. A tool built the same way by someone with less subject knowledge than I had would be just as easy to build and much easier to trust wrongly.

Beyond Telegram and Ukraine

I hope this project encourages diplomats to consider using AI for open-source intelligence (OSINT), as well as to responsibly automate repetitive parts of their workflows so that they can prioritise the tasks that require their judgement. Since the channel list is a simple spreadsheet and each stage can be rerun on its own, the same approach could be adapted to other channels, conflicts or languages, and the code is open source for anyone who would like to do so.

A New Baseline Skill for Diplomats

This is why I would encourage diplomats to engage with the process of how these tools are built, not just with their output. The useful skill is not learning to code, but learning enough about AI capabilities to ask the right questions of anything built this way: what it was tested against, what it checks before accepting a change and who reviewed its blind spots before its conclusions reached a report. Hopefully that judgement will become a baseline diplomatic skill in the same way that critically reading an intelligence assessment already is. I offer this project as a concrete answer to what that looks like in practice.

The code and setup instructions are available on GitHub (https://github.com/a-apo/russian-discourse-monitor) for anyone who would like to try the tool, and once the Telegram and Anthropic API credentials are in place, the dashboard launches with a double-click.

Perspectives are the authors' own views and do not represent their governments or institutions.

References

  1. [1] Kyrychenko, R. (2025) 'Russian and Ukrainian War-related Telegram Channels' [Data set]. Zenodo. Available at: https://zenodo.org/records/16949193 (CC BY 4.0)
  2. [2] Kyrychenko, R. and Salnikova, S. (2022) 'Dynamics of aggressive discourse on Ukraine and the West in the Russian pro-government media in 2000-2022', European Journal of Transformation Studies, 10(2), pp. 172-191. Available at: https://zenodo.org/records/15586448