Skip to content

Commit b82cf83

Browse files
Refined docs for workflowagents, memory & model packages. (google#223)
* Add workflowagents comments * Add model comments * Add memory package comments * Update agent/workflowagents/loopagent/agent.go Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update agent/workflowagents/sequentialagent/agent.go Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update agent/workflowagents/parallelagent/agent.go Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update agent/workflowagents/sequentialagent/agent.go Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update memory/service.go Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent a8f2b0e commit b82cf83

File tree

6 files changed

+13
-4
lines changed

6 files changed

+13
-4
lines changed

‎agent/workflowagents/loopagent/agent.go‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// Package loopagent provides an agent that repeatedly runs its sub-agents for a
16+
// specified number of iterations or until termination condition is met.
1517
package loopagent
1618

1719
import (
@@ -23,6 +25,7 @@ import (
2325
"google.golang.org/adk/session"
2426
)
2527

28+
// Config defines the configuration for a LoopAgent.
2629
type Config struct {
2730
// Basic agent setup.
2831
AgentConfig agent.Config

‎agent/workflowagents/parallelagent/agent.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// Package parallelagent provides an agent that runs its sub-agents in parallel.
1516
package parallelagent
1617

1718
import (
@@ -25,6 +26,7 @@ import (
2526
"google.golang.org/adk/session"
2627
)
2728

29+
// Config defines the configuration for a ParallelAgent.
2830
type Config struct {
2931
// Basic agent setup.
3032
AgentConfig agent.Config

‎agent/workflowagents/sequentialagent/agent.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// Package sequentialagent provides an agent that runs its sub-agents in a sequence.
1516
package sequentialagent
1617

1718
import (
@@ -48,6 +49,7 @@ func New(cfg Config) (agent.Agent, error) {
4849
return sequentialAgent, nil
4950
}
5051

52+
// Config defines the configuration for a SequentialAgent.
5153
type Config struct {
5254
// Basic agent setup.
5355
AgentConfig agent.Config

‎memory/service.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// Package memory defines the entities to interact with agent memory (long-term knowledge).
1516
package memory
1617

1718
import (
@@ -24,8 +25,8 @@ import (
2425

2526
// Service is a definition of the memory service.
2627
//
27-
// The service provides functionalities to ingest sessions into memory so that
28-
// the memory can be used for user queries.
28+
// The service ingests sessions into memory so that it can be used for
29+
// user queries across user-scoped sessions.
2930
type Service interface {
3031
// AddSession adds a session to the memory service.
3132
//

‎model/gemini/gemini.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// Package gemini implements the model.LLM interface for Gemini models.
1516
package gemini
1617

1718
import (
@@ -36,8 +37,7 @@ type geminiModel struct {
3637
versionHeaderValue string
3738
}
3839

39-
// NewModel creates and initializes a new model instance that satisfies the
40-
// model.LLM interface, backed by the Gemini API.
40+
// NewModel returns [model.LLM], backed by the Gemini API.
4141
//
4242
// It uses the provided context and configuration to initialize the underlying
4343
// genai.Client. The modelName specifies which Gemini model to target

‎model/llm.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// Package model defines the interfaces and data structures for interacting with LLMs.
1516
package model
1617

1718
import (

0 commit comments

Comments
 (0)