Skip to content

fix(sdk/python): use actual version and metadata in agent registration#166

Merged
AbirAbbas merged 1 commit intomainfrom
fix/agent-registration-version-metadata
Jan 30, 2026
Merged

fix(sdk/python): use actual version and metadata in agent registration#166
AbirAbbas merged 1 commit intomainfrom
fix/agent-registration-version-metadata

Conversation

@AbirAbbas
Copy link
Copy Markdown
Contributor

Summary

  • Fixes hardcoded "version": "1.0.0" in registration payload to use the agent's actual version
  • Adds support for description, tags, and author metadata in registration via metadata.custom
  • Fixes hardcoded sdk_version in deployment tags to use real package version from agentfield.__version__

Fixes #148

Changes Made

  • client.py: Added version and agent_metadata parameters to register_agent() and register_agent_with_status(); replaced hardcoded sdk_version with dynamic import
  • agent.py: Added description, tags, author constructor params and _build_agent_metadata() helper
  • agent_field_handler.py: Pass version and metadata from all registration call sites
  • connection_manager.py: Same for reconnection call site
  • tests/helpers.py: Updated DummyAgentFieldClient and StubAgent to match new signatures

Test Plan

  • All existing pytest tests pass
  • Ruff linting passes
  • Manual verification: agent registers with correct version (2.5.3) and metadata fields visible in /api/v1/nodes response

🤖 Generated with Claude Code

The registration payload hardcoded version to "1.0.0" and did not include
agent metadata (description, tags, author). This passes the agent's actual
version and metadata through to the control plane registration endpoint.

Also fixes hardcoded sdk_version in deployment tags to use the real package
version from agentfield.__version__.

Fixes #148

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Performance

SDK Memory Δ Latency Δ Tests Status
Python 9.0 KB - 0.31 µs -11%

✓ No regressions detected

@AbirAbbas AbirAbbas merged commit 35d2685 into main Jan 30, 2026
27 checks passed
@AbirAbbas AbirAbbas deleted the fix/agent-registration-version-metadata branch January 30, 2026 15:06
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.

Agent Version Hardcoded in Registration Payload

1 participant