Skip to main content

Scale AI coding agents while controlling costs with ug – the Unity Gateway CLI

Summary

  • Unity Gateway CLI: The ug command enables developers to connect coding agents to Unity Gateway with automatic setup and configuration management.
  • Cost Control: Admins centrally manage authorized models, access levels, and budget limits using JSON configuration—smart defaults route work to cost-efficient models.
  • Agent Governance: Distribute governed coding agents across enterprise teams without requiring developers to manually reconfigure when policies change.

Scale AI coding agents while controlling costs with ug – the Unity Gateway CLI

Watch: Scale AI coding agents while controlling costs with ug – the Unity Gateway CLI
Today, we’re introducing ug, the Unity Gateway CLI, to let developers connect their preferred coding harnesses to Unity Gateway without manual setup and give organizations central control to roll out and manage those agents.

Chapters

FAQs

What is the Unity Gateway CLI?

The ug (Unity Gateway) CLI lets developers connect their preferred coding agents to Unity Gateway with automatic setup, while giving admins central control over governance.

How do I set up budget controls?

This video shows that admins configure smart defaults in JSON that route work based on spend intervals. For example: 0–60% use Claude Code, 60–80% use Codex, 80–100% use a lower-cost model.

How do I govern Claude, Codex, Cursor and other coding agents?

This video presents governance approaches for code generation agents including limiting autonomy, implementing approval workflows, and maintaining audit trails of decisions. The Databricks Data and AI platform enables instrumenting agents with observability hooks catching anomalies before production impact. Setting clear guardrails balances innovation with reliability.

How do I securely deploy coding agents across an enterprise?

This video outlines safe deployment techniques including code review stages, testing automation, and limited rollout scopes during initial launches. Gradual team expansion with clear success criteria ensures adoption remains controlled. The video emphasizes that security controls and monitoring infrastructure are as important as the agents themselves.

How can I set budgets for coding agents by team?

This video demonstrates implementing cost controls by monitoring token consumption and establishing spending limits per developer or team. The Databricks Data and AI platform provides cost tracking and visibility tools enabling budget management. Establishing clear guardrails prevents surprises while letting teams benefit from agent capabilities.

Full transcript

0:00 Introduction to Unity Gateway

Hello everyone. I'm on the tech marketing team here at Databricks. And I want to talk to you about how I can control coding agents cost at scale using Unity Gateway. Today, I'll be an admin at the company Boba Bricks, where my goal is to configure UG, the Unity Gateway CLI for managing and distributing governed coding agents across an enterprise. In my Unity Gateway page in my Databricks workspace, in the right-hand tab under govern, I'm going to click CLI configuration.

0:26 Configuring Unity Gateway CLI

Here, I can distribute and manage govern AI tools for my team. This configuration defines authorized models, access level, and budget limits across our organization. And to implement this, I'm going to click publish configuration, where I can edit the JSON configuration directly. And here we can see everything that I'm able to set. So, this is our default agent, our MCP server, skills, smart defaults, and exactly how they go into the JSON file.

0:48 Defining JSON configuration

And I have a custom file already ready, so I'm just going to paste that here. We can see the default agent I have enabled, which is Claude Code. I have smart routing available. I have my default models. I also have tracing enabled. And then I do the same for Codex, so the model services I want. And then if I scroll all the way down to the bottom, I can see my smart defaults. So, this is how I set my budgeting capabilities.
And let me show you how that looks when I publish it. Now we see the full active configuration. So, again, I have my default as Claude Code. I have the custom models available. I have the default model for Claude Code that I want it to use. I do the same with Codex. I have skills enabled. I have MCPs enabled. All the system MCPs like GitHub, Slack, Google, Atlassian, my smart defaults enabled. So, this is what I set up with those spend intervals.

1:40 Reviewing active settings

So, I say from 0 to 60% use Cloud Code and the models that I have available there. From 60 to 80% use Codex and a specific system model. And then if I reach 80 to 100% of my budget, I want to use a lower cost model like. Now, the UGC I picks up the latest configuration whenever a developer starts a new session. So, these updates will roll out without requiring my developers to manually reconfigure their agents. Let me show you what this looks like by copying over the configure command.
Just going to paste this into my terminal. I have to do a one-time authentication into my Databricks workspace. It's going to verify the connection. And we can see the configuration's complete. We have Cloud Code and Codex available, so we can switch back between the two. We have registered MCP servers. We have skills available. So, let's get started with UG Codex. And I'm going to ask, "What are Boba Brick's FY26 training goals?"

2:47 CLI deployment and usage

Here we can see our Unity Gateway smart router is enabled. So, because we're using Codex, we're using the GPT 5. 6 model. And it gave a reason for why it routed to the specific model citing that this is open-ended, localization, cross-cutting scope. And so, let's see how it did with the question. So, it explored my skills file. It searched through the Boba Brick's Confluence pages using the Atlassian MCP server. And that's actually where Bob Bricks has its FY26 training goals.

3:43 Running AI agent tasks

And then here we see the answer above 95% training completion is the goal by Q2, and gives us a source for where it got this information. All right, going back to my Databricks workspace. Next to the CLI configuration, I'm going to go into our traces view. Now, remember these are native OTel traces coming from our coding agents into this unified tracing table, and I'm going to click the latest trace ID. We can see some default language that comes from using Codex as a coding agent.

4:07 Tracing and monitoring

I'm going to scroll down to the outputs, so we can see that my skills were used, and we see the output with the cited source. And we can see that indeed this is the Bob Bricks page for the FY26 goals. Lastly, I wanted to show budgets. We saw in the CLI configuration that I was able to add smart defaults with the budget inch budget here, and that was by adding the ID from this budget to the CLI configuration in the JSON file.

4:44 Budgeting and conclusion

So, in conclusion, the Unity Gateway CLI UG gives developers access to the coding agents they want, while giving organizations central control over cost, model access, and security. I'm able to roll out coding agents across our development teams without forcing developers to change how they work. And I'm happy to announce that UG is available today, so I can't wait for you to check it out. Thank you.

Learn more about the Databricks Data and AI platform.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.