AWS for M&E Blog

How Bundesliga built Captain, an AI agent for fans, using Amazon Bedrock

On matchday 29 of Bundesliga’s 2025–2026 season, Bayern Munich walked into St. Pauli carrying 100 goals, just one short of a record that had stood for over half a century. The legendary Bayern squad of 1971–1972, Gerd Müller, Franz Beckenbauer, and Uli Hoeneß, had set the bar at 101, a mark long considered untouchable. Then, in the 53rd minute, Leon Goretzka scored to make it 102, and the 54-year-old record was broken. But Bayern wasn’t done. By the final whistle, they had buried St. Pauli 5–0, pushing the season tally to 105 and turning a broken record into something extraordinary.

That story alone is remarkable. But the numbers tell an even bigger story: Goretzka’s record-breaking goal was among the top 40% of fastest successful shots of the season, taken from only 9.5 meters (more than 31 feet) out. And the 2025–2026 Bayern squad didn’t just outscore the legends of 1971–1972, they also conceded 11 fewer goals. These are insights most fans would never find on their own. That’s why Bundesliga built Captain.

Captain is an agentic AI companion built by Bundesliga Media and embedded inside the official Bundesliga app. It’s a single conversational interface for everything a football fan needs, from live stats and historical trivia to tactical analysis and video highlights.

But Captain doesn’t wait to be asked. It continuously analyzes milestone moments as they unfold while AI agents detect and surface the most relevant insights for each individual fan in real time. It nudges fans with personalized storylines, and Captain even invites fans to play in-app quizzes based on live match action. With Captain, Bundesliga is delivering
a new way to experience football through proactive, contextual storytelling and gamification at scale.

The following two screenshots show the app interface.

Stats agent in Captain's chat assistant

Figure 1: Captain’s proactive goal insight

Figure 2: Stats agent in Captain’s chat assistant

How the Bundesliga chat-based app works

At the heart of Captain lies the chat-based service, which transforms natural language fan questions into data-driven answers in real time. When a fan asks a question like “Which teams score most in the final 15 minutes?”, the service employs a text-to-SQL workflow: a large language model (LLM) converts the question into a structured database
query, Amazon Athena executes it against Bundesliga’s statistical data stored in Amazon S3 Tables, and a second LLM call turns the raw query results into a conversational, natural language response. The solution builds upon Sportec Solutions’ service offered to sports media professionals like live commentators and is now also made available to fans.

Because fans’ questions vary widely in type and complexity, the chat-based assistant uses a dynamic workflow to optimize price performance. Rather than routing every question through the same pipeline, the service first classifies each question along two dimensions, query type and complexity, using Amazon Nova 2 Lite. Based on this classification, a model routing layer directs straightforward questions to Amazon Nova Pro for its cost and latency advantages, while medium and complex questions are handled by Claude Sonnet 4 by Anthropic in Amazon Bedrock for higher reasoning capability. Roughly 45% of fan questions qualify for the more economical Nova Pro path.

A prompt builder then assembles a tailored prompt for the selected model, including football-specific instructions, relevant few-shot prompting examples, and only the database schema tables needed for the question’s type and complexity. This dynamic approach delivered a 35% reduction in chat assistant service costs while maintaining the same answer accuracy.

Although the chat-based service answers questions fans ask, Captain’s research service surfaces insights fans didn’t know to ask for. The moment Goretzka’s goal hit the back of the net, an AI agent was already investigating—checking the Bayern scoring tally against historical records, comparing the team’s 2025–2026 form with the legendary 1971–1972 squad, and weighing the scorer’s own streak. Within seconds, fans received a personalized, data-backed story made possible by the LLM’s ability to reason over statistics and decades of historical context at once.

The research service is built as an autonomous agentic loop using the Strands Agents SDK with Amazon Bedrock, designed to run on Amazon Bedrock AgentCore for production-scale execution. When a goal, penalty, or other key event occurs, the agent is triggered with a clear objective: find the most unique and noteworthy angle. Rather than following a fixed pipeline, it iteratively explores available data sources, surfacing player streaks, team milestones, all-time records, and cross-era comparisons until it uncovers a story worth telling. Each agent is given a task, a bounded toolbox of data sources, and a maximum time to spend on research before it must return an answer.

As a key architectural decision, the chatbot service is made available to the research service agents. This lets the research service use the chat assistant’s query infrastructure and domain knowledge, including the deep historical context of Bundesliga data dating back to 1963. The same pattern extends beyond live events: after the chat assistant answers a fan’s question, a lighter research agent runs on top of that answer to suggest follow-up questions, related video clips, and deeper angles worth exploring. The conversation keeps fans engaged and offers them content they wouldn’t have thought to ask for. The same agentic approach powers other Captain features across the app, delivering content that feels handcrafted for every fan.

