BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage Presentations RIIIR: Rewrite It In *Idiomatic* Rust (with AI)

RIIIR: Rewrite It In *Idiomatic* Rust (with AI)

49:08

Summary

Nicholas Matsakis shares why AI makes Rust the ideal choice for modern production systems, skipping steep adoption hurdles via compiler guardrails. He discusses Symposium - an open-source, agent-oriented toolchain from the Rust Foundation - and demonstrates how the Agent Client Protocol (ACP) standardizes agent-to-tool extensibility across diverse enterprise developer workflows.

Bio

Niko Matsakis is one of the lead designers of the Rust programming language and co-lead of the Rust language design team. He is a Senior Principal Engineer at Amazon and a Project Director on the Rust Foundation Board. He is the creator of Symposium, an open-source platform for agent mods built on the Agent Client Protocol.

About the conference

QCon AI is a practitioner-led event focused entirely on the engineering discipline required to scale these workloads safely. It provides direct access to the architectural playbooks and failure metrics that peer organizations use in production.

Transcript

Niko Matsakis: My name is Nicholas Matsakis. I am one of the lead designers of the Rust programming language. I've been working on it since 2011. I also am a senior principal engineer at Amazon. I started there about five years ago, in part because Amazon has been adopting tons of Rust, and I wanted to see it firsthand, see how it was going. I'm going to just show my whole cards with you and just tell you all the things I'm going to tell you. Step one, I'm going to try to convince you that Rust and AI is a really great combination, perhaps better than some of the alternatives out there. I have a project I'm curious to get feedback on that I think makes it even better, which I call Symposium, and covers up some of the gaps I see. Next, that actually, if you look at how Symposium works, what you'll find is it reveals something about the way we're currently building all our development tools here, which is that individual vendors, like Anthropic or OpenAI or whatever, everyone's trying to build a complete tool that solves all the problems, and I want to see us do more of an extensibility story where people can plug in and add things and you have a whole bunch of extensions. I think we're only scraping the surface of what is possible, but it's very difficult to do with the way the tools are set up now. Then I'll talk to you about Agent Client Protocol, which is an interesting way to get past that and get to a more extensible model.

Rust + AI

How many have heard of Rust? Rust is all about having a language that can go as low-level as you want, as efficient, give you as much control over the hardware. Low-level enough to be used in a kernel, but be productive. High-level enough that you can write application-level software in it, and it's not too bad. It may not be the minimum line count or what have you, but it's not too bad. Low-level enough for a kernel, I mean that quite literally. We are the only language apart from C, not even C++, that's allowed in the Linux kernel, just C and Rust. Also, we're being used in the Microsoft's kernel and elsewhere. That's been pretty cool. In terms of high-level enough for an application, just to give you some idea, this is a library called ratatui, which is a text user interface library, and they have all kinds of neat little demos.

You're seeing more and more of this user-facing software where performance may not be the number one criteria, but it works really well in Rust, and then it does scale up to crazy things like this oscilloscope or whatever that is. I've been giving a lot of talks on Rust for the last 15 years. I was at QCon in Brazil, in Sao Paulo in 2019 giving a talk like this. What I would say is it's sometimes a bit of a tough sell, because Rust's whole premise is like this eat your spinach thing. You know where your parents were like, eat it, it's good for you. We're telling you, Rust is going to make your code faster, it's going to make it more efficient, but it is going to take you a month and a half or three months or however long it's going to be to learn how it works and incorporate those new style of development into your workflow.

People are like, I would like it to go fast, but I want to ship tomorrow, so actually I'm going to stick with TypeScript. I can hire all the people I need. That makes a lot of sense. What I try to tell them is, yes, it is spinach, but it's like Popeyes spinach. You're going to eat it, and then you're going to be stronger, you're going to go faster. It's going to be great. Usually it doesn't win over, but that's changed a lot. What's happened is, if the agent's doing the coding, the agent already learned Rust in its training, its reinforcement learning stages and whatnot. It already passed that stage, so you just get to skip to the Popeyes stage, to the part where you've got this type system that's giving the agent guardrails and helping it stay on track and get programs that are more likely to be correct. You don't have to take it from me. You can take it from Greg Brockman, co-founder and president of OpenAI, who said Rust is a perfect language for agents, given that if it compiles, it's approximately correct.

