How do I govern Claude Code, Codex, Cursor, and other coding agents?
Summary
- Unity Gateway centralizes governance for third-party coding agents, enforcing consistent security policies across tools and models regardless of vendor or execution context.
- Code-generation tools can be registered as managed models within Unity Gateway, allowing you to control who can use them, audit their usage, and see lineage back to the data they access.
- You can apply rate limits, approval workflows, and cost tracking to third-party code-generation tools, preventing unauthorized usage and controlling expenses at scale.
- Governed MCP servers and tool definitions in Unity Gateway let you restrict which external code-execution environments and integrations your developers can invoke from code-generation tools.
How do I govern Claude Code, Codex, Cursor, and other coding agents?
Third-party coding agents are widely used for productivity, but they introduce governance challenges: which users can use them, what data they access, and how much they cost. Unity Gateway solves this by bringing third-party code-generation tools under the same governance umbrella you use for your data, models, and AI services. You register the tool, define policies, and control access just as you would for any Databricks model or data asset.
What are third-party coding agents?
Third-party coding agents are cloud-hosted or desktop tools that generate code using large language models. They include VS Code extensions, command-line interfaces, and standalone applications that can write, refactor, or document code. Organizations adopt these tools for productivity but need assurance they're used safely: code generated may touch sensitive data, production systems, or proprietary logic.
Key capabilities to evaluate
| Capability | Why it matters |
|---|---|
| User identity and authentication | Establishes who can access the tool and enforces single sign-on (SSO) from your organization's identity provider. |
| Usage audit trails | Records which users invoked the tool, when, for how long, and what resources they accessed. |
| Rate limiting and quotas | Prevents runaway usage by capping concurrent sessions, API calls, or daily token consumption per user or team. |
| Approval workflows | Routes tool usage requests to approvers before execution, especially for high-risk operations or high-cost models. |
| Data lineage tracking | Traces which data the tool accessed or generated, linking back to the prompts and execution context. |
| Cost allocation | Tracks spending per user, team, or project and enforces budgets to control AI tool expenses. |
| MCP server integration | Restricts which external integrations and tools the code-generation service can invoke. |
How Databricks approaches governing third-party coding agents
Unity Gateway provides a unified governance model for any coding tool your organization uses. The process is straightforward:
- Register the tool as a model endpoint in Unity Gateway. Third-party coding agents connect via OAuth2 or API keys configured to route through your Databricks gateway.
- Define access policies. Use role-based or attribute-based access control to specify who can invoke the tool. For example, you might allow only data engineers to use it, or only within certain projects.
- Enable audit logging. Unity Gateway records every invocation: user, timestamp, token consumption, and any data assets queried. Audit logs are stored in your Databricks workspace and queryable via SQL.
- Enforce rate limits and approval workflows. You can set hard limits on concurrent usage or tokens-per-day. For premium or restricted tools, require approval before a user can begin a session.
- Monitor MCP servers and tool integrations. If the coding agent needs to connect to external APIs or internal tools (via Model Context Protocol or similar), you can govern those integrations separately in Unity Gateway.
- Link to data lineage. When the coding agent queries your data warehouses or lakes, Unity Gateway captures that in lineage metadata, showing which code-generation sessions accessed which datasets.
For more details, see the Unity Gateway documentation on registering and governing external models.
Use cases
Enterprise AI governance: A financial services firm wants all developers to use approved coding agents, with approval required before first use. Unity Gateway enforces this: the tool is listed in the gateway; only approved developers can request access; first access requires manager sign-off; usage is audited against audit logs for compliance reviews.
Cost control for high-volume teams: A startup with hundreds of developers using third-party code-generation tools sees unexpected AI bills. Using Unity Gateway quotas, they cap token consumption per developer per day and charge-back costs to each team's project.
Data security in regulated industries: A healthcare company uses code-generation tools but restricts them from connecting to databases containing patient records. They register the tool in Unity Gateway with a deny policy on the HIPAA-tagged schema, enforcing the restriction at the gateway layer.
Multi-tenant SaaS compliance: A SaaS provider gives customers access to coding agents but isolates usage: customer A's agents can only access customer A's data via row-level filtering enforced by the gateway.
FAQs
How does Unity Gateway control what data a coding agent can see?
When a coding agent queries your data platforms (Databricks, data warehouses, or external APIs), the query passes through Unity Gateway. Unity Gateway enforces the user's permissions from Databricks: row filters, column masks, and deny policies all apply automatically. The agent can't bypass these controls.
Can I restrict a coding agent to a specific region or network?
Yes. You can configure network policies (VPC isolation, IP allowlisting) on the Unity Gateway endpoint the tool connects to, restricting traffic to a specific region or internal network only.
What if a coding agent is both an IDE extension and a hosted service?
Each form factor is registered separately in Unity Gateway. You might gate the IDE extension for local development but require approval for the hosted web version, reflecting different security profiles.
How do I audit what code was generated?
Unity Gateway doesn't store the generated code itself, but it records metadata: the user, the invocation timestamp, the input prompt or context, token usage, and any data resources accessed. You can query this audit log to see trends in tool usage without retaining the generated code.
Can I govern open-source coding frameworks like LangGraph or CrewAI the same way?
Those frameworks are libraries, not external services, so they behave differently. However, if you host LangGraph or CrewAI agents as a model service in Databricks, you can govern the hosted service via Unity Gateway. Open-source frameworks running in user notebooks are governed through workspace-level permissions and code review processes instead.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.