“Every goal has dozens of stories hidden in the data—a streak, a milestone, a parallel to a match from decades ago. Captain’s research agent investigates them all and picks the most compelling one for each fan, in real time. That depth of storytelling at this scale is uniquely possible with agentic AI.” – Dirk Switalla, Senior Product Owner of Captain, Bundesliga Media GmbH

The following diagram shows the architecture for Captain.

Captain's proactive goal insight

Figure 3: Captain architecture overview

How the Bundesliga chat-based AI app is implemented

Agentic AI is only as powerful as the data it draws from. Captain’s AI agents need to autonomously query, reason over, and combine statistical, event, and video data in real time. That requires a data foundation built for open interoperability, industrial-scale reliability, and AI-ready data quality. Without these foundational aspects, agents can’t be trusted to generate the accurate, contextual insights fans expect during live matches.

Bundesliga’s data foundation for Captain follows an open architecture approach, with Amazon S3 Tables at its core, as shown in the following figure. S3 Tables stores Bundesliga’s comprehensive statistical data (player performance, team metrics, match events, and Bundesliga Match Facts) in Apache Iceberg table format, providing the open data layer that Captain’s AI agents rely on. Amazon Athena serves as the serverless query engine, enabling the chat assistant service’s text-to-SQL workflow to execute dynamically generated queries against this data without infrastructure management.

Architecture of Data foundation for agentic AI

Figure 4: Data foundation for agentic AI

For real-time data ingestion, Amazon Managed Streaming for Apache Kafka (Amazon MSK) handles the continuous stream of 200 million data points generated per match, delivering live event and positional tracking data with full wire-protocol compatibility to open source Kafka. This open standards–based pipeline enables data to flow seamlessly from the pitch to AI agents without proprietary connectors or complex extract, transform, and load (ETL).

As data streams through Amazon MSK, an AWS Lambda function parses and extracts the relevant match signals and transforms raw positional and event data into structured records ready for storage. These records are then delivered by Amazon Data Firehose into S3 Tables in Apache Iceberg format, without requiring custom consumers or batch processing jobs. As data lands in S3 Tables, the table metadata is automatically registered in AWS Glue Data Catalog, which acts as the central schema registry for Captain’s data foundation. When Amazon Athena executes a query on behalf of an AI agent, it consults Data Catalog to discover table schemas, partition layouts, and Iceberg snapshots before reading the underlying data from S3 Tables. This tight integration between Lambda, Data Firehose, S3 Tables, Data Catalog, and Athena means that live match data flows from pitch-side sensors into a queryable, AI-ready format with minimal latency and zero manual schema management.

Together, these services form the trusted data layer that gives Captain’s AI agents reliable, real-time access to the full breadth of Bundesliga’s data—enabling autonomous, accurate storytelling at the speed that live football demands.

Creating a chat-based assistant with agentic AI

Captain’s chat assistant lets fans ask natural language questions about Bundesliga—anything from “How many goals did Harry Kane score with a header at home this season?” or “How often did Olise assist Kane?” to “Show me highlights from the last Bayern match.” Behind the scenes, a coordinated team of AI agents works together to understand the question, find the right data, and deliver an accurate answer in real time.

Rather than relying on a single AI model to do everything, the system uses a multi-agent architecture: specialized agents implemented with Strands SDK on Amazon Bedrock AgentCore that each handle one part of the workflow and hand off to the next, as shown in the following figure. This keeps each step fast, focused, and reliable.

Figure 5 Multi-agent architecture of the chat assistant service

Figure 5: Multi-agent architecture of the chat assistant service

Prepare the question before AI reasoning through context enrichment

Before any AI agent reasons a user’s question, the system enriches it with conversation history, temporal awareness, and entity resolution. The most recent conversation entries are fetched from Amazon DynamoDB, enabling multi-turn follow-ups without the user restating context. The system also queries the sports data platform for the current matchday and any live matches because temporal context directly affects how questions are interpreted. A named entity recognition (NER) model on Amazon SageMaker extracts players, teams, competitions, and dates from the user’s question to resolve them to their unique entity IDs, which the agents use to run queries against the internal database.

Router Agent understands user intent

The first AI agent in the pipeline is the Router Agent. Its job is to understand the user’s intent and decide what to do next. It receives the user’s question, the conversation history, and the current time or match context. Then, the Router Agent makes three key decisions:

  • Is this question safe? Amazon Bedrock Guardrails are applied for input filtering, blocking prompt injection attempts, inappropriate content, and off-topic requests. If the guardrail triggers, the user receives a polite rejection.
  • Can this be answered directly? Straightforward greetings, chitchat, or questions answerable from conversation history don’t need a data lookup. The router replies mmediately.
  • Which specialist should handle this? For data-driven questions, the router classifies the question into one of two flows: statistics (for data and numbers) or video (for match clips and highlights).

Stats Agent answers data questions

