Skip to main content

Agent Runtime

Agent Runtime runs your agent on Databricks-hosted serverless compute. It runs your agent server, such as DurableAgentServer, on Databricks Apps, so you deploy code instead of provisioning servers. To learn how Agent Runtime fits with your framework and agent server, see Deploy agents on Databricks.

What Agent Runtime provides​

  • A stable, authenticated endpoint: Each deployment is an app named agent-bricks-<name> with its own URL. Clients authenticate with a Databricks OAuth token. See Query agents deployed on Databricks.
  • Agent identity: The agent runs as the app's service principal. See Agent identity.
  • Durable execution: For agents that use DurableAgentServer, deployment provisions a Runtime Store so that run state survives worker restarts and interrupted runs can recover.
  • Tracing: Deployment configures MLflow tracing to the experiment that the project binds. See Tracing overview.
  • Scaling: Run an agent on 1 to 5 instances. See Horizontal scaling for Databricks apps.

Agent identity​

An agent's identity is the service principal of the app that it's deployed to. The agent uses this identity to call Databricks APIs and to run tools that you add with --auth app.

  • When you deploy, agentbricks deploy grants the service principal access to the memory, session, and run state stores that the agent uses.
  • To give the agent access to other data and resources, grant the app's service principal the permissions it needs, as you would for any app. See Configure authorization in a Databricks app.
  • Tools that use auth = "user" run with the permissions of the user who sent the request instead of the service principal. See Request-user authorization.

Deploy an agent​

Deploy an agent project with the Agent Bricks CLI:

Bash
agentbricks --profile <profile> deploy my-agent

agentbricks deploy does the following:

  1. Creates or reuses the memory and session stores declared in agent.toml, and grants the app's service principal access to them.
  2. For agents that use DurableAgentServer, creates or reuses the deployment's Runtime Store.
  3. Configures tracing.
  4. Deploys the app.

To run the agent on more than one instance, pass --instances:

Bash
agentbricks --profile <profile> deploy my-agent --instances 2

When an agent runs on more than one instance, clients can send the session ID in an X-Routing-Key header to route all requests in a session to the same instance.

Manage deployments​

Command

Description

agentbricks deployments list

List your agent deployments.

agentbricks deployments get <app-name>

Show a deployment's URL, status, and description.

agentbricks deployments logs <app-name>

Show a deployment's logs.

agentbricks deployments start <app-name> and agentbricks deployments stop <app-name>

Start or stop a deployment.

agentbricks deployments delete <app-name>

Delete a deployment.

Command

Description

agentbricks deployments list

List your agent deployments.

agentbricks deployments get <app-name>

Show a deployment's URL, status, and description.

agentbricks deployments logs <app-name>

Show a deployment's logs.

agentbricks deployments start <app-name> and agentbricks deployments stop <app-name>

Start or stop a deployment.

agentbricks deployments delete <app-name>

Delete a deployment.

Because each deployment is an app, you can also view and monitor it in Databricks Apps. See Logging and Monitoring for Databricks Apps.

Limitations​

You can't change the agent server of an existing deployment. To switch servers, create a new project with the agentbricks init --server option that you want, and deploy it under a new name.

Additional resources​