Build the API and interface layer for Team Structure for AI — lab audio overview
2026-04-21
Build a request-handling layer over a team-health analyzer: parse and validate incoming payloads into domain models, run the analysis, return a status-coded JSON response, and register operation handlers for dispatch.
GenAI Engineering Leader › GenAI Engineering Leadership › Chapter 2 · Team Structure for AI › Build the API and interface layer for Team Structure for AI
5:40
Build a request-handling layer over a team-health analyzer: parse and validate incoming payloads into domain models, run the analysis, return a status-coded JSON response, and register operation handlers for dispatch.
Host: Welcome back. You're in GenAI Engineering Leadership — a course about the decisions that separate teams that ship AI products from teams that spin their wheels. This chapter is on team structure. How do you actually organize the humans who build AI? Platform teams, agent teams, machine learning teams, and hybrid shapes that mix all three. Today's exercise is where structure meets reality: defining the contracts between those teams. Let's get into why that matters.
Expert: Picture a mid-sized company — maybe three hundred engineers, half a dozen product lines — that just decided to take generative AI seriously. Leadership spins up three groups. There's a platform team whose job is the shared infrastructure: model access, logging, guardrails, cost controls. There's an agent team building customer-facing assistants. And there's a machine learning team that already existed, handling forecasting and recommendation models. Now, on paper, that looks clean. Three teams, three missions. But within a month, everything gets messy. The agent team is asking the platform team for a feature, and the platform team doesn't know if it's one request or fifty. The machine learning team is logging data in its own format, which the platform team's monitoring can't read. Nobody knows who owns what. This is the single most common failure mode in AI organizations right now. It's not a technology problem. It's a contract problem. The teams never agreed, in writing, on how they would talk to each other. So before you can have healthy team topologies, you have to define the seams between them. That's the skill this exercise builds.
Host: So this is the starting point for the chapter. The overview walked through what the different team shapes look like. Now we're going to get specific and actually define the handoffs. What exactly will the listener build in this exercise?
Expert: You're going to write out the formal agreements between teams. In software, when one team's code talks to another team's code, the document that describes how they talk is called an application programming interface — usually shortened to A-P-I, or A-P-I contract. Think of it like a restaurant menu. The kitchen doesn't need to know who's eating; the diner doesn't need to know how the kitchen works. They just need the menu — what you can order, what you get back, how long it takes, what happens if they're out of something. That's what you'll produce here. For each boundary between teams — the platform team and the agent team, the platform team and the machine learning team, and so on — you'll write down what one team offers the other. You'll describe the requests a team can send, the responses they'll get, the errors that can happen, and who's responsible when something breaks. You'll also think through command-line tools and user-interface panels where relevant — the same idea, just a different surface. The deliverable is not code that runs. It's a set of specifications clear enough that two different teams could build to them independently and still meet in the middle.
Host: That reframe is important — it's a design artifact, not running code. So what's the tricky part? Where do people get stuck in this exercise?
Expert: The trap is writing the contract from the perspective of the team that owns it, instead of the team that will use it. The platform team, left to its own devices, will describe its service in terms of the internals — here's our model router, here's our evaluation pipeline, here's our embedding store. That's useless to the agent team. The agent team doesn't care about your routing logic. They care: can I send a user message and get a grounded answer back, yes or no, and how fast? So when you're filling out these specifications, keep asking yourself — would the team on the other side of this boundary understand what they're getting, without reading my internal documentation? The second trap is forgetting the unhappy path. Beginners specify what happens when everything works. Experienced architects specify what happens when the model is slow, when a request is malformed, when the downstream service is down, when the rate limit is hit. Those failure modes are where real teams actually spend their debugging time, so they belong in the contract. If you find yourself writing only success cases, stop and go back.
Host: Good warning. Let's wrap up. What will the listener walk away able to do, and where does this fit into the bigger picture of the chapter?
Expert: After this exercise, you'll be able to sit in a room with three team leads who are about to start building an AI system, and help them write down — on one page per boundary — exactly what each team will provide to the others. That's a senior skill. It's the difference between an organization where teams collide and one where they compose. For your own team, this becomes the template you bring to the next planning cycle. When leadership asks how you should split the work, you won't be guessing — you'll have a concrete way to draw the lines and a vocabulary for describing them. And because this is the only exercise in this chapter, finishing it means you've now got the full picture: you understand the team shapes from the chapter material, and you've practiced defining the contracts that make those shapes actually function. You can bring both pieces back into your architecture discussions. That's the deliverable — not just knowledge, but a working pattern your organization can adopt. Thanks for listening, and good luck with the exercise.
Want to go deeper? Explore disciplines with hands-on labs, quizzes, and chapter podcasts.