In terms of this range of applications, another thing pulling people in is, like I said, Rust is low-level enough for a kernel, but usable enough for an application. It covers a wide space. You have things like codex-rs, which used to be in TypeScript, being ported over. That's something that's pulling people in. Then, of course, there's the old standby, which is efficiency. If you're building network services or whatnot, where you're paying per load, or maybe you're building a mobile app or something that's going to take your user's battery, then it becomes a really big consideration. You can save quite a bit of money. That's, of course, what's driving Rust at Amazon. We run things at really large scale. It's been fascinating, though, to watch the shift. When I first got there, it's the same as what I told you, people are thinking, Rust is maybe going to take me some time to learn.

I'm only going to use it in the critical data paths. S3, EC2, Lambda, those are the first adopters where the real heavy workloads are driving. Then people get used to it, and they started to use it in more and more places. There's an interesting blog post talking about DSQL, which is this serverless SQL database, and their story where they went through that whole trial. They started with just one narrow part, wound up using Rust in the data plane and the control plane and in their Postgres bindings and the whole thing. What's happening lately, it's really different, except I didn't actually get cleared to talk about all the cool things. Let me tell you about something else, and then we'll come back, where Microsoft is saying we're maybe going to try to do AI-driven rewrites of a million lines of code by one engineer. This is just a research project.

Of course, then Bun is running off, putting it into production where they're taking however many lines of code. I think it was a million, from Zig to Rust. I can neither confirm nor deny that similar experiments are taking place at Amazon and in many FAANG companies that I've been a part of, with, to me, quite surprising rates of success. Basically, it's now possible to move large codebases in a matter of weeks or months, which used to take decades or infinity because it usually failed. What I'm seeing more and more is if this was Rust before, this is Rust now going even faster. That's pretty cool.

There's one other factor, though. I mentioned Rust is like an eat your spinach thing. There's two ways to get people to eat their vegetables. One is that they feel motivated. The other is that the doctor tells them you have six months to live unless you change your dietary habits. That will also be motivating. We're seeing some of that happening now. Maybe when this roadrunner is looking behind him, what he's really looking at is Mythos coming around and saying, it turns out if you're using a memory unsafe language like C or C++, or even languages that make heavy use of really dynamic features like reflection, there's tons of vulnerabilities all scattered throughout your code, and I can help you find them, and I can help your attackers find them, too. That's also pushing a lot of people, I think, towards Rust and just towards generally more statically verifiable languages.

I think this is going to be an accelerating trend. I think we're going to see more and more a need to really get to a high level of validation on your software, because the minute it ships, somebody else can be running an AI against it, especially if it's open source, but even if it's not, if it's reverse-engineerable, and finding vulnerabilities. You really got to have them buttoned down.

This has been a story for a while. Android, this is from a great blog post by the Android team. They've been slowly and steadily, at least in the old days, porting their code from C++ over into Rust. There's a really interesting chart, actually, I think a mixture of Rust and Kotlin. There's a really interesting chart here, the blue line is the amount of new memory unsafe code. The red line is the number of new memory safety related vulnerabilities. You can see there's like a linear relationship. I don't know how long all of you have been in the field, but the entire time that I've been working in this area, 20-plus years, people have cited this statistic that 70% of vulnerabilities are related to memory safety. Nothing has changed it. Nothing. Whether you bring in Coverity or all these static checkers and all this other stuff, it's always the same, until now.

Switching to a new language that actually rules it out does change it. I think that's a big deal. It's not just Android. I recently saw this headline. The Linux guy, Greg, number two as far as I know, said Rust will save Linux from AI. I saw that. I was like, I'm putting that quote in my talk right now. What he means is this. It's actually what I said. We're seeing more and more vulnerabilities. We need to have a systematic fix to prevent them. We can't get by on patching continuously. I do want to say, before I pivot a little bit, to say that for those of you who are saying, I use Java. It's fine. Or something, I don't have to worry about memory safety. That's true. You have other kinds of problems that need to be considered and taken care of. Rust luckily is young enough not to have our own Rust4Shell or whatever.

