docs: add package-level documentation for core packages#629
docs: add package-level documentation for core packages#629koriyoshi2041 wants to merge 1 commit intogoogle:mainfrom
Conversation
Add doc.go files with Go doc comments and Apache 2.0 license headers for artifact, memory, model, plugin, runner, and telemetry packages.
|
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. |
Summary of ChangesHello, 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 Highlights
🧠 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
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
| // 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. |
There was a problem hiding this comment.
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.| // 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. |
| // Package model defines the interfaces and data structures for interacting with | ||
| // large language models (LLMs), including request and response types for content | ||
| // generation. |
| // 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. |
| // 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. |
| // Package telemetry provides OpenTelemetry-based observability for ADK agent | ||
| // operations, including tracing and logging with optional export to Google Cloud. |
Summary
Adds
doc.gofiles with package-level documentation for 6 core packages that currently lack Go doc comments:artifact/— Artifact storage and versioningmemory/— Conversation memory and retrievalmodel/— LLM model abstraction and request/response typesplugin/— Plugin lifecycle managementrunner/— Agent execution orchestrationtelemetry/— OpenTelemetry-based observabilityEach
doc.gofollows standard Go documentation conventions, providing a package overview with key types and usage patterns.Motivation
Running
go docon 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 ./...passesgo vet ./...passesgo docshows correct documentation for each package