How Teamworks Built an AI Assistant That Saves NFL Coaches Hours on Game Prep

Built with Mastra, the assistant routes questions across seven specialist agents and validates the data they retrieve from PFF's football databases.

Hours → minutes

Game prep research time

7

Specialist agents

Teamworks is an operating system for more than 7,000 sports teams, across the NFL, NBA, NHL, and more. Its products help staff recruit players, manage schedules, plan nutrition, and prepare for games.

The company is integrating agents into those products. For Coaching, Teamworks is building a Mastra agent that lets coaches ask football questions across its data sources. It turns hours of searching and combining data into minutes, giving coaches more time to prepare their game plan.

Supervisor agent routing the question

PFF's enterprise business, now part of Teamworks, has built the world's most comprehensive sports data and analytics database. Since 2006, PFF has analyzed every player and every play of every game for the NFL, fantasy football, and NFL Draft.

Built with Mastra, their agent sits on top of PFF's internal databases. It lets coaches explore that data in plain language. A coach preparing for an opponent might want to find every play from a specific situation. One query may cover a full season and hundreds of players.

The agent has to narrow a large dataset to choose the right source, apply the right filters, and group the results without losing the details the coach asked for.

The PFF team uses the supervisor network pattern for this. One main agent acts as the routing expert. It sends each question to one or more specialist agents. There are 7 specialists, with ~5 tools each.

Those tools query PFF's internal football databases. The agents decide which tools to use, how to order the work, and how to combine the results.

Some questions need one tool and one database. Others go through two or three agents and tools before the system can combine the data.

Tool schema descriptions also matter because they become part of what the model sees. This is especially important for football data. The tools rely on player names and terms a model may not understand on its own, such as wins above replacement or expected points added.

Adding workflows and validation steps

At first, the PFF team tried to get the right data in one shot but retrieval wasn't reliable enough. So they added Mastra workflows and validation steps.

After a tool returns data, the workflow checks it. Does it have the correct data? Do the filters make sense for the question? Did a groupBy remove something important?

These checks have helped get much better results. They also added latency, but for now, it's an acceptable tradeoff. The team needs the right answer first and then they start working on making the system faster.

Moving evals and debugging to Mastra

Teamworks originally explored some POCs around the LangChain ecosystem. But since PFF's team was already building with Mastra and they were happy with it, after the acquisition that's the framework they settled on. They've been gradually moving supporting workflows to Mastra as well.

Now the team stores datasets in code and uses Mastra's prebuilt evaluation tools alongside custom checks. Every night, the system pulls the dataset and runs it against the Mastra server. The results are then sent to LangSmith and a Google Sheet.

For now, the main question is simple: is the answer right? When it's not, Mastra Studio is their main debugging surface.

They check the input controls, workflow steps, agent decisions, and tool calls. The goal is to find where the mistake started and how it moved through the run.

Reliability before speed

The system is in staging and internal testing. The team has started inviting trusted football sources and coaches to try it.

The next step is to make the largest dataset reliable. After that, the team is planning to reduce latency and track cost more closely.

Start building today

Quickstart