I'm sure we'll find some problems sooner or later. This is what I mean by, all of us need to reckon with every language, is how are we going to get to the highest levels of reliability as quickly as possible? Where that leaves me is I think when your whole point is being reliability, that's your pitch, you're well positioned here. When it comes down to, if coding is really cheap, then you should pick not based on what you have, not based on what you know, but based on what you want, your properties you want to have in the future. This is, I think, the big thing that is starting to shift in the way that our industry is approaching language choice, technology stack choice, and so on. Why not save money? That's the question I know a lot of us at Amazon are asking. Why not reduce exposure to vulnerabilities?

I gave you the hard sell. Rust and agents are good. Could they be better? I think so. Let me give you an example of what I mean. There's a library out there that was released pretty recently, it's called Toasty. It's an object relational mapper for Rust. It's a database interop library. It was written by Carl Lerche, if you know much about Rust. He's the creator of the Tokio project. He's a big deal. It's really cool. It lets you write these high-level programs that then will go into your database. You write very Rusty programs, and it goes into the database in an efficient way. It works by this concept called a derive, which is a macro in Rust that will auto-generate code, sort of like a decorator in Python, if you know that. You can add these annotations, like this is a unique field and whatnot.

This field is auto-generated and so on. Then when you do that, the derive will generate the glue code you need to work with your database. It works against SQL. It works against DynamoDB. It works against a bunch of stuff. You might have, it uses some of Rust macros. You say, I'm going to create an entry, create a new row. It looks natural, like a struct creation. You get helper methods saying, search by email or whatnot. It demonstrates some of what makes Rust really successful. It has these guardrails. When you have a custom function called get_by_email, you can't pass an integer as an email address, like you could if you were, say, doing string substitution or variables in SQL. It's well-typed and it's checked up front. It's also efficient. It generates code that understands the overall query you're trying to do and generates good code.

When I asked Claude about it, at least a couple weeks ago, Claude didn't even know that it existed. It said, what library do you recommend? It gave me a bunch of good suggestions, but none of them are Toasty, which is the new hotness, or at least from my point of view, looks pretty cool. Then I said, ok, Claude, how about if I tell you I want you to use Toasty, can you please make me a database as a sample application? You can even see my typo. I think that was supposed to be executable, not write me an execute. Claude figured that out. Claude goes off, and to its credit, goes and searches the web, finds stuff, reads documentation. It's a lot of tokens. It took it a lot of time. It wound up with something that runs. That's pretty cool. If you look closely, you start to notice a few things.

First of all, it's using Toasty 0.3. At that time, the most recent was 0.5. Now I think it's 0.7. It was using an old version. I've seen that actually quite a lot, that Claude likes to just pick whatever version out of the ether that it knows well. I think what it comes to is the world is moving a lot faster than it ever did. We're generating new software really fast. The training cycle is this slow-moving average of the web. It's not going to be able to keep up at the same pace. What we really want, I think, is some way to get ourselves involved and to help give an opinionated take on what the right thing is. I'll notice it was using an old version of a library. That's one thing. Also, it was using an old version of Rust, 3 years old, using Rust 2021, not Rust 2024.

Another thing I see even with the latest models all the time. The most frustrating thing from my point of view about all of this is that I can't help. I work on the Rust compiler. I work on the Rust programming language. I have no influence into what Claude Code is going to do when I ask it something, or Codex, or Gemini CLI, or OpenCode, you name it. These are all these vertical applications that aren't easily and readily extensible.

Symposium + Rust + AI

This is where this Symposium project comes in that I've been working on. I have a lot of ambitions, but my vision for Symposium is it's an agent-oriented tool chain. A tool chain is like your compiler, your package manager. I want one that is designed and geared to be used by agents, because I think that more and more, they're going to be the primary people running an actual compiler. It's a member of Rust Foundation's Innovation Lab. It's an open-source project, part of the Rust Foundation, right now mostly supported by me, but I'm hoping to build a proper project around it. The way it works is very simple. You write cargo install symposium. That's going to install the Symposium application. Then you run cargo agents init. This cargo agents is what I said I want like an agent-oriented tool chain. That's what I'm imagining is you'll write cargo agents, and there'll be various commands that are geared for and tailored for use by agents.

In the moment, you say init and you pick what agents are you planning to work with? Could be Claude Code, could be Codex, whatever. Check your boxes. We're going to go and configure things so that Symposium will be invoked as part of their lifecycle. The very first thing that's going to happen as a result is we're going to give general Rust guidance that is tailored to, like, for example, use Rust 2024, not Rust 2021. Always use cargo add, which will bring you the latest version of the crates. Always run cargo fmt. These things are very basic. Models aren't doing them right now. This is an interesting point. I assume this will change over time. At the moment, this steering is still needed. That's the basic level. The more interesting level is that we allow crate authors to write skills to guide the agent in how to use their crate.

