google / google/adk-go

llmagent.Config should contain an ID field as the lookup key for config's instead of using the Name field.

Open
#674 1 comment 0 reactions 2 assignees Claimed by @mazas-google View on GitHub
enhancement needs review
Dominant language
Go
Stars
8.8k
Forks
1k
Avg merge
3d 18h
Merged PRs (30d)
88

Description

### Please describe the problem you are trying to solve.

I have a stateful agent system in which I can define agents and load them using ADK. Users can rename agents, but they can rename agents in the middle of multi-turn conversations. Because llmagent.Config's Name field is used as the key for saving and loading session state via the context/session functions, renaming an agent breaks saving/loading state entirely, as old records can't be found.

### Proposed Solution

llmagent.Config structs should have an ID field that can be used as a stable ID for an agent config, which is used to save and load state, look up memory, and more. This way agents aren't tied to their name, and the name is just a human readable identifier for an agent. This is aligns agent config with standard database practices in using id's and not human labels as keys.

### Impact on your work

I worked around this by writing custom wrappers, putting my stable ID in agent.Name, and figuring out how to map ID's to name at runtime via database lookups, which has increased load on my system.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.