-
Notifications
You must be signed in to change notification settings - Fork 0
Use Agent API key for auth #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 |
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).