This is trying to work around that problem of, I've introduced something new. The LLMs don't know about it yet. The world doesn't know about it yet. How can I have an agent actually make use of it? Maybe I can package up a skill that tells the agent how to use it and then have Symposium go and install it. You get to write a skill. You can put it in your crate. Then what Symposium will do is when it gets invoked as part of tool use or other hooks, it goes and checks what your dependencies are, checks against a set of databases, and just brings the skills into your directory so that they're available for your agent. That means instead of going off to search the web and burn tokens and come up with an old version of Toasty, you would just get the results right there.

It also has various APIs, like this one is one of my favorites, crate info. It's so simple. All it does is say, here's the source to this crate, which the way Cargo works is always available in a cache. That's really useful because without this, agents don't know what the API is a lot of the time. They'll just go hallucinate and it won't compile. Then they'll say, let me go mess around. Maybe they'll build the docs and try to parse the HTML, which is really inefficient. Just telling them, like, here's the source code. Go read it. At least what I found to be the best way is just give them the information they want. They're very good at grepping through source as it happens. The other nice thing, there's some subtle things when you build it in your tool chain. You can be sure that it's the exact version you're using as opposed to whatever version they found when they searched the web. As a side note, if the package isn't one that you're already using, we'll put it in a temporary directory and so forth. Always works.

These are some simple things. They get at a principle that I think is really important and really powerful, it's basically extensibility. In my mind, it's the reason that I like to work on developer tools, is that I think all of us have something unique to offer. Some kernel of great idea that we can bring in there and contribute to make something better. Or we have our own unique needs that nobody is necessarily going to tailor for us. I really like environments that can be adjusted and played with and become a playground. I loved Emacs back in the day. I love VS Code. I don't love this about agents. It's nice that we have marketplaces and so on, but they don't have as much power as I would like. I really want to release that flourish of creativity. Rust embodies this with I showed you the procedural macros.

We have a small standard library on purpose so that people write libraries out in the open and we get to have the best of whatever they're using. I think this is a really powerful philosophy. Let me tell you a little bit about how it works in more detail. Right now, the way we have it is there's a centralized repository called recommendations. In there, if I am the author of the Toasty crate, the crate I mentioned earlier, I can do a couple things. One of them is I can add a PR with adding a plugin like this. I make a directory. My plugin is called SYMPOSIUM.toml. It will say, I'm making a plugin named Toasty. It should be triggered whenever the user depends on the Toasty crate. It brings these skills available which you can find in the same directory like this create-model skill.

That's one way to go. That's not my preferred way, but it's a convenient way. Let me show you the other way and then I'll explain what the tradeoffs are. There's another way, which is you can actually put the skill in your crate file itself. A crate in Rust is just a library. It packages up the source code, but it can also package up other auxiliary files like skills. In that way, I still make a file in the central repo to say this is a place that Symposium should look. I say you're going to find the skills in my crate itself. Here's what my crate might look like. Over in my own repo, I just put the skills in a directory called skills. Done. Easy. This is my preferred way. Because what this means is, each time Toasty publishes a new release or makes changes, they can just update the skill in their own repo and push the updated version and everyone will get the right version automatically.

There's no coordination needed. At the moment, we are still requiring this centralized file. I'll explain why. It gives you a clue there. The previous one, this one where everything is in one repo, this is useful, sort of like TypeScript in the beginning, if you recall. I think they still do. They had the signatures repository for adding on to JavaScript programs, what is the TypeScript version? How do you think about it? How do you add types to an existing JavaScript program? In the same way, I want to be able to add skills to existing crates that don't have them already. You can add it on the side, or better yet, if you're in control, you can put it inside. I mentioned that we are still requiring something in the central repo. That's because there's pretty obviously a security concern here. I don't actually think it's a new one.

Which is to say, when you bring in something from your dependency and you let it give guidance to your agent, it could tell your agent to do a lot of things. I don't think it's new. We've always had hooks, ways to inject code into your build process. That's pretty much just as bad, if not worse. It's different, and I didn't want to be on the headlines immediately, at least until we've had some time to think about it and gain some experience with how do we protect people best. That's our current position as practical compromises. We have to at least say, yes, we trust that crate author or that crate organization not to do something malicious before we'll go pull things into your directory.

