Skip to content

docs: add package-level documentation for core packages#629

Open
koriyoshi2041 wants to merge 1 commit intogoogle:mainfrom
koriyoshi2041:docs/add-package-documentation
Open

docs: add package-level documentation for core packages#629
koriyoshi2041 wants to merge 1 commit intogoogle:mainfrom
koriyoshi2041:docs/add-package-documentation

Conversation

@koriyoshi2041
Copy link
Copy Markdown

Summary

Adds doc.go files with package-level documentation for 6 core packages that currently lack Go doc comments:

  • artifact/ — Artifact storage and versioning
  • memory/ — Conversation memory and retrieval
  • model/ — LLM model abstraction and request/response types
  • plugin/ — Plugin lifecycle management
  • runner/ — Agent execution orchestration
  • telemetry/ — OpenTelemetry-based observability

Each doc.go follows standard Go documentation conventions, providing a package overview with key types and usage patterns.

Motivation

Running go doc on these packages currently shows no package-level documentation. This makes it harder for new contributors and users to understand each package's role in the ADK architecture.

Test plan

  • go build ./... passes
  • go vet ./... passes
  • go doc shows correct documentation for each package

Add doc.go files with Go doc comments and Apache 2.0 license headers
for artifact, memory, model, plugin, runner, and telemetry packages.
@google-cla
Copy link
Copy Markdown

google-cla bot commented Mar 6, 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.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the clarity and discoverability of core ADK packages by introducing dedicated doc.go files. This initiative addresses the current lack of package-level documentation, making it easier for developers to understand the purpose and functionality of key components like artifact management, memory, model interaction, plugin systems, agent execution, and telemetry. The addition of these files enhances the overall developer experience by providing readily accessible information through standard Go documentation tools.

Highlights

  • Enhanced Documentation: Added doc.go files to six core packages (artifact, memory, model, plugin, runner, telemetry) to provide comprehensive package-level documentation.
  • Improved Discoverability: These new doc.go files ensure that the go doc command now displays detailed overviews for each package, significantly aiding new contributors and users in understanding the ADK architecture.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • artifact/doc.go
    • Added package-level documentation for artifact management.
  • memory/doc.go
    • Added package-level documentation for agent memory.
  • model/doc.go
    • Added package-level documentation for LLM model interaction.
  • plugin/doc.go
    • Added package-level documentation for the plugin system.
  • runner/doc.go
    • Added package-level documentation for agent execution runtime.
  • telemetry/doc.go
    • Added package-level documentation for OpenTelemetry-based observability.
Activity
  • go build ./... passed successfully.
  • go vet ./... passed successfully.
  • go doc now correctly displays documentation for each updated package.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request improves documentation by adding doc.go files to centralize package-level comments, which is good practice. However, the original package comments in other files within the updated packages have not been removed. This creates duplicated and potentially conflicting documentation, which can be confusing for developers and increase maintenance overhead. I've added comments to each new doc.go file with specific suggestions to address this and fully centralize the documentation.

Comment thread artifact/doc.go
Comment on lines +15 to +17
// Package artifact provides a service for managing agent artifacts.
// Artifacts are versioned files identified by application name, user ID, session ID,
// and filename, with support for save, load, delete, list, and version operations.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The existing package comment in artifact/service.go is more descriptive and better structured. It would be beneficial to use that comment here to provide a clearer overview of the package. After moving the comment here, please remember to remove the original package comment from artifact/service.go to avoid duplication.

// Package artifact provides a service for managing artifacts.
//
// An artifact is a file identified by an application name, a user ID, a session ID,
// and a filename. The service provides basic storage operations for artifacts,
// such as Save, Load, Delete, and List. It also supports versioning of artifacts.

Comment thread memory/doc.go
Comment on lines +15 to +17
// Package memory defines the service for agent memory (long-term knowledge).
// It allows ingesting sessions into memory and searching for relevant entries
// across user-scoped sessions.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

To centralize documentation and avoid redundancy, the now-obsolete package comment in memory/service.go should be removed as part of this change.

Comment thread model/doc.go
Comment on lines +15 to +17
// Package model defines the interfaces and data structures for interacting with
// large language models (LLMs), including request and response types for content
// generation.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

To centralize documentation and avoid redundancy, the now-obsolete package comment in model/llm.go should be removed as part of this change.

Comment thread plugin/doc.go
Comment on lines +15 to +17
// Package plugin provides a plugin system for extending agent capabilities.
// Plugins can hook into the agent lifecycle through callbacks on user messages,
// events, model interactions, tool invocations, and run execution.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

To centralize documentation and avoid redundancy, the now-obsolete package comment in plugin/plugin.go should be removed as part of this change.

Comment thread runner/doc.go
Comment on lines +15 to +17
// Package runner provides a runtime for executing ADK agents within sessions.
// It manages message processing, event generation, and coordinates with session,
// artifact, memory, and plugin services.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

To centralize documentation and avoid redundancy, the now-obsolete package comment in runner/runner.go should be removed as part of this change.

Comment thread telemetry/doc.go
Comment on lines +15 to +16
// Package telemetry provides OpenTelemetry-based observability for ADK agent
// operations, including tracing and logging with optional export to Google Cloud.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

To centralize documentation and avoid redundancy, the now-obsolete package comments in telemetry/telemetry.go and telemetry/config.go should be removed as part of this change.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant