Skip to content

Conversation

@smoreinis
Copy link
Contributor

@smoreinis smoreinis commented Jul 28, 2025

Instead of using the agent ID which is returned by the register call, use the agent API key (also returned by the register call) so that the key can be rotated if desired without changing the agent ID.

Additionally, since Temporal workers will also need to authenticate their request, added a registration call in the worker startup (and refactored the registration out into a shared utils module).

@smoreinis smoreinis marked this pull request as ready for review August 4, 2025 21:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR transitions the authentication mechanism from using agent IDs to agent API keys, enabling key rotation without changing agent identities. The registration logic has been refactored into a shared utility module for reuse across different components.

Key changes:

  • Extracted agent registration logic into a shared utils module
  • Updated authentication to use API keys instead of agent IDs
  • Added registration capability for Temporal workers

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/agentex/lib/utils/registration.py New shared module containing extracted agent registration logic with API key handling
src/agentex/lib/sdk/fastacp/base/base_acp_server.py Refactored to use shared registration module and updated auth to use API keys
src/agentex/lib/environment_variables.py Added AGENT_API_KEY environment variable support
src/agentex/lib/core/temporal/workers/worker.py Added agent registration call during worker startup
src/agentex/lib/adk/utils/_modules/client.py Updated authentication header to use API key instead of agent ID
examples/tutorials/00_sync/000_hello_acp/project/acp.py Removed trailing whitespace

@smoreinis smoreinis merged commit 948f7d1 into main Aug 6, 2025
7 of 8 checks passed
@smoreinis smoreinis deleted the stas/agent-auth branch August 6, 2025 22:54
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.

3 participants