It's not just skills. I talked a lot about skills. We also bridge up things like MCP servers. You can say, I'd like you to install my crate to get a binary, and we'll just go and install it for you in a side directory. We'll keep it up to date. Then we'll configure the MCP server. If someone's depending on your crate, maybe you have an MCP server that gives access to some of the data. I'll talk about some interesting use cases later. Same with hooks. You can install hooks. You can configure all the things that agents give you to configure so that you can get into the development experience. Now, if I zoom out a little bit, though, this means if I'm using a crate, my agent knows how to use it. There's still another interesting question. How does my agent know which crates to use in the first place?

How do you know? When I talk to people who are adopting Rust, actually, learning the language isn't usually their biggest problem. That's an obstacle, but there's books, and there's things, and knowledge is more and more widespread. What they do find very frustrating is, how do I navigate this ecosystem of libraries? How do I know which ones are the right ones to use? What are the tradeoffs between them? That can be a very difficult choice. It's the flip side. I'm super into extensibility, but also, when you give everyone the power to build things, suddenly you have to pick from a lot of different choices, and that's debilitating in its own way. What we're trying to do with Symposium is partner with another project that I think is like the other half to address this aspect of using Rust experience. We have this other project called battery packs, and I'll explain what a battery pack is.

The short version is it's like a best practice guidance. Symposium will steer your agent towards, you should go check out these battery packs. These are actually pretty vetted, highly recommended sets of libraries. A battery pack is a special crate, which doesn't really have source code. It just has a list of other crates that you might want to use for a purpose, like a network service or something else. It has documentation that's cross-cutting, because sometimes there's docs that don't belong in any one thing. It's not about, how do I use this library? It's about, how do I use these two libraries together to do something different? Of course, it can package up skills. Actually, any of the extensions I talked about, MCP servers. It's just a full-on Symposium plugin source. One example of what we're expecting to do, I mean, I work at Amazon, so network services are always top of mind.

We're working towards having an opinionated network service pack that has, here's all the pieces you need to put together, and that includes things like a profiling engine, the tools to run a profiler. We've got something that will get installed on your service that will use like perf and Linux events to track the hardware, to correlate it with the Rust scheduler. Then to expose those to the agent so that you can ask questions like, it seems like my service is running slow in production, I see a P99 spike, what do you think is going on? The agent can answer that with more than just a guess, can actually go look at the profiles and pinpoint the lines of code that may be involved, and so on. We've had really tremendous results with this. One of the hidden sleeper problems of Rust adoption has been, so Rust performance is good, but what about when it's not good, then what do I do?

Because of course it's not magic. Rust gives you control, not performance. You can use that control to make things really bad if you want to. Having a really good profiler is helpful, but the original versions we had just dumped tons of data on people, like off the top of your head, do you know what perf events are? I don't. There's all these hardware counters and all this other stuff. It's really hard to work through, but when you can give that data to an agent, it changes the game entirely.

Opinionated network service, that's great, but whose opinions are they anyway? Part of the idea with battery packs, anybody can create one actually. I'm into that because extensibility. Also, I know there's people with specialized needs, like a small embedded environment, maybe a battery pack for some sensor node architecture. I also want mainstream ones. We're spinning up this Rust commercial network in the foundation, and the idea is to bring together industrial users of Rust, have them say, here's the libraries we're using in production. We've got a list of them. If you like to, you may make use of that list. This also lets us drive funding and resources, because one of the big challenges with the introduction of AI especially has been just like a growing pressure on the maintainers of open-source libraries without really effective mechanisms to give them more support. It's like step one is knowing who you're going to try to support, so that's what we're trying to do now.

It also lets us worry about security and all these other things. You put that all together, and this is why I say Rust and AI works great together, but if you add in Symposium and the battery packs and the commercial network, I think you close some of the gaps that I at least see in trying to use the two together, because really the goal is that you shouldn't care what programming language is being used actually. I think sometimes it will be Rust. One thing I've noticed is I'm writing a lot more of other languages than I used to, because it used to be, Rust was the best choice for any problem for me because that's what I work every day in. That's what I'm most familiar with. I don't have to take any learning curve. It may not have been the best choice overall for anyone.

