Skip to content

Add Google ADK Go integration#527

Merged
danielchalef merged 3 commits into
mainfrom
feat/zep-adk-go
Jun 18, 2026
Merged

Add Google ADK Go integration#527
danielchalef merged 3 commits into
mainfrom
feat/zep-adk-go

Conversation

@danielchalef

Copy link
Copy Markdown
Member

Adds the Google ADK Go integration (module github.com/getzep/zep/integrations/adk/go).

Hook (verified against google.golang.org/adk v1.4.0)

NewBeforeModelCallback(client, ...) — a BeforeModelCallback that persists the latest user message via Thread.AddMessages{ReturnContext:true} and injects the returned Context Block into req.Config.SystemInstruction; attach via llmagent.Config.BeforeModelCallbacks. zepMemoryService implements memory.Service (AddSessionToMemory/SearchMemory over Graph.Search) and attaches at the Runner. Optional graph-search functiontool. Live calls are guarded when ZEP_API_KEY is unset.

Deps

google.golang.org/adk@v1.4.0, github.com/getzep/zep-go/v3@v3.23.0 (genai pinned via go mod tidy). Go ≥1.23.

Release note

Go modules aren't published to a registry — this versions via the module-path tag integrations/adk/go/vX.Y.Z (go get github.com/getzep/zep/integrations/adk/go@vX.Y.Z).

Ships

README, SETUP.md (Zep signup), example main.go, table tests, Makefile.

Validation

go build ./... + go vet ./... + go test ./... (all exit 0). Approach in integrations/SPIKE_FINDINGS.md.

🤖 Generated with Claude Code

danielchalef added a commit that referenced this pull request Jun 18, 2026
The Claude Code Review workflow (added in #530) granted only
`pull-requests: read` / `issues: read`. The anthropics/claude-code-action
needs Pull requests + Issues write access to post its findings as inline PR
comments — with read-only, the run succeeds but posts nothing (observed:
`permission_denials_count: 20`, `No buffered inline comments`, zero comments
on PRs #522#527/#529). Per the official docs, the action's GitHub App requires
Contents/Issues/Pull requests Read & write, and every posting example uses
`pull-requests: write` + `issues: write`.

Bump pull-requests and issues to write (contents stays read — review-only, no
commits/PRs created).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
danielchalef added a commit that referenced this pull request Jun 18, 2026
The code-review plugin only posts findings when invoked with `--comment`;
without it the action reviews the PR (spending tokens) but prints to the
hidden terminal and posts nothing. Confirmed across PRs #522#527/#529:
runs complete `success` with write perms (post-#531) but log "No buffered
inline comments" and leave zero comments. Per the plugin spec ("If --comment
was NOT provided, stop here. Do not post any GitHub comments.").

Append --comment to the prompt; #531's pull-requests/issues write perms are
required for it to post and stay in place.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
danielchalef and others added 3 commits June 18, 2026 11:00
Zep memory for Google ADK (Go) via a before-model callback, a memory.Service,
and a graph-search tool.

- NewBeforeModelCallback(client, ...): persists the latest user message
  (Thread.AddMessages{ReturnContext:true}) and injects the returned Context
  Block into req.Config.SystemInstruction. Attach via llmagent.Config
  BeforeModelCallbacks.
- zepMemoryService implements memory.Service (AddSessionToMemory / SearchMemory
  over Graph.Search); attaches at the Runner. Optional graph-search FunctionTool.
- Module github.com/getzep/zep/integrations/adk/go; deps google.golang.org/adk
  v1.4.0 + github.com/getzep/zep-go/v3 v3.23.0. Live calls guarded when
  ZEP_API_KEY is unset.
- README, SETUP, example main.go, table tests. CI already routes integrations/adk/go.

Verified: go build ./... + go vet ./... + go test ./... (all exit 0). See
integrations/SPIKE_FINDINGS.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The pinned golangci-lint-action@v6 installs golangci-lint v1.64.8 (built with
go1.24), which fails to lint a module whose go.mod targets go 1.25.0 with
"the Go language version (go1.24) ... is lower than the targeted Go version
(1.25.0)". v8 installs golangci-lint v2.x (built with go >=1.25), which lints
go 1.25 modules. golangci-lint v2.12.2 reports 0 issues on the adk/go package.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Apply code-review fixes to the zepadk integration:

- BeforeModelCallback no longer re-persists the user message or re-injects the
  Context Block on tool-loop continuations (e.g. the search_memory path). It
  detects a continuation by checking whether the latest req.Contents entry is a
  function response, so a turn is recorded in Zep exactly once.
- Add NewAfterModelCallback (WithAssistantMessageName, WithAfterLogger) that
  persists the assistant's reply to the same thread via Thread.AddMessages, so
  the user graph captures both halves of the conversation. Wired into the
  example and documented.
- Map every supported graph search scope into results in both the memory
  service and the search tool (edges -> facts, nodes -> entity summaries,
  episodes -> content, observations -> derived memories, auto -> Context Block).
  Unsupported scopes (e.g. thread_summaries) are rejected loudly instead of
  silently returning nothing. Shared mapping lives in search.go.
- Truncate over-limit message content to 4000 chars (Zep's limit is 4096)
  before persisting, with a lengths-only warning (never logs content/PII).
  Shared helper in zep.go.
- Introduce a minimal zepAPI seam over *zepclient.Client (AddMessages/Search)
  so persist/inject/dedup/scope-mapping are table-tested with an in-memory fake
  (seam_test.go); public constructor signatures are unchanged.
- Correct the documented Go floor to 1.25 (adk v1.4.0 requires it).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jun 18, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@danielchalef danielchalef merged commit 5e1082f into main Jun 18, 2026
9 checks passed
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