Skip to content

feat(adk): identify individual agent invocations - #1163

Open
March-77 wants to merge 1 commit into
cloudwego:mainfrom
March-77:agent/issue-714-agent-invocation-id
Open

feat(adk): identify individual agent invocations#1163
March-77 wants to merge 1 commit into
cloudwego:mainfrom
March-77:agent/issue-714-agent-invocation-id

Conversation

@March-77

Copy link
Copy Markdown

What type of PR is this?

feat

Check the PR title.

  • This PR title matches the required format.
  • The description is user-oriented and clear.
  • No separate user-documentation PR is required; the public field is documented in Go.

(Optional) Translate the PR title into Chinese.

feat(adk): 标识每一次独立的 Agent 调用

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:

Add a framework-generated InvocationID to TypedAgentEvent/AgentEvent. Events from one agent execution share the same ID, while repeated, parallel, nested, or same-name invocations receive different IDs even when their RunPath values are identical.

The ID is carried through event copies, AgentTool forwarding, interrupt reconstruction, deterministic-transfer contexts, checkpoints, and panic/error events. Existing workflow interruption tests now also verify that distinct sub-agent invocations have distinct non-empty IDs.

Validation:

  • go test ./adk -run "TestRunContextInvocationID|TestAgentToolInvocationID" -count=10
  • go test -race ./adk -run "TestRunContextInvocationID|TestAgentToolInvocationID" -count=1
  • go test ./adk -run TestWorkflowInterrupt -count=1
  • go test ./adk
  • go test ./...
  • go vet ./...

golangci-lint could not be completed locally because the pinned runner repeatedly stalled while downloading github.com/MirrexOne/unqueryvet v1.5.4.

(Optional) Which issue(s) this PR fixes:

Fixes #714

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement Request for AgentEvent.RunPath to Uniquely Identify Multiple Runs of Nested Agents under EmitInternalEvents

1 participant