Now I'm more like, use the one that seems best. Write it in Python, write it in TypeScript. It's fine. Write it in Swift. I wrote a cool Swift library the other day. Swift is really cool. If you're building on iOS, top choice. Trying to fill all the gaps so that you don't have to know the details and the Rust community can provide them for you. You don't have to steer your agent.

Portability Across Agents

Now I want to talk about the second half: portability, why it sucks, and how we might be able to make it better. The whole idea of Symposium is that I, as a library author, should have a stake in your experience when you use my library. I should be able to control and influence your experience so that your agent can do a better job. That means I want it to work no matter who you are, no matter what tools you're using. I want to be able to write one thing that's going to work for all of you. Good luck. I don't know if you've looked at any of these libraries that try to be widely applicable. The README is super long, and it's all just like, if you're working with Claude, do it this way. If you're working with Codex, do it that way. If you're working with Gemini, do it this way, because each one is just a little different.

Even AGENTS.md is not universally supported. This is the file, or a file, depending on your agent, that provides you with some context. If you go to the webpage, I'm just going to hit pause. This is one of the best webpages that has ever existed. First of all, that AGENTS.md is the domain name is brilliant. Second, it's got this huge, like really professional looking page with a list of companies. It's like, this is a file name. All they're saying is name this file with this name. That's the whole convention. I just love that. That's like the area we're in. Actually, it doesn't even work. Even with this fancy webpage and this natural name, you still can't always rely on the fact that AGENTS.md will be used by your agent. My opinion is like, if any of you are building agents, help us help you. Let's build some interoperability mechanisms so that it doesn't have to always be that the model gets smarter, that the agent gets better. Instead, we can all work together to build something that's really cool.

What Symposium does, your library should be able to provide extensions in generic ways that work across agents. The user should be able to pick what agents they want to use. I prefer to have an infinite list, but I have to have right now, at least a finite list because configuring them requires some logic. Then, Symposium's going to get in the middle and make it work, as nicely as we can. The as we can is very important. Let's just look at skills. How does it work with skills? Let's say you've chosen to use Codex CLI. What we're going to do, if you've got a project that depends on Toasty, and Toasty provides a create-model skill, we're going to make a directory in your local directory called .agents/skills/create-model. We're going to put it in the right directory where Codex will look for it. This is weird. I don't really like modifying your directory, but it's the only way, from what I can tell, to inject that.

Luckily, I can put in a .gitignore file, which I do do, so that this doesn't show up in your git status. You don't even have to know it's there. You can just ignore it. That all works. Then, suppose I've chosen two agents. Like I might use Claude Code sometimes, and sometimes I use Codex CLI. What we're going to do is we're just going to make two directories, because Claude has a different name, it's called .claude. Fine, I'll make them both. They both have a gitignore file. It works. Actually, it works pretty well. It works so well that I just forget about it now. I've been using it for a while, and sometimes I get paranoid, like, is this still working? Wait, I can ls -a, they're all still there. Ok, cool. It's kind of gross. What about hooks? Skills and MCP servers both are really powerful, super important, and they only can do so much.

If the agent chooses to use them, they can help the agent do things. The agent may not choose to use them. You're always waiting to be called on. You never get to stand in front of the class and deliver. Hooks give you some ability to do that differently. These are callbacks that occur during the agent lifecycle, like every time you type a prompt or at the start of a session or compaction. Actually, the precise set of events varies across models. Some offer more or some offer less. The other thing is they all do it different. Everyone has a little data structure in JSON that they send, mostly JSON, but what fields they choose to include is usually the same information, but with different names. What we tried to do, of course, we did the like XKCD comic thing. You have n standards. What do you do?

Make an n plus one. We made our own, naturally, because I couldn't think of a better way. We have a Symposium format, but we also allow you to specify hook handlers that take the native events for as many different agents as you want. If you're using Claude and there's a Claude handler, we will deliver the event to your Claude handler. If you're using Codex, we'll do that. If you're using some agent that doesn't have a specific handler and you have a general one, we'll convert it into our general format. We try to do our best, but it's difficult. It's not really designed for this.

Agent Client Protocol (ACP)

