Skip to content

Changes for go deployment on agent engine.#1681

Open
kdroste-google wants to merge 3 commits intogoogle:mainfrom
kdroste-google:goAgentEngine
Open

Changes for go deployment on agent engine.#1681
kdroste-google wants to merge 3 commits intogoogle:mainfrom
kdroste-google:goAgentEngine

Conversation

@kdroste-google
Copy link
Copy Markdown
Collaborator

Added information about the deployment of a golang agent to Agent Engine

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 24, 2026

Deploy Preview for adk-docs-preview ready!

Name Link
🔨 Latest commit c38e09e
🔍 Latest deploy log https://app.netlify.com/projects/adk-docs-preview/deploys/69f377c82a629300089e03e7
😎 Deploy Preview https://deploy-preview-1681--adk-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@google-cla
Copy link
Copy Markdown

google-cla Bot commented Apr 24, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Comment thread docs/deploy/agent-runtime/deploy.md
@karolpiotrowicz
Copy link
Copy Markdown
Collaborator

Stale Python-only tag in docs/deploy/agent-runtime/deploy.md (lines 3–4)

The page header still marks this as Python-only:

<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>

Both the title attribute and the <span class="lst-python"> need to be updated to reflect Go support. For example:

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

(Exact tag name for Go should match whatever convention the rest of the docs site uses for language tags.)

Copy link
Copy Markdown
Collaborator

@koverholt koverholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR and additions!

  1. Let us know when this PR is out of draft state and ready for docs review.
  2. There is a problem with the committers in this PR that is causing the CI check to fail. Since this PR was co-authored by GitHub Copilot, it will not be possible to pass the CLA CI check. You will need to either amend the commit to remove the Copilot coauthor, or open a new PR without that coauthor.

Comment thread docs/deploy/agent-runtime/deploy.md Outdated

Creating source archive : Finished successfully
Deploying to Agent Engine : Starting
> [Methods: [{"api_mode":"async","description":"Creates a new session.\n\t\t\nArgs:\n user_id (str):\n\t Required. The ID of the user.\n session_id (str):\n Optional. The ID of the session. If not provided, an ID will be generated for the session.\n state (dict[str, Any]):\n Optional. The initial state of the session.\n\nReturns:\n Session: The newly created session instance.\n","name":"async_create_session","parameters":{"properties":{"session_id":{"nullable":true,"type":"string"},"state":{"nullable":true,"type":"object"},"user_id":{"type":"string"}},"required":["user_id"],"type":"object"}},{"api_mode":"async","description":"Get a session for the given user.\n\nArgs:\n user_id (str):\n Required. The ID of the user.\n session_id (str):\n Required. The ID of the session.\n\nReturns:\n Session: The session instance (if any). Returns an error on failure\n\n","name":"async_get_session","parameters":{"properties":{"session_id":{"type":"string"},"user_id":{"type":"string"}},"required":["user_id","session_id"],"type":"object"}},{"api_mode":"async","description":"List sessions for the given user.\n\nArgs:\n user_id (str):\n Required. The ID of the user.\n\nReturns:\n ListSessionsResponse: The list of sessions with data.\n","name":"async_list_sessions","parameters":{"properties":{"user_id":{"type":"string"}},"required":["user_id"],"type":"object"}},{"api_mode":"async","description":"Deletes a session for the given user.\n\nArgs:\n user_id (str):\n Required. The ID of the user.\n session_id (str):\n Required. The ID of the session.\n\nReturns:\n\ton success returns an empty string. On error returns an error message.\n\n","name":"async_delete_session","parameters":{"properties":{"session_id":{"type":"string"},"user_id":{"type":"string"}},"required":["user_id","session_id"],"type":"object"}},{"api_mode":"async_stream","description":"Streams responses asynchronously from the ADK application.\nArgs:\n message (genai.Content):\n Required. The message to stream responses for.\n user_id (str):\n Required. The ID of the user.\n session_id (str):\n Optional. The ID of the session. If not provided, a new session will be created for the user.\n\nYields:\n Single lines with JSON encoded event each. Errors are also emitted as JSON.\n\n","name":"async_stream_query","parameters":{"properties":{"message":{"additionalProperties":true,"type":"object"},"session_id":{"nullable":true,"type":"string"},"user_id":{"type":"string"}},"required":["message","user_id"],"type":"object"}}]]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is screen dump is entirely too much detail and just adds unnecessary noise.

