AI Engineer World's Fair 2025
Conquering Agent Chaos
Read the talk
Conquering Agent Chaos: From Local Handler to Deployed Agent
Long-running, stateful agents need more than an HTTP endpoint. Rick Blalock walks through project creation, local tracing, deployment and channel routing—and a deployed invocation that fails.
From a talk by Rick Blalock
Before you start: Familiarity with request handlers, command-line development and basic cloud deployment will help you follow the walkthrough.
When the agent outgrows its deployment model
At the University of Florida, Rick Blalock asked professors and students building agents what caused them the most trouble. Their answer was deployment. Students put their projects on AWS Lambda, then encountered timeouts when their agents needed to work for fifteen or thirty minutes. Those numbers describe workloads, not supported invocation limits: AWS Lambda’s maximum configurable execution timeout was fifteen minutes.
Blalock reports that an internal agent at Agentuity runs for roughly forty minutes a day. The students could not simply move their projects onto VMs or EC2, which their classes prohibited. They also faced gateway configuration and the work of wiring agents together. Even with enough execution time, a deployment still has to make agents reachable and let them communicate.
State adds another mismatch. Much of the web assumes that a request can be handled without preserving an active process between requests; agents may need to retain working state through a longer task. Blalock had already encountered this with a set of qualitative research agents. He initially built them on serverless infrastructure, then had to rearchitect when synthesis took longer than the deployment model accommodated. Runtime duration, state and connectivity are separate deployment problems.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
What the infrastructure needs to provide
The first requirement is an execution lifecycle suited to the work: agents should run as long as necessary and be able to pause, stop and resume. The second is to separate input and output channels from application code. An agent should be able to receive work through several channels without rebuilding its core logic for each one. These are the requirements motivating the platform, rather than guarantees established by the short demo.
Observability has two audiences. OpenTelemetry traces and spans help a developer inspect what happened during execution. Self-observability asks for something further: the agent must be able to understand execution information itself, supporting reflection on its behavior. A human inspecting a trace does not demonstrate autonomous reflection. Blalock also includes memory, improvement over time and code execution in the capabilities agents need; the walkthrough that follows concentrates on deployment and developer-facing inspection.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Create the project and choose its boundaries
The walkthrough starts in the CLI:
bash
agentuity create
After selecting an organization, the wizard offers Bun, Python with uv, and Node.js. Blalock chooses Bun and encourages Python users to choose uv. The commands and handler conventions here follow the recording’s SDK generation; the older JavaScript SDK is now archived, and current Agentuity APIs have evolved.
The template menu includes Mastra, but Blalock selects Vercel AI SDK with Groq. He says that much of Agentuity’s internal code—roughly fifty agents at this point in the walkthrough—does not use an agent framework. Framework choice is nevertheless independent of deployment: he describes CrewAI, LangChain, Pydantic and Vercel-based agents communicating through internal networking. Bun with Vercel AI SDK and Groq is his preferred combination for speed, not a benchmark result presented here.
The remaining choices define the deployment boundary:
- Name the project
Hello. A project groups agents and can correspond to a GitHub repository. - Name its initial agent
agent-1-hello. More agents can live in the same project. - Choose protection. The platform handles routing to individual agents, while access can be protected at the project level or with an API key for each agent. Blalock deliberately chooses no protection for this demo.
- Optionally connect GitHub so that merging to
mainautomatically deploys the project.
The agent is therefore an addressable infrastructure object, rather than just a function hidden behind an application’s routing code.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Run locally and inspect a session
With the scaffold created, local development starts with:
bash
agentuity dev
The agent executes locally. If multiple projects are running, they receive assigned ports. Routing identifies the individual agent by its ID, and a managed public tunnel lets an external service reach that local agent. This makes it possible to test service-to-agent interactions while keeping the executing code on the development machine.
The development simulator supports more than a chat box. Blalock shows input choices for text, JSON, HTML and PDFs. He also mentions email support, while explicitly distinguishing it from the inputs available in this simulator. After sending several test requests, he opens the resulting logs, which are available both in the interface and in the terminal.
A session connects those interactions to execution telemetry. In the human-facing trace view, Blalock follows a call through the AI gateway. The gateway removes the need to configure separate model or service keys in this workflow, and call inspection exposes cost, prompt and response. He describes the development interface as mirroring the corresponding production capabilities: the same kinds of logs and session details remain available after deployment.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
A small handler contract connects the infrastructure
The generated project has a YAML file for deployment configuration and an agents folder containing entry points. In JavaScript, an agent exports a default function as its request handler. The editor shows that handler with request, response and context parameters, a streaming model call and error handling. The platform takes responsibility for routing incoming data onto the request object.
That request need not originate from a conventional API client. An agent can have an email address or phone number, and incoming content can include JSON or a PDF. The application receives routed input through its handler rather than implementing a separate deployment for every channel.
Streaming and calls to other agents extend the same contract. Blalock describes ctx.get_agent as resolving an agent by ID or name. For example, a JavaScript agent could resolve another agent implemented with Pydantic. The platform supplies an ephemeral token that, in his account, authorizes communication for the duration of execution; the caller can execute the other agent and return or stream its response. This agent-to-agent call is explained verbally, rather than shown in the displayed handler.
The integration boundary remains narrow:
| Concern | Demonstrated convention |
|---|---|
| Deployment settings | YAML configuration |
| Agent entry points | agents folder |
| JavaScript handler | Default-exported function |
| Python handler | run function |
| Framework logic | Constructed normally inside the handler |
Mastra code can retain its usual construction inside the entry point. Likewise, a Python handler can contain a crew or several crews and call another agent implemented with Pydantic. The hosting contract supplies routing and infrastructure access without requiring all agents to adopt the same framework.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Deploy the runtime, then attach channels
Blalock deploys the project, and the upload completes during the walkthrough. He explains that the platform wraps the agent in a specialized container for its selected runtime—Bun in this case. The deployed view shows runtime and deployment information. A project can contain multiple agents, though this demonstration still has only one.
Cost inspection is available at several levels: project, agent and individual run, alongside the session spans already shown in development. The displayed AgentHello dashboard includes runtime details, connections, Total Cost, LLM Cost, input and output token cards, and Recent Activity. A deployed container is not yet evidence of a successful agent run; the next steps configure how work reaches it.
To add email, Blalock selects a new channel and saves it. The interface assigns an email address to the agent. He also describes SMS, APIs and cron jobs as options; a cron schedule can wake an agent to perform work. This is the concrete payoff of separating channels from code: someone can deploy the project from its GitHub repository and then attach their own email address or other inputs. Slack and Discord are described as future additions at the time of the recording.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
The webhook creates a session, but execution fails
The deployed endpoint is public because the project was created without authentication. Blalock invokes the webhook with a greeting. A session appears with an ID, and he waits for the execution logs. Routing has accepted the invocation and created an execution record.
The run then reports an error rather than a completed response. Blalock attributes the failure to the configured memory footprint and points to YAML as the place to change the allocation. He does not show a configuration repair or a successful rerun. The demonstration therefore reaches deployment, channel configuration and session creation, but its deployed invocation does not complete successfully.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
From deployment infrastructure to operational agents
Returning to the broader platform, Blalock reiterates GitHub integration and describes additional integrations as forthcoming. He reports fifty to sixty internal agents and says the team is getting better development velocity, without giving a measured productivity comparison. He presents this deployment platform as the first product in a planned cloud suite for agents.
The next planned work brings the earlier observability requirement back into focus: infrastructure agents that watch logs and surface emerging issues for developers and the Agentuity team. Blalock jokes about calling this AgentDuty rather than PagerDuty. The name is a joke, but the intended operational role is specific—agents consuming execution information and helping identify problems. It remains roadmap work in this account.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Tool calls within reasoning and a shared services layer
An audience member closes with a question about adding tool calls into reasoning, specifically into reasoning tokens. Blalock affirms interest but does not describe a mechanism for integrating tools into the reasoning process. Instead, he returns to the product criterion used at the start: what capabilities does an agent need to succeed?
His proposed boundary is an infrastructure services layer that supplies capabilities out of the box, while letting developers connect them through Vercel AI SDK tools or another framework. He grounds that interest in a CRM agent the team is building and for which he says he needs these capabilities. The direction is to make shared infrastructure available through the agent’s existing tool interface, leaving framework and application choices with the developer.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
From the talk
Official explanation of distributed traces and the spans that describe individual operations.
Further reading
- AWS Lambda execution-timeout historyDocumentation
AWS's release history records the fifteen-minute maximum execution timeout introduced in October 2018.
Rick Blalock expands on infrastructure designed for agents, including machine-consumable logs, observability and governance.
Updates since the talk
Current Agentuity source repository with CLI tooling, service clients and framework integrations.
Current documentation for using Agentuity services from application code and supported frameworks.
Read the complete timestamped transcript
- 0:00
[upbeat music] My name's Rick Blalock.
- 0:16
I'm from Agentuity, and, uh, that you're all wearing the, the logo around your necks. So stop by our booth, please. But, uh, today I wanna talk about, um, conquering agent chaos.
- 0:25
But really, I'm talking about deployment, running and deploying agents. Um, and just to give you an example, I was, uh, I was at University of Florida. I'm from South Florida, and I was at University of Florida about a month and a half ago, and I was talking to a bunch of professors and their students on projects that
- 0:41
they were deploying. Almost all of them were working on some type of agents in their class projects. And, uh, I asked all of them, "What was the number one problem?"
- 0:49
They all said, including the professors, "Deploying agents." And, um, they... Sim- similar problems that I, I had before we, we started Agentuity, which was like you, you build this thing, you deploy it on serverless.
- 1:00
In their case, they were using AWS Lambda, and then they, you know, time outs, right? [laughs] "Uh-oh, my agent runs for fifteen minutes," or, "My agent runs for thirty minutes."
- 1:09
We have an internal agent at Agentuity that runs for forty minutes a day, something like that. So they're running into that, and then, uh, they weren't allowed to use VMs or EC2 for their projects, so, uh, for obvious reasons. [laughs]
- 1:20
You don't want a s- bunch of students running EC2s. And, um, a bunch of other things are running into the gateway issues, you know, wiring up agents, talking to agents and things like that.
- 1:30
So it's very, very common thing. And the other one is, you know, the whole web is built, like, for a stateless type concept, right? Agents are not stateless necessarily.
- 1:39
They're stateful in a lot of cases. Um, and so those are the deployment headaches that I was hearing over and over with the students, and that mapped to a problem I had about a year ago building a qualitative research agent, set of agents.
- 1:51
Same thing. I built it on serverless not thinking, and then I realized, "Ah, crap, I gotta rearchitect this whole thing," 'cause it's doing synthesis and it takes a while.
- 1:59
Very common he- um, headaches. Has, has anybody experienced that headache before? I'm curious. Yeah? Deploying agents? So that led us to talk about, like, well, what do, what do agents need to be successful?
- 2:12
So they need to li- they need to run as long as they need to run, um, and they need to be able to pause and stop and resume. They also have, de- decoupled from your code, they need to have different inputs and outputs and, um, actually multiple, various ones, right?
- 2:28
We... I, I think we understand that, hopefully. And then I put this up here: introspection, self-observability and self-reflection. They need those two. Um, and we have that in the product.
- 2:38
We have, like, OTel tracing things. Um, hopefully you've all seen that, some of those types of things where you're doing introspection and, and traces across. But I put self-observability and self-reflection here 'cause this is important.
- 2:50
So the, the, the observability things that we're used to are human-based, where we see, like, these traces and spans, and, um, the agents need to understand that as well.
- 3:00
There's a, there's a, there's a difference there. There's a nuanced difference there. And of course, it needs memory. It needs to get better, evolution, code execution. So that's what agents need to be successful.
- 3:09
And so when I was, again, talking to those UF students, personal experience, um, we need those things, and that's what we started to build at Agentuity. And so I just wanna give you a demo.
- 3:20
I'm trying to decide, should I do a live demo or should I do the, the slides just in case? I don't know. Uh- Live. Live? Everybody says live? Yeah.
- 3:27
Y'all just wanna watch the train wreck. [laughs] All right. We'll, we'll try it live. So I'll... Wow. It's all live. Live. Wow. Yeah, it is. All right. We'll do that.
- 3:38
So, um, I'm gonna... Let's do this. Let's do this. Let's blow this baby up. Can you see this okay? Yeah. Yeah. All right. Good. I was told I had to do it in light mode because that's what you do, so.
- 3:52
Um, all right, so we have a CLI. So if you're gonna start, you run Agentuity create to create a project. Um, when you run it, drum roll... Okay, in this case, I'm logged into a bunch of organizations, so I'm gonna do our Agentuity, uh, demo one.
- 4:08
We have three runtimes that we support: Bun, Python with uv. You notice we, we put uv. We're trying to bias people towards uv. Please don't use pip. Um, [laughs] and then Node.js, of course.
- 4:18
So those are our three runtimes. I'm gonna pick Bun.
- 4:22
And then, uh, you can pick several templates, um, th- as a starting place. Now we're, we're, uh, framework agnostic. You notice there's Mastra here. Mastra's pretty good if you're going down the TypeScript route.
- 4:33
Um, I'm, I'm gonna pick Vercel AI SDK and Groq. I, a lot of our stuff internally, we have 50 agents or so, and they're... We don't use a framework.
- 4:41
Um, but we're framework agnostic, so you can bring CrewAI and then deploy another one in LangChain, another one in Pydantic, and then Vercel, a- and then they can all talk to each other.
- 4:51
Um, internal networking, talk to each other and that kind of thing. We'll show you that here in a minute.
- 4:55
I'm trying to leave enough time so we can have questions and answers. So I'm gonna pick Vercel AI SDK with Groq. Honestly, that's my favorite combo with Bun 'cause of the speed.
- 5:03
It's amazing. Um, and then I'm gonna name a project. Let's just call that project Hello. A project is a grouping of agents. It's also, um... You can think of it as like a one-to-one to a repo, 'cause you can hook it up to GitHub.
- 5:17
An agent, again, multiple agents in a project. You get your default one here, so let's just call this, uh, agent-1-hello. Uh, very creative name. Now, one of the things we give you...
- 5:27
Agents are a first-class citizen. Again, back to deployment problems. Agents are a first-class citizen, infras- infrastructure citizen, um, in Agentuity. So that means we handle all the routing and all that to that agent, and you can decide how you want to protect it.
- 5:41
So you can protect it via the whole project. Each agent in your project can have an API key. I'm gonna do none right now 'cause it's a demo.
- 5:50
There's more to that, but, um, I'll skip over that right now. Then you can hook it up to GitHub, uh, so then if you merge to main, it'll automatically deploy your project.
- 5:59
And that's it. So then we create this. I'll show you the code here in a second. I'm gonna show you dev mode real quick, and then I'll, we'll, we'll do the code.
- 6:05
All right. So- Rock and roll. So let's do Project Hello. And before I show you the code,
- 6:13
we have now this Vercel AI SDK Bun, you know, Groq template, right? So we have this command that you can run any of your agents with, Agentuity dev. If you have multiple projects, you can run them and then they'll have, they'll have, uh, ports assigned to them.
- 6:27
And so now we're running this locally, as you would expect. Very... What you're n- used to, I'm sure. But, um, one of the things I wanna, I wanna show you is...
- 6:36
So this is the, is routing to the agent. We only have one agent, so that's the, that's the agent ID. But we have this public routing, so we do tunneling for you.
- 6:44
So if you wanted to hit it through another service or something while you're deving, you can do this, uh, publicly too. All right. But let me just show you the dev mode real quick.
- 6:52
So, um, click this. This... Oh, of course I got logged out. Ugh. [laughs]
- 7:04
Who expired the token? Um, okay. So, um, we give you, like, this kinda simulator for your agent. Um, some agents don't take just text, right? So you can, you can pick JSON, HTML, you can...
- 7:17
PDFs. Um, actually, we do emails and things like that too. That's not in this dev mode. But this is where you can interact with your agent, test it out, and then when you do that...
- 7:26
Like, I'm just gonna run it a few times. What? I'm sorry?
- 7:31
Somebody say something? Oh, okay. Um, when you do that, you can get your logs. Of course, you can see it in terminal too. Um, you can in- inspect the logs, get more information.
- 7:41
And then the sessions are back to the... Remember the observability thing? So we have the human version of this here, where you can look and you can see, like, oh, this hit the, this hit our AI gateway, which we have an AI gateway so you don't have to set up keys for any of these models or any
- 7:53
of these services. And you can get the cost for that call, um, what the prompt was, what the response was and all that. And it... This works in production too.
- 8:00
It's the, it's a mirror image of production. So that's the dev mode. I don't wanna spend too much time on it 'cause we don't have much time, but that's...
- 8:07
So put a pin in that. Now I'm gonna kill that, and you're like, "Well, Rick, what does the code look like?" And we're trying not to be too opinionated here, but we do have a few conventions.
- 8:17
Um, let's do that. Let's do that. Um, so really the conventions we have in a project are you have a YAML file. Surprise. And, um, that's to help configure your agent when it's deployed.
- 8:29
And then, um, there's an agents folder. Python, it, it works the same way. And, um, you have an entry point, and so this is, this is the simple, simple template that we, we created here.
- 8:42
And, uh, the entry point in, in this case, in, in JavaScript would be, um, you export a default function, and that's your request handler. If you guys have used Next.js or have used Knatives or whatever, everybody should be familiar with that hopefully.
- 8:54
But what we do is we handle all that routing that comes into your agent, and we put it on that request object. And so that, that could be an email.
- 9:01
You can add a email to your agent. You can add a phone number to your agent. You can, uh, send a JSON, a PDF, whatever. We have all those things that we route to it.
- 9:08
You can stream it. Um, and then also you have, you have things that are, like, first kinda... first class citizens like ctx.get_agent, and then that... And then you can pass in an ID or a name.
- 9:19
So we have another agent. Maybe it's a Pydantic agent over here, and we can actually get it. We'll get an ephemeral token so it's allowed to talk to it for as long as it runs, and then you can execute it, send it back.
- 9:30
You can stream it back. There's a bunch of different things you can do here. Um, so that's on this context object. So there's... I'm not gonna spend a lot of time on this right now, but there's a, there's a lot of, like, infrastructure we give you in this really simple handler, um, uh, which is pretty cool.
- 9:45
All right. And that's it. That's the only convention. So again, like you can imagine if you're using Mastra, and we have a bunch of examples and templates that you can go look at Mastra.
- 9:52
You're, you create Mastra template... or, uh, models the way you would, you, you would normally do it, and you can drop them in right here. Same thing in Python.
- 10:00
Um, there's a run function in Python, and that's what you have to declare. And then you can drop in a crew or a couple crews, and then have it call Pydantic two and a never- another agent.
- 10:09
Um, and that's it. That's, that's, that's the code in a nutshell. Now let's deploy it really quick. YOLO. [laughs]
- 10:19
All right. And it should... It- Internet's fast, it should upload pretty quick. There, boom. All right. So we took, we took that agent, we wrapped it in a container, a specialized container that's...
- 10:29
In this case, it's a Bun runtime, and now it's live. So if I, if I click on that and jump to it,
- 10:37
you can see, um, this is when it was deployed. There's our little happy Bun. And, um, let me show you something really quick that you haven't seen yet. So in a project, again, you have multiple agents.
- 10:48
I only have one agent that you saw me create. And then this is where you can get, you can get cost breakdown by project, by agent, by run. You saw the session spans.
- 10:58
So we, we try to surface that up in all different ways to help understand how much an agent is costing. But this is where... Remember when I said you can decouple inputs and outputs from your agent if you want to?
- 11:10
And this is where I can hit plus here, and I can say, "Hey, I wanna give my agent an email." I hit save, and now I can email my agent.
- 11:18
So there's the email address right there. And I can do that with SMS. Um, I can do that with APIs. I can do a cron job. Wakes up, does a bunch of things.
- 11:28
Um, and that's inputs and outputs. So it's a nice way to build an agent, and then if somebody wants to use it, they can hit deploy now from your GitHub repo, drop it in, and like, "Okay, let me wire this email up.
- 11:38
Let me wire this up. Let me wire..." Later we're gonna get Slack and Discord and all that stuff too. Um, so that's inputs and outputs. Um, actually, let me just go ahead and try to hit this right here.
- 11:47
So this is our... Remember, we didn't secure it, so it's public. So actually, if you took a picture and hit this, it probably would work. No, don't do that.
- 11:54
Um, let's just... I don't know if this is gonna work. Hello.
- 12:01
All right. So I, I hit the webhook. It created this session. There's the session ID. Now it's... The agent's off running, and I should start getting logs here. Got three minutes. [laughs]
- 12:14
There it is. Oh, it's an error because I probably... Oh, I- okay, so this is in your YAML file, you can change the, uh, the memory and I d- I need to change the memory footprint for this, so it didn't run.
- 12:24
It's like, nope. That's something we're working on too. So in a nutshell, that is, that's what you get. Of course, you can wire up some integrations and, and, uh...
- 12:34
Actually, I think I just lost internet. Okay, there we go. There we go. You can wire up some integrations, GitHub, and a bunch of other stuff that's coming. So, um, to k- to kinda wrap up, this is, this was, like, the thing that we wanted to build, not just for everybody, but for us- [laughs] ...
- 12:49
'cause we wanted b- we have now 50, 60 agents internally built on this, and it's like finally we're getting really good velocity, and I'm really excited about. So this is our first product in our agent native cloud suite that we plan on working on.
- 13:02
Um, this summer we're working on, um, infrastructure agents that watch our logs and, uh, surface things that are coming up for, for, um, for developers and us. And, uh, w- we kinda...
- 13:12
We were joking last night, we should call it Agentuty, not PagerDuty. Like, the agent's gonna do that stuff [laughs]. [laughs] Uh, right? Exactly.
- 13:19
It's a thing right there.
- 13:19
So yeah. So there's a bunch of stuff coming, but that's where we're at right now. Stop by the booth. Um, we got one minute and 50 seconds, so if there's any questions, we got about a minute and 50 seconds.
- 13:29
Any, any questions? Jokes, stories, anecdotes? Try to leave just enough room. Yes.
- 13:37
One thing that I've been hearing about recently is the idea of adding tool calls into reasoning. Um, like into the, the reasoning tokens. Um, is that something you've been thinking about at all recently?
- 13:50
Yeah. Uh-huh. And, and I mean, yeah, for sure [laughs]. Yeah [laughs]. Um,
- 13:58
the, the... Now there's a, uh, for us, like I said, from a product perspective, there's a thing we always ask ourselves, which is what does an agent need to be successful?
- 14:06
And, and some of that is what... Like, we wanna offer that as a services layer from an infrastructure services perspective, where a lot of that stuff you just get out of the box, and then you can hook it up to a Vercel AI SDK tool thing, or you can hook it up to something else.
- 14:20
Like, we, we wanna do some of those kinda service level things.
- 14:24
Gotcha.
- 14:24
But I mean, like, on a tactical level, yeah, I, I think it's... I mean, I need them actually for a CRM agent that we're working on, so yeah.
- 14:32
Cool.
- 14:32
All right. Thanks everybody for coming. [outro music]