This leaves me feeling like, there's just got to be some other way to do this. As I said, all of these mechanisms, they're mostly standardized in the sense that there's a webpage, and people mostly adopted it and use the same conventions, like MCP servers and skills. MCP servers now is part of this foundation and so on. Those are limited. Like I said, you're always at the agent's behest. Then the things that are more powerful, like hooks, still aren't that powerful, but also are not standard at all. Even the things that are standardized like skills, don't have a programmatic way. There's no easy way for me to say, here's some more skills. I just have to go hide them in your directory in the right place. It feels weird. This is where I started to get interested in something called the Agent Client Protocol. There are a lot of ACPs.

I know of at least three. I'm sure there's more. I learned about a new one today, but this one is what I'm talking about. What the Agent Client Protocol is, is it reimagines how agents and clients or users interact. Today's model is like this. You have the user, they're typing over on their keyboard, and they're running a program, like a CLI or a GUI. That program is talking to the agent and managing that whole communication. With ACP, you switch it out. The user picks a frontend tool, a CLI or a GUI, but it doesn't specify what agent it works with. Instead, it uses a JSON RPC protocol to say, I'm here, I'm starting a new session. The user typed hello, what would you like to say back, and so on. That protocol also has things like tool use requests and so forth. The original reason this was designed was to allow for interoperability, specifically the Zed editor, really cool editor, wanted to support different kinds of agents in a nice GUI way without re-implementing the connection between each one of them independently.

A classic problem. They created this protocol, and it's become relatively popular. We've got a lot of agents. I don't have the full list here. This is a registry. There are tons of agents that offer support. In some cases, unwillingly, like for Claude. There's a few of them that we've written the wrapper on behalf of the company. In many cases now, more and more, it's native support. Especially from agents that are trying to get a foothold, this is like a sensible thing to do, because if they offer ACP, then anyone using an ACP client can use them more easily. It's a nice way to get a foothold and separate concerns. They may not have to make a GUI anymore because now there are canned GUIs they can reuse. On the flip side, you have a bunch of editors, so Zed, but also all the IntelliJ family ones.

Emacs, still holding on. I still love Emacs. Neovim, we don't talk about Neovim in my household, but I understand people like it. Also, things that are a little different. They're not code editors, like Obsidian. I don't know if anyone here uses Obsidian. It's like a Markdown management information system. They have an ACP connection. Similarly, there's these pretty amazing CLI frontends like Toad and Nori. Toad in particular blew my mind. You just have to try it. You would never believe that it's a TUI. It can do all kinds of things I didn't think were even possible. The nice thing about these CLIs is they're just focusing on the interface. They don't have to worry about the agent.

Then what's really interesting is we're starting to see applications, not surprisingly to me, that go beyond editors. Because once you have something that's extensible, suddenly people start coming up with new, fresh ideas like OpenClaw. How does OpenClaw talk to the agents? I don't know if you all have used OpenClaw. It does a lot of things. One of the things it does, at least the way I used it, is it's a WhatsApp or some other communication, but WhatsApp works well, protocol that lets you send messages to an agent running on a backend service somewhere. It has like a memory system and stuff like that. Of course, you can use that to do all kinds of things. I just did coding with it. The way that it talks to that agent is through ACP. Because I think what they did before was they ran an agent in a CLI in like a Pt, Ty and scraped it off, and tried to figure out what it was doing and it was just horrible.

Because that's not really the way that programs like to interact with each other. Now they have something more structured. Something I've been enjoying is building scripts, which is a similar programmatic frontend. This is one I have called retcon, which rewrites your git history, because my git histories are always a total mess. It lets you write kind of LangChain-esque, I was thinking today. I hadn't realized that before. The idea is you'll spin up the agent and then you can send messages to invoke things. Like here, I can send a prompt to it, like I want you to extract changes for this git commit. Then when it comes back, the answer is actually translated into a Rust struct. The way that works is I put in a temporary MCP tool and say, when you're done, invoke this MCP tool with some JSON. I start to interact with the LLM as just a fancy function that I could never have written myself, like extract the changes for step one of this git refactoring.

This gets us to the latest thing that I've been trying to do with ACP and how this connects to extensibility. So far, we've seen that if you put an interface in between a client and an agent, you can have novel kinds of clients or novel kinds of agents. Side note, how many of you remember ELIZA? I wrote an ELIZA ACP, which I think is great. ELIZA is just like a hacky regex that really feels like you're talking to a therapist, even though it's not. 1970s AI resurgence. You have novel clients, agents, but you can also put stuff in between. That's what I call an agent mod. A lot of the stuff I showed you, or at least some of it anyway, is using some of this. It's still like an unstable part of the spec, but it's like middleware. What's cool about it is that now, unlike all the other extension mechanisms I talked about, it's in charge.

