Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/deploy/agent-runtime/agents-cli.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Deploy to Agent Runtime with Agents CLI

<div class="language-support-tag" title="Agent Runtime currently supports only Python.">
<div class="language-support-tag" title="Agent Runtime currently supports Python and Go.">
<span class="lst-supported">Supported in ADK</span><span class="lst-python">Python</span>
</div>

Expand Down
128 changes: 96 additions & 32 deletions docs/deploy/agent-runtime/deploy.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Deploy to Agent Runtime

<div class="language-support-tag" title="Agent Runtime currently supports only Python.">
<span class="lst-supported">Supported in ADK</span><span class="lst-python">Python</span>
<div class="language-support-tag" title="Agent Runtime currently supports Python and Go.">
<span class="lst-supported">Supported in ADK</span><span class="lst-python">Python</span><span class="lst-go">Go v1.2.0</span>
</div>

This deployment procedure describes how to perform a standard deployment of
Expand Down Expand Up @@ -110,16 +110,30 @@ With your Google Cloud and coding environment prepared, you're ready to deploy
your agent. The instructions assume that you have an agent project folder,
such as:

```shell
multi_tool_agent/
├── .env
├── __init__.py
└── agent.py
```

For more details on the project files and format, see the
[multi_tool_agent](https://github.com/google/adk-docs/tree/main/examples/python/snippets/get-started/multi_tool_agent)
code sample.
=== "Python"

```shell
multi_tool_agent/
├── .env
├── __init__.py
└── agent.py
```

For more details on the project files and format, see the
[multi_tool_agent](https://github.com/google/adk-docs/tree/main/examples/python/snippets/get-started/multi_tool_agent)
code sample.


=== "Go"
```shell
multi_tool_agent/
├── go.mod
├── go.sum
└── main.go
```



## Deploy the agent {#deploy-agent}

Expand All @@ -130,35 +144,85 @@ managed Agent Runtime service. This process can take several minutes.
The following example deploy command uses the `multi_tool_agent` sample code as
the project to be deployed:

```shell
PROJECT_ID=my-project-id
LOCATION_ID=us-central1

adk deploy agent_engine \
--project=$PROJECT_ID \
--region=$LOCATION_ID \
--display_name="My First Agent" \
multi_tool_agent
```
=== "Python"

```shell
PROJECT_ID=my-project-id
LOCATION_ID=us-central1

adk deploy agent_engine \
--project=$PROJECT_ID \
--region=$LOCATION_ID \
--display_name="My First Agent" \
multi_tool_agent
```

=== "Go"

```shell
PROJECT_ID=my-project-id
LOCATION_ID=us-central1

adkgo deploy agentengine \
-e ./main.go \
-s "multi_tool_agent" \
-p $PROJECT_ID \
-r $LOCATION_ID \
-d .
```
Comment thread
karolpiotrowicz marked this conversation as resolved.


For `region`, you can find a list of the supported regions on the
[Agent Builder locations page](https://docs.cloud.google.com/agent-builder/locations#supported-regions-agent-engine).
To learn about the CLI options for the `adk deploy agent_engine` command, see the
[ADK CLI Reference](/api-reference/cli/#adk-deploy-agent-engine).

=== "Python"

To learn about the CLI options for the `adk deploy agent_engine` command, see the
[ADK CLI Reference](/api-reference/cli/#adk-deploy-agent-engine).

=== "Go"

To learn about the CLI options for the `adkgo deploy agentengine` command you can run `adkgo help deploy agentengine` which will display available options.
The most important are:
```shell
-e, --entry_point_path string Path to an entry point (go 'main')
-s, --name string Agent Engine name
-p, --project_name string GCP Project Name
-r, --region string GCP Region
-d, --source_dir string Directory to archive, defaults to current working directory
```


### Deploy command output

Once successfully deployed, you should see the following output:

```shell
Creating AgentEngine
Create AgentEngine backing LRO: projects/123456789/locations/us-central1/reasoningEngines/751619551677906944/operations/2356952072064073728
View progress and logs at https://console.cloud.google.com/logs/query?project=hopeful-sunset-478017-q0
AgentEngine created. Resource name: projects/123456789/locations/us-central1/reasoningEngines/751619551677906944
To use this AgentEngine in another session:
agent_engine = vertexai.agent_engines.get('projects/123456789/locations/us-central1/reasoningEngines/751619551677906944')
Cleaning up the temp folder: /var/folders/k5/pv70z5m92s30k0n7hfkxszfr00mz24/T/agent_engine_deploy_src/20251219_134245
```
=== "Python"
```shell
Creating AgentEngine
Create AgentEngine backing LRO: projects/123456789/locations/us-central1/reasoningEngines/751619551677906944/operations/2356952072064073728
View progress and logs at https://console.cloud.google.com/logs/query?project=hopeful-sunset-478017-q0
AgentEngine created. Resource name: projects/123456789/locations/us-central1/reasoningEngines/751619551677906944
To use this AgentEngine in another session:
agent_engine = vertexai.agent_engines.get('projects/123456789/locations/us-central1/reasoningEngines/751619551677906944')
Cleaning up the temp folder: /var/folders/k5/pv70z5m92s30k0n7hfkxszfr00mz24/T/agent_engine_deploy_src/20251219_134245
```

=== "Go"
```shell
Computing flags & preparing temp : Starting

...

> [Deployed Reasoning Engine: projects/887748635400/locations/us-central1/reasoningEngines/751619551677906944]
> [Display Name: simpleText]

Deploying to Agent Engine : Finished successfully
Cleaning temp : Starting
> [Clean temp starting with /tmp/agentEngine_20260424_141040__2470352066]

Cleaning temp : Finished successfully
```

Note that you now have a `RESOURCE_ID` where your agent has been deployed (which
in the example above is `751619551677906944`). You need this ID number along
Expand Down
33 changes: 24 additions & 9 deletions docs/deploy/agent-runtime/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Deploy to Agent Runtime

<div class="language-support-tag" title="Agent Runtime currently supports only Python.">
<span class="lst-supported">Supported in ADK</span><span class="lst-python">Python</span>
<div class="language-support-tag" title="Agent Runtime currently supports Python and Go.">
<span class="lst-supported">Supported in ADK</span><span class="lst-python">Python</span><span class="lst-go">Go v1.2.0</span>
</div>

Google Cloud Agent Platform
Expand Down Expand Up @@ -39,12 +39,27 @@ purposes:

## Deployment payload {#payload}

When you deploy your ADK agent project to Agent Runtime, the following content is
uploaded to the service:

- Your ADK agent code
- Any dependencies declared in your ADK agent code
=== "Python"

The deployment *does not* include the ADK API server or the ADK web user
interface libraries. The Agent Runtime service provides the libraries for ADK API
server functionality.
When you deploy your ADK agent project to Agent Runtime, the following content is
uploaded to the service:

- Your ADK agent code
- Any dependencies declared in your ADK agent code

The deployment *does not* include the ADK API server or the ADK web user
interface libraries. The Agent Runtime service provides the libraries for ADK API
server functionality.

=== "Go"

When you deploy your ADK project to Agent Runtime, the following content is uploaded to the server:

- Your ADK project source code

Please mind that Agent Runtime has its own API for querying the agent. All you have to do is use a dedicated launcher:
```go
l := agentengine.NewLauncher(agentEngineID)
err := l.Execute(ctx, config, os.Args[1:])
```
10 changes: 8 additions & 2 deletions docs/deploy/agent-runtime/test.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Test deployed agents in Agent Runtime

<div class="language-support-tag" title="Agent Runtime currently supports Python and Go.">
<span class="lst-supported">Supported in ADK</span><span class="lst-python">Python</span><span class="lst-go">Go v1.2.0</span>
</div>


These instructions explain how to test an ADK agent deployed to the
[Agent Runtime](https://cloud.google.com/vertex-ai/generative-ai/docs/agent-engine/overview)
runtime environment. Before using these instructions, you need to have completed
Expand Down Expand Up @@ -36,8 +41,9 @@ To find your project information with Google Cloud Console:
1. In the Google Cloud Console, navigate to the Agent Runtime page:
[https://console.cloud.google.com/vertex-ai/agents/agent-engines](https://console.cloud.google.com/vertex-ai/agents/agent-engines)

1. At the top of the page, select **API URLs**, and then copy the **Query
URL** string for your deployed agent, which should be in this format:
1. Choose the right instance

1. At the top of the page, select **Copy query URL**, which should be in this format:

https://$(LOCATION_ID)-aiplatform.googleapis.com/v1/projects/$(PROJECT_ID)/locations/$(LOCATION_ID)/reasoningEngines/$(RESOURCE_ID):query

Expand Down
49 changes: 32 additions & 17 deletions examples/go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,60 @@ module snippets
go 1.25.1

require (
google.golang.org/adk v0.2.0
google.golang.org/genai v1.35.0
google.golang.org/adk v1.3.0
google.golang.org/genai v1.57.0
)

require (
cloud.google.com/go v0.123.0 // indirect
cloud.google.com/go/auth v0.17.0 // indirect
cloud.google.com/go/auth v0.20.0 // indirect
cloud.google.com/go/compute/metadata v0.9.0 // indirect
github.com/a2aproject/a2a-go v0.3.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.31.0 // indirect
github.com/a2aproject/a2a-go v0.3.15 // indirect
github.com/a2aproject/a2a-go/v2 v2.3.1 // indirect
github.com/awalterschulze/gographviz v2.0.3+incompatible // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/jsonschema-go v0.3.0 // indirect
github.com/google/jsonschema-go v0.4.2 // indirect
github.com/google/s2a-go v0.1.9 // indirect
github.com/google/safehtml v0.1.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
github.com/googleapis/gax-go/v2 v2.15.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.15 // indirect
github.com/googleapis/gax-go/v2 v2.22.0 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.42.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 // indirect
go.opentelemetry.io/otel v1.43.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.16.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.39.0 // indirect
go.opentelemetry.io/otel/log v0.16.0 // indirect
go.opentelemetry.io/otel/metric v1.43.0 // indirect
go.opentelemetry.io/otel/sdk v1.43.0 // indirect
go.opentelemetry.io/otel/sdk/log v0.16.0 // indirect
go.opentelemetry.io/otel/trace v1.43.0 // indirect
golang.org/x/crypto v0.46.0 // indirect
golang.org/x/net v0.48.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.42.0 // indirect
golang.org/x/text v0.32.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect
google.golang.org/grpc v1.79.3 // indirect
google.golang.org/protobuf v1.36.10 // indirect
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
golang.org/x/crypto v0.51.0 // indirect
golang.org/x/mod v0.35.0 // indirect
golang.org/x/net v0.54.0 // indirect
golang.org/x/oauth2 v0.36.0 // indirect
golang.org/x/sync v0.20.0 // indirect
golang.org/x/sys v0.44.0 // indirect
golang.org/x/text v0.37.0 // indirect
google.golang.org/api v0.279.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260427160629-7cedc36a6bc4 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260511170946-3700d4141b60 // indirect
google.golang.org/grpc v1.81.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect
rsc.io/omap v1.2.0 // indirect
rsc.io/ordered v1.1.1 // indirect
)
Loading
Loading