So we are going to look at how you can build and code your own autonomous Wall Street co-workers, so hopefully we have many finance people or engineers working in finance here. So quickly, before we go into where we are coming from two years ago, we basically had a chatbot. We asked simple questions like what's the capital of France, who won the last European Championship. Then we moved to assistants using tools on our own computer, having the first coding agents writing code for us. And now we are moving into this autonomous co-worker area where we basically give and create a digital employee, where we give an agent its own computer, give it a task, and hopefully come back a few hours later with a good result.
So what does a co-worker normally need? And I think that goes for AI and for us humans as well. We need a brain to be able to do our work. We need a computer where we can save artifacts we create, where we can iterate. We need some kind of a playbook. Right, when you hire someone new, they are new to your environment, to your domain. You might have specific workflows, so you need playbooks. We need tools for them to be able to do that job. They all need credentials in one way or another. Then there might be some specific house rules on what you should do or what you should not do, what you can do on your own or where you need to get approvals. And then of course there are hopefully some schedules for working hours, when you can come in or when you have to work. And the same goes for our agents.
So we are going to work through all of those seven steps and how you can build your own digital co-worker with Gemini in this talk. But before we go in, yesterday was the big day. We announced Gemini for Argon and made it available to you. The biggest new features we have now a 1 million unified context window. This means Gemini can generate up to 1 million output tokens. And we see strong improvements, especially on math and reasoning tasks, where the model now has more than 64k tokens available to think, to work through, to reason through some proofs and math. And then very also very good is that we tested that model heavily, so we know there are always some thinking around hey, Gemini just banks benchmarks, but the model is really good. You should definitely give it a try. We use it extensively at Google. There are already many projects by Google employees who have used it. The easiest way to get started is the interactions API. It's literally four lines of code. You get your API key in AI studio, AI studio.com slash API key, and then you can immediately send your request. It's also I would say quite affordable for frontier model with two dollars in and two dollars ten cents per million output tokens. You should definitely try if you have a free minute later or even if you have some agents running right now, give it a try. Tell it hey please set up Gemini 4 and give it a try.
So what have Googlers done so far with the model? I think it's very impressive because it's a super new model. We had it available internally to test for a few weeks already, but Googlers are using it so heavily and shipping so many cool things. We had the Chrome team basically accelerating some decoupling of the chromium browser. We have Gemma, which is our open model, where Gemini accelerated Gemma to be more easily and more efficient to run. The ADK team from Cloud improved their framework, and then many other things. And especially the right one at the bottom is we use it internally heavily, and we see strong improvements for our internal codebase as well.
So what have people built? There are some demos you can look them up, but there's one specific one from a colleague of mine which I want to show. He basically prompted Gemini to build a custom 3D ray tracer in Python, and it was completely built from Gemini and nothing external tools. And at the end, just Python. And it also used Gemini TTS model and a narrator to add some voice over to explain how it works. And it's very impressive for me how far we can push those models now. So try to be very ambitious.
So how can we build our agent? In Gemini API we have a product called managed agents. And managed agents is basically a simple way to build a remote agent where you give a sandbox which it can use to run tools. So when we normally build an agent, we have this tool calling loop, right? We send a request to the model. The model might generate a JSON function call. We receive that function call. We run that function call on our machine, execute the code, and then we go back to the model. And with managed agents, we basically provide a sandbox which Gemini can directly use to run all of those calls. So we can use a managed sandbox.
So if it decides to execute code, to write a file, it has its own computer available for it to use. And it takes just an API call. So instead of providing the model ID with Gemini for Argon, you provide the agent ID in this case it's anti-gravity preview 09. Give it a prompt. The environment is remote so you want to run it in the managed sandbox. And that's all it takes. So let's get into building. Bug is our co-worker for today. And bug needs a brain. Our brain is going to be Gemini. Our computer is going to be managed agents. And then all of the other things.
So how can you create an agent in managed agents? You have a very simple API where you can define your own agent. So you give it an ID, that's the name which you are going to use later to call the agent. We have the base agent, so that's the main agent underlying. In this case it's the agent harness. So the remote agent uses the same managed, sorry, the same agent harness which we have in anti-gravity as well. So if you are using anti-gravity as your coding agent, you get the same agent harness remotely. Then we want to use the new model, so we define our model. We have a system instruction: you are bug. And then all it takes to call it again, interactions API create. And instead of using the model ID for Gemini or the default agent, we use our own agent bug. And our agent needs a computer.
And the computer anomalies need some additional files, additional scaffolding. So with managed agents, you can provide your skills or an agents.md file, maybe from your GitHub repository. You can inline those files directly. You can provide a GitHub repository, private or public, with your skills. And you can connect GCS bucket, so you can already bootstrap the environment the agent is going to work in. And everything in managed agent lives as a file.
So we have skills. We have system instructions. At the end it's just a file system, or the agent's own computer, where it can create new skills if it thinks it needs to improve itself, where it can store memories from previous sessions or learning. So at the end we just work with files.
And for knowledge, or for our agent, I like to separate those in three different categories. So we have knowledge which we always need to include in every request. That's normally the system instructions. We want to try to keep it very short because that's something we need to pay on every request. So if we have very long system instructions, all of our requests are going to be much more expensive. If we have concise, then we have knowledge which the agent can decide when it needs to use them or not. So that's typically with skills, right? With skills we have very short descriptions which give the agent some guidance on like hey, you can use that skill if the user wants to do a certain task, or if you have to do a certain task. And then the agent can read that skill. But for skills we also want to make sure that we are not having a super long dense skill because that's also a high cost at the end. Context is very valuable for us, so we want to decouple them and separate them into much more slices where we can then have dedicated references and scripts if we want the agent to do very certain things where it needs more context.
Okay, so let's look at an example skill which we are going to use. So we have a portfolio audit. The agent should use it. It has some instructions available for it. How to run it. So we have a Python script the agent can run, and then some additional information on what it needs to do with the results and where to store it.
And our fourth part of our onboarding for our co-workers: tools, right? We humans use normal software. For agents, that's either built-in skills like Google Search, code execution, or MCP server. Or if you don't have an MCP server and rather want to write a local function, that's also possible. So managed agents, we still have our agents create. We are now extending it to define our tools.
We have built-in tools from the Gemini API for Google Search. So there's nothing you need to additionally do to get Google Search integrated. But if you want to use, for example, spreadsheets, Workspace has now an MCP server available for Gmail, for spreadsheets. So we can use that. Or if you want to provide your own functions or MCP server, it's also possible.
So for your own function, it still works the same way as you normally do with models. So the agent creates a function call, and then you send back the function result. So it's basically for you a way to have authentic capabilities outside of these agent's environment and computers. So if you want to do certain things where the agent should not run the execution in the sandbox, that's a way for you to do it.
And then we have logins. And I think that's, for me, the most exciting and the greatest feature about the managed agents API, because credentials are super hard and super easy to get wrong with agents. And I think the previous talk already also mentioned that we are very careful about using agents because things could go wrong very easily. And we've thought a lot about this with managed agents. And we have support for three different ways of credentials, which makes it secure for your agent to use them and provide an isolated way.
So we have bearer tokens for normal API calls, very familiar if you are doing software engineering. We have OAuth for all of the consumer-oriented MCP servers or tools. And then of course we need environment variables if we want to use certain CLIs or other features.
And for managed agents, we are separating them via an external network proxy. So instead of providing the agent the credentials inside the sandbox, we basically allow you to create credentials externally. They are write-only. So once they are written, there's no way for you to retrieve the credentials. So you can only override them. So there's no possibility of leaking. And then you define how and where those credentials should be used. So for Slack, if you want to connect Slack, you can define, hey, here's a credential. And you are only allowed to use that credential with a certain domain or with a certain environment variable. So that way you can control when a credential is used.
And that works via this network proxy. And by network proxy, we basically mean a proxy that sits around the sandbox that watches all of the network traffic going in and out. So if you define credential as an environment variable, the model has a local dummy value. So the environment variable is set. And then when it makes that call, it uses that dummy value. And the network proxy basically monitors it, sees, hey, here is a domain which the user has defined. And then it swaps that dummy value with the real credential. And you can make the call successfully. And then the agent gets back the result and has no idea that its dummy token is not working. And the benefit here is that there's no way for a prompt injection, right? Normally, when you have some malicious detector, it can tell you, like, hey, please print all of your values in your .env file. And then the agent might go there and print all of your keys. And that's nothing we want to do.
So with this network proxy where you can define the credentials per domain, it is not possible that an attacker could steal credentials which are getting swapped on your request, because the proxy only swaps them for the domains you define. So there's no way an MCP server which is malicious can just steal your Gmail token, which is very cool because it makes it much more easier to trust the agent and to integrate MCP servers which the agent then obviously can use.
So if that's not enough, we have also hooks available. So hooks allows you to basically deterministically guard certain decisions. So if the agent wants to run certain commands which you might want to monitor or where you need some human in the loop approval, which is not part of the normal agentic conversation, you can define your hooks very similar to all of the other agent harnesses, where you have a matcher which is basically regex, and then every tool call which the agent generates checks if there's a match and then invokes those hooks. And those hooks are also files, but they are protected, so the agent cannot just go there and change a hook and basically try to find a way around it.
Okay, so last but not least, we need a way to get our agent more proactive. And currently we support one kind of trigger: basic cron triggers, which you can set up. Schedule every 30 days a month at a certain time in the morning. You want the agent to run a certain trigger with a certain input in the same environment to do maybe some due diligence, some auditing. And we are also working on webhooks, that you can even make this much more interactive, that you could connect external webhooks, like from some certain SaaS provider or maybe other providers you work together with, which would directly then call your agent. The agent does some first auditing and then basically can call your Slack or your Microsoft Teams directly without you even needing to manage some infrastructure at all.
So that's that. A final picture and now let's look at some real demos and let's hopefully hope that the Wi-Fi is good enough. So I told Gemini that I want to do a cool Google Sheets demo, and it helped me create basically this whole Google Sheets replication in my browser. And when I click here, we basically simulate this cron trigger. So we send a real API call to managed agents. It should use our portfolio auditing skill and it runs the request.
So first step, basically, see, like, hey, I need to read the skill. It gets the result back. So it tries to understand what it should do here. It's a portfolio audit. I hope that's roughly accurate on the Google Sheets, but it basically runs through all of those calls, calls financial services, tries to see, okay, did the market or the stock price change? And then at the end, hopefully it should update our own Google Sheets completely automatically. So it's still working through it. It has some first result and it updates the Google Sheet based on the trigger, and that trigger would run every 8:30 a.m. without you needing to do anything. And then of course, if the agent has access to Slack, then it can even post in some specific trading channel, okay, what changed, what is going on, and how does it work?
And here we have an example where I can just ask: Bug, any recommendation? And hopefully this works as well. So it takes a little bit of time. You have seen in the other demo, we have seen all of that. Perfect.
So there are three positions. So that's based on the Slack thread content. So it has all of the previous turns available and it provides the context of what changed. But it's still basically taking actions based on the system instructions you gave and all of the infrastructure you need to run that agent is part of the managed agents environment. So it's very easy for you to get started, to integrate those into the tools you already use, provide the systems you need, and then to get started.
So back to the slide. So the whole co-worker, which we need in one service, we have the brain: Gemini. We have the computer with managed agents. We can provide skills for the same agents you use, maybe on your local computer. You can use the tools. You can provide MCP server for external services, data providers to connect. We have a secure way for you to provide credentials to rotate credentials. We have hooks to protect certain deterministic logic. And of course, we have triggers to much more proactively integrate it into it. So thanks for listening, and hopefully go hire your first AI co-worker.
the ADK team from cloud improved their the framework and then many many other things and especially the right one at the bottom is like we use it internally heavily and we see strong improvements for our internal like code base as well so what have people built there are some demos you can look them up but there's one specific one from a colleague of mine which I want to show he basically prompted Gemini to build a custom 3D ray
tracer in Python and it was completely built from Gemini and nothing external tools and at the end just Python and it also used Gemini TTS model and Luria to add some voice over to explain how it works and it's like very impressive for me how far we can push those models now so try to be very ambitious so how can we build our agent and in Gemini API we have a product called managed agents and managed agents is basically a simple way to
build a remote agent where you give a sandbox which it can use to run tools so when we normally build an agent we have this weird tool calling group right we send a request to the model the model might generate a JSON function call we receive that function call we run that function call on our machine execute the code and then we go back to the model and with managed agents we basically provide a sandbox which Gemini can directly use to run all of those calls so we can use a
so if it decides to execute code to write a file it has its own computer available for it to use and it takes just an API call so instead of providing the model ID with Gemini for Argon you provide the agent ID in this case it's anti-gravity preview 09 give it a prompt the environment is remote so you want to run it in the managed sandbox and that's all it takes so let's get into building bug bug is our co-worker for today
and bug needs a brain our brain is going to be Gemini our computer is going to be agents and then we all of all of the other things so how can you create an agent in managed agents you have a very simple API where you can define your own agent so you give it an ID that's the name which you are going to use later to call the agent we have the base agent so that's the main agent underlying in this case it's the agent harness so the remote agent uses the same managed sorry the same
agent harness which we have an anti gravity as well so if you are using anti gravity as your coding agent you get the same agent harness remotely then we want to use the new model so we define our model we have a system instruction you are back and then all it takes to call it again interactions API create and instead of using the model ID for Gemini or the default agent we use our own agent bug and our agent needs a computer
and the computer anomalies need some additional files additional scaffolding so with managed agents you can provide your skills or an agents MD file maybe from your github repository you can inline those files directly you can provide a github repository private or public with your skills and you can connect GCS bucket so you can already bootstrap the environment the agent is going to work in and everything in managed agent lives as a file
so we have skills we have system instructions at the end it's just a file system or the agents own computer where it can create new skills if it thinks it needs to improve itself where it can stores memories from previous sessions or learning so at the end we just work with files and for knowledge or for our agent I like to separate those in like three different categories so we have knowledge which we always need to include into every request
that's normally the system instructions we want to try to keep it very short because that's something we need to pay on every request so if we have very long system instructions all of our requests are going to be much more expensive if we have concise then we have knowledge which the agent can decide when it needs to use them or not so that's typically with skills right with skills we have very short descriptions which give the agent some guidance on like hey you can use that
skill if the user wants to do a certain task or if you have to do certain task and then can read the agent can read that skill but for skills we also want to make sure that we are not having a super long dense skills because that's also a high cost at the end context is very valuable for us so we want to decouple them and separate them into much more slices where we can then have like dedicated references and scripts if we want the agent to like do very certain things where it needs more context
okay so let's look at an example skill which we are going to use so we have a portfolio audit the agent should use it it has some instructions available for it how to run it so we have a python script the agent can run and then some additional information on what it needs to do with the results and where to store it
and our fourth part of our onboarding for our coworkers tools right we humans use normal software for agents that's either built-in skills like google search code executions or mcp server or if you don't have an mcp server and rather want to write a local function that's also possible so managed agents we still have our agents create we are now extending it to define our tools We have built-in tools from the Gemini API for Google Search. So there's nothing you need to additionally do to get Google Search integrated. But if you want to use, for example, spreadsheets, Workspace has now an MCP server available for Gmail for spreadsheets. So we can use that.
Or if you want to provide your own functions or MCP server, it's also possible. So for your own function, it still works the same way as you normally do with models. So the agent creates a function call, and then you send back the function result. So it's basically for you a way to have authentic capabilities outside of these agents' environment and computers. So if you want to do certain things where the agent should not run the execution in the sandbox, that's a way for you to do it. And then we are logins. And I think that's, for me, the most exciting and the greatest feature about the managed agents API
because credentials are super hard and super easy to get wrong with agents. And I think the previous talk already also mentioned that we are very careful about using agent because things could go wrong very easily. And we've thought a lot about this with managed agents. And we have support for three different ways of credentials, which makes it secure for your agent to use them and provide an isolated way. So we have bearer tokens for normal API calls, very familiar. If you are doing software engineering, we have OOR for all of the consumer-oriented MCP servers, or like tools.
And then, of course, we need environment variables if we want to use certain CLIs or other features. And for managed agents, we are separating them via an external network proxy. So instead of providing the agent the credentials inside the sandbox, we basically allow you to create credentials externally. They are write-only. So once they are written, there's no way for you to retrieve the credentials. So you can only override them. So there's no possibility of leaking. And then you define how and where those credentials should be used. So for Slack, if you want to connect Slack, you can define, hey, here's a credential.
And you are only allowed to use that credential with a certain domain or with a certain environment variable. So that way you can control when a credential is used. And that works via this network proxy. And by network proxy, we basically mean a proxy that sits around the sandbox that watches all of the network traffic going in and out. So if you define credential as an environment variable, the model has a local dummy value. So the environment variable is set. And then when it makes that call, it uses that dummy value. And the network proxy basically monitors it, sees, hey, here is a domain which the user has defined.
And then it swaps that dummy value with the real credential. And you can make the call successfully. And then the agent gets back the result and has no idea that his dummy token is not working. And the benefit here is that there's no way for a prompt injection, right? Normally, when you have some malicious detector, it can tell you, like, hey, please print all of your values in your .en file. And then the agent might go there and, like, print all of your keys. And that's nothing we want to do. So with this network proxy where you can define the credentials per domain, it is not possible that an attacker could steal credentials which are getting swapped on your request
because the proxy only swaps them for the domains you define. So there's no way an MCP server which is malicious can, like, just steal your Gmail token, which is very cool because it makes it much more easier to trust the agent and to integrate MCP servers which the agent then obviously can use. So if that's not enough, we have also hooks available. So hooks allows you to basically deterministically guard certain decisions. So if the agent wants to run certain commands which you might want to monitor or where you need some human in the loom approval which is not part of, like, the normal agentic conversation,
you can define your hooks very similar to all of the other agent harnesses where you have a matcher which is basically regex and then every tool call which the agent generates checks if there's a match and then writes those hooks. And those hooks are also files but they are protected so the agent cannot just go there and changes a hook and, like, basically tries to find a way around it. Okay, so last but not least, we need a way to, yeah, get our agent more proactive and currently we support one kind of triggers, basic cron triggers which you can set up, schedule every 30 days a month. At a.m. you want the agent to run a certain trigger
with a certain input in the same environment to do maybe some due diligence, some auditing and we are also working on webhooks that you can even, like, make this much more interactive that you could connect external webhooks like from some certain SAC provider or maybe other providers you work together with which would directly then call your agent. The agent does some first auditing and then, like, basically can call your Slack or your Microsoft Teams directly without you even needing to manage some infrastructure at all. So that's that. A final picture and now let's look at some real demos and let's hopefully hope that the Wi-Fi is good enough.
So I told Gemini that I want to do a cool Google Sheets demo and it helped me create, basically, this whole Google Sheets replication in my browser and when I click here, we basically simulate this cron trigger so we send a real API call to managed agents. it should use our portfolio auditing skill and it runs the request. So first step, basically, see, like, hey, I need to read the skill. It gets the result back so it tries to understand what it should do here. It's like a, I hope that's roughly accurate on, like, the Google Sheets but it basically runs through all of those calls, calls financial services, tries to see, okay, did the market or the stock price change
and then at the end, hopefully it should update our own Google Sheets completely automatically. So it's still working through it. It has some first result and it updates the Google Sheet based on the trigger and that trigger would run every 8.30 a.m. without you needing to do anything and then, of course, if the agent has access to Slack, then it can even, like, post in some, like, specific trading channel, okay, what changed, what is going on, how does it work and here we have an example where I can just ask Spock any recommendation and hopefully this works as well. So it takes a little bit of time. You have seen in the other demo, we have seen all of that. Oh, perfect.
So there are three positions. So that's based on, like, the Slack thread content. So it has all of the previous turns available and it provides the context of what changed, but it's still basically not taking actions based on the system instructions you gave and all of the infrastructure you need to run that agent is part of the managed agents environment. So it's very easy for you to get started, to, like, integrate those into, like, the tools you already use, provide the systems you need and then, like, to get started. So back to the slide. So the whole co-worker, which we need in, like, one service, we have the brain, Gemini. We have the computer with managed agents.
We can provide skills for the same agents you use, maybe on your local computer. You can use the tools. You can provide MCP server for external services, data providers to connect. We have a secure way for you to provide credentials to rotate credentials. We have hooks to protect certain deterministic logic. And, of course, we have triggers to much more proactively integrate it into it. So thanks for listening and hopefully go hire your first AI co-worker. principal principal ! principal principal principal principal ! ! ! Thank you.