It can see, what did you type? Should I modify it? Should I add stuff? Should I do context augmentation? What should I do to your prompt before I send it to the agent? It can say, here's the tools I would like the agent to have available to it. It can take the responses from the agent and fork off sub-agents, which is also something you can't, as a program, do, and have parallel work happening, can move to other servers, whatever. It's super cool. It's a little scary. I think this is the thing I'm really interested in exploring. For this to work, of course, we have to get ACP-wise used more broadly and so on. Here's me saying, use Zed, or IntelliJ. They're really good. Plus, they use ACP. Everybody wins. I'm expecting that we will see more things like this, whether it's ACP or something else.

As agentic coding becomes more mainstream, we're going to need to have some standards that let us build on top of it and build more complex workflows. One of the places we're seeing a lot of interest, actually, is in enterprise applications and so on, where they want to build integrations for their employees to offer a better experience than just a CLI.

Recap

You should use Rust for your next project, especially if you're using AI. If you've tried it and bounced, give it another try because it feels different now. Second, when you do it, use Symposium, cargo agents init. Easy. Third, portability sucks, but I hope it will get better.

Questions and Answers

Participant 1: For teams that are not familiar with Rust, what's your recommendation on how to start with it? Because with AI, you can really start along with building immediately, and we do, but the fear is that you don't understand the language completely, but then it may end up in production. What's your recommendations for teams that are just starting and they want to ship faster or something like that?

Niko Matsakis: How do you avoid digging yourself into a hole? That is exactly what battery packs are meant to answer, but I'm still trying to make them a real thing. First off, I worry a little less these days because it's so much easier to make changes. Even if you've built stuff, refactoring it is easier. Secondly, what I found really helpful when I'm learning new things is to just really aggressively ask the LLM about its choices. Like it made some choices. You could ask it why. Often, it will give you a good answer. Sometimes it'll say, you're right, that was a bad choice. I'm like, I didn't mean to imply that actually, but ok, go ahead, refactor it. It can go both ways. You don't just have to take the code. You can ask it all about the code and so forth. I think that's the best that I know of. Of course, what I've seen within Amazon, the old advice is still true. Hire someone who knows Rust. That's the surefire way. If you can't do that, then as you get experience, of course, you'll start to have homegrown experts of your own.

Participant 2: I think a lot of us have noticed when writing skills and however much stuff you put in place to try and ensure that the LLM actually uses it or uses it as intended, and so on, sometimes it will just not do it or ignore it. That kind of skills are too loose, hooks are too hard. How do you make it deterministically actually use this stuff? Have you found through this Symposium project any ways to do that better or make sure it actually does the right thing?

Niko Matsakis: How do we nudge the LLM to be more deterministic? This is exactly why I'm so interested in ACP, actually. I'll give you an example, that retcon thing I showed you, it began as just a giant LLM script where I told it how to rebase and do stuff. What I found was it worked like 90%. Usually, it would forget some parts of the branch. It just would be like, I'm done. I'm like, no, you're not, you've left off a whole thing. Or it wouldn't check that the test pass and everything else. Now when it's written in Rust, like I'm guaranteed every commit passes the test, every commit is formatted because it's got a deterministic backing. I have been toying with similar things for skills where I had experiments where I would detect with some various heuristics and things that I thought a skill was probably good and give it some extra hints to avoid that problem.

I've backed off from a lot of that, partly because models get better, but also because I think we need telemetry first. I feel we need deterministic stuff, and I feel we need a way to measure, are we actually helping or not? Because what I noticed is a lot of times it's a little unclear. I want some better infrastructure where I can actually measure, how often is a skill being used? If I do give it some nudges, am I actually making people's lives better? Like I could do A/B tests, stuff like that. I think it's a real concern, and I don't think there's a great answer right now.

 

See more presentations with transcripts

 

Recorded at:

QCon AI is a practitioner-led event focused entirely on the engineering discipline required to scale these workloads safely. It provides direct
access to the architectural playbooks and failure metrics that peer organizations use in production.

Nov 19, 2026

BT