google / google/adk-go

[Suggestion] Update documentation for the session interface to clarify how it internally works

Open
#539 1 comment 0 reactions 2 assignees View on GitHub

@kdroste-google is already working on this.

Since May 19, 2026.

documentation needs review
Dominant language
Go
Stars
8.8k
Forks
1k
Avg merge
3d 18h
Merged PRs (30d)
88

Description

🔴 Required Information

Is your feature request related to a specific problem?

While implementing a custom session.Session, it was confusing that my events weren't taken into account by the agent.

ie

Prompt : "Reply to general questions"

If my GetResponse is

	return &session.CreateResponse{
		Session: sessionImplementation,
	}, nil

The response to "What is the capital city of Germany" will be "Hello, I am ready to help!"

While what is expected is "The capital city of Germany is Berlin." which happens only when a reference is passed :

	return &session.CreateResponse{
		Session: &sessionImplementation,
	}, nil

This happens because :

  1. Session is saved at https://github.com/google/adk-go/blob/03705a53d99ea9b2e794ef5328f8f70cb2c90e43/runner/runner.go#L130
  2. Events reference is updated at https://github.com/google/adk-go/blob/main/runner/runner.go#L172
Proposed Solution

I

Impact on your work

This is confusing when trying to implement a custom session, as it often means that the only way to know how it works internally is to check the source code directly/ the inmemory implementation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.