The Stats Agent answers data questions by first searching a vector database in Amazon S3 Vectors for proven question-to-SQL templates semantically like the user’s question. When a match is found, entity values are substituted into the template, and the query is executed against the database. When no template matches, a secondary AI agent
generates SQL from scratch—slower and more expensive, but capable of handling novel questions.

This fallback feeds directly into a self-improving loop: every successfully generated question-SQL pair is automatically generalized into a reusable template by a background AI process, embedded, and added to the vector index. The next time a similar question is asked, it matches the template directly. The more questions users ask, the faster and cheaper
the system becomes, and novel questions gradually turn into instant template lookups.

The following screenshots show the app agents answering user questions.

Captain's Stats Agent

Figure 6: Captain’s Video Agent

Figure 7: Captain’s Stats Agent

Video Agent delivers match footage

For video-related questions, the Video Agent handles the request. It first needs to resolve which events or matches the user is asking about (using the same template search and data lookup capabilities as the Stats Agent), and then it retrieves the actual video content:

  • Event videos – Clips of specific in-game events such as goals, shots, saves, assists, or bookings
  • Match highlights – Full highlight reels for specific matches, available in English or German

Video results are collected during processing and delivered alongside the text as a unified message, so the user sees both the written context and the video content together.

Content safety

The system applies safety measures at two points:

  • Input filtering – Before the question reaches any AI model, Amazon Bedrock Guardrails screens for prompt injection attacks, sexual content, insults, violence, and hate speech. Blocked questions receive a polite refusal.
  • Output grounding – After the AI generates a response, a second guardrail checks that the answer is factually grounded in the retrieved data and relevant to the question. This reduces the risk of hallucinated or off-topic answers.

Conclusion

Bundesliga’s agentic AI companion, Captain, is infusing live match experiences with personalized fan intelligence. Embedded in the official Bundesliga app and built on AWS data and AI services, including Amazon Bedrock, S3 Tables, and Athena, Captain uses a multi-agent architecture to answer fan questions in natural language and proactively surfaces and delivers insights to fans during matches in real time, completely transforming the way fans can experience the game. With AWS, Bundesliga’s modern data built an open, reliable, and AI-ready data foundation that made Captain possible.

To learn more about the Bundesliga and AWS partnership, refer to Bundesliga on AWS.

Further reading

Dirk Switalla

Dirk Switalla

Dirk Switalla is Senior Product Owner at Bundesliga Media. He looks after app content and CMS and keeps things moving in the Captain team.

Gabriel Zylka

Gabriel Zylka

Gabriel Zylka is a Senior Machine Learning Engineer within AWS Professional Services. Specializing in the MLOps and generative AI domain, he works closely with AWS customers to architect and build cloud-native AI/ML applications and ensure their production readiness.

Georg Hagemann

Georg Hagemann

Georg Hagemann is a Product Owner at Sportec Solutions AG. He leads the development of cutting-edge digital products in cloud infrastructure, leveraging advanced data platforms and generative AI to transform large-scale data into actionable insights for professional football. With a background in user experience and data-driven product development, he combines expertise in UX research, analytics, and agile methodologies to build scalable, user-centric solutions that drive innovation in the sports technology domain.

Jean-Michel Lourier

Jean-Michel Lourier

Jean-Michel Lourier is a Principal Data Scientist at AWS Professional Services and technical program lead of the partnership between Bundesliga and Amazon Web Services (AWS). He’s passionate about diving into tech and learning about AI, machine learning, and their business applications. He is also an enthusiastic cyclist.

Patrick Hafner

Patrick Hafner

Patrick Hafner is an Engagement Manager at AWS Professional Services, managing the strategic partnership between Bundesliga and AWS. He specializes in managing complex cloud implementation programs, directing cross-functional teams, and bridging business requirements with technical solutions to drive measurable customer outcomes.

Rupesh Kumar

Rupesh Kumar

Rupesh Kumar is a Senior Delivery Architect within AWS Professional Services, specializing in data analytics and generative AI. He designs and delivers enterprise data platforms—data lakes, real-time and batch architectures—for large-scale customers in the DACH region, helping them transform raw data into scalable analytics and AI-driven outcomes on AWS.

Vishwanath Bhat

Vishwanath Bhat

Vishwanath Bhat is a Consultant with AWS Professional Services based in Germany, where he helps organizations optimize their cloud journey through his expertise in cloud infrastructure, serverless architectures, and container platforms. He's passionate about working with customers to unlock the full potential of Amazon Web Services (AWS). Outside of work, Vishwanath can be found exploring hiking trails, discovering new travel destinations, or unwinding with a good book.

Yury Brukau

Yury Brukau

Yury Brukau is a Senior Delivery Consultant at AWS Professional Services. He specializes in architecting distributed, scalable, and resilient applications through container and serverless technologies, with a recent focus on integrating generative AI capabilities into modern application development.