Cut out all of this except for the starting information and the conclusion showing the completion message only.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, fixed

Comment thread docs/deploy/agent-runtime/deploy.md Outdated

=== "Go"
```shell
random_agent/
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The structure of this example agent should be as simple as possible and have a common naming scheme to the python files (e.g., main.go should be agent.go)

Are these files actually necessary for deployment or just conveniences?

  • go.mod
  • go.sum

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We consistently name entry points for all examples main.go and this is pretty common way.

go.mod and go.sum are standard, following https://adk.dev/get-started/go/#define-the-agent-code
you will have those files after you do

go mod init my-agent/main
go mod tidy

@kdroste-google
Copy link
Copy Markdown
Collaborator Author

Stale Python-only tag in docs/deploy/agent-runtime/deploy.md (lines 3–4)

The page header still marks this as Python-only:

<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>

Both the title attribute and the <span class="lst-python"> need to be updated to reflect Go support. For example:

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

(Exact tag name for Go should match whatever convention the rest of the docs site uses for language tags.)

Fixed

@kdroste-google
Copy link
Copy Markdown
Collaborator Author

Thanks for the PR and additions!

  1. Let us know when this PR is out of draft state and ready for docs review.
  2. There is a problem with the committers in this PR that is causing the CI check to fail. Since this PR was co-authored by GitHub Copilot, it will not be possible to pass the CLA CI check. You will need to either amend the commit to remove the Copilot coauthor, or open a new PR without that coauthor.

About the copilot: I have removed it from commits

@desiorac
Copy link
Copy Markdown

Two gaps in the Go section worth addressing before merge:

The adkgo deploy agentengine flags (-e, -s, -p, -r, -d) aren't documented inline or linked to a CLI reference. The Python section links to [ADK CLI Reference](/api-reference/cli/#adk-deploy-agent-engine) — Go needs an equivalent.

Also index.md: "Agent Runtime has it's own API" — should be "its".

@kdroste-google
Copy link
Copy Markdown
Collaborator Author

Two gaps in the Go section worth addressing before merge:

The adkgo deploy agentengine flags (-e, -s, -p, -r, -d) aren't documented inline or linked to a CLI reference. The Python section links to [ADK CLI Reference](/api-reference/cli/#adk-deploy-agent-engine) — Go needs an equivalent.

Added a section explaining the flags. But maybe it makes sense to have separate pages for CLI

Also index.md: "Agent Runtime has it's own API" — should be "its".
Fixed, thanks!

@kdroste-google kdroste-google marked this pull request as ready for review April 30, 2026 15:41
@kdroste-google
Copy link
Copy Markdown
Collaborator Author

Please look at the new file "methods.md". It's not final, but in my opinion such an approach will allow end users to use ADK deployed on AgentEngine easier. For me, I had a lot of friction due to not specified inputs , outputs, error handling and misleading overrides done by aiplatform.

Copy link
Copy Markdown
Collaborator

@karolpiotrowicz karolpiotrowicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

Copy link
Copy Markdown
Collaborator

@karolpiotrowicz karolpiotrowicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

Copy link
Copy Markdown
Collaborator

@karolpiotrowicz karolpiotrowicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

Copy link
Copy Markdown
Collaborator

@karolpiotrowicz karolpiotrowicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

Copy link
Copy Markdown
Collaborator

@karolpiotrowicz karolpiotrowicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few issues to fix before merging — mostly in the new methods.md file.

</tr>
<tr>
<td>async_get_session</td>
<td></td>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like async_get_session, async_list_sessions, async_create_session, and async_delete_session are each listed twice in the Session management table — probably a copy-paste thing. Can you clean those up?

Session data is returned

#TODO(kdroste): create a schema for that
```go
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a #TODO(kdroste) comment still in here — probably don't want that going out in the public docs 😄 Either fill it in or pull it for now.

"description": "Method-specific input",
"type": "object"
},
},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing comma after the last property in properties — invalid JSON. Remove the , on this line.

"description": "Object describing the error",
"type": "object"
},
},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same trailing comma issue here — last property in properties shouldn't have a comma.

"description": "Dictionary mapping string to objects",
"type": "object"
},
},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here — trailing comma after the "state" property.

"class_method": "async_create_session",
"input": {
"user_id": "u_12345",
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing comma in the curl JSON body too — this one will actually break if someone copy-pastes and runs it. Also, the file is missing a trailing newline (flagged by the diff) — quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants