Skip to content

Feature: Allow AGENT_ENDPOINT env var to customize URL on Agent card - #179

Merged
esnible merged 2 commits into
rossoctl:mainfrom
esnible:custom-host-part2
Mar 16, 2026
Merged

Feature: Allow AGENT_ENDPOINT env var to customize URL on Agent card#179
esnible merged 2 commits into
rossoctl:mainfrom
esnible:custom-host-part2

Conversation

@esnible

@esnible esnible commented Mar 16, 2026

Copy link
Copy Markdown
Member

Summary

This continues PR #144 adding support for Agent Card URL customization to other examples that incorrect offered http://0.0.0.0:8000.

A follow-up PR in the Kagenti repo will make Kagenti supply the $AGENT_ENDPOINT value.

Related issue(s)

rossoctl/rossoctl#776

Signed-off-by: Ed Snible <snible@us.ibm.com>
@esnible
esnible requested a review from pdettori March 16, 2026 15:36

@mrsabath mrsabath left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review Summary

The PR applies the AGENT_ENDPOINT env var override pattern consistently across 12 agent examples, continuing work from PR #144. The trailing-slash normalization (.rstrip("/") + "/") is a nice touch.

Issue: 4 files missing import os

These files use os.getenv() but do not have import os, causing NameError at runtime (confirmed by CI lint failure F821):

  • a2a/file_organizer/src/file_organizer/agent.py
  • a2a/reservation_service/src/reservation_service/agent.py
  • a2a/slack_researcher/a2a_agent.py
  • a2a/weather_service/src/weather_service/agent.py

The other 8 files are fine -- 6 have the import added in this PR, and 2 already had it from PR #144.

Fix: Add import os to each of the 4 affected files.

Areas reviewed: Python, Security, Commits
Commits: 1 commit, signed-off: yes
CI status: lint failing (F821 Undefined name os)

Signed-off-by: Ed Snible <snible@us.ibm.com>
@esnible

esnible commented Mar 16, 2026

Copy link
Copy Markdown
Member Author

@mrsabath Your review is correct about a2a/slack_researcher/a2a_agent.py, although lint had independently found the problem and I was fixing it as you conducted your review. The other three files DO have the import os. Perhaps re-review or help me to understand the problem.

@mrsabath mrsabath left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Follow-up Review

Previous REQUEST_CHANGES issues resolved:

  • slack_researcher/a2a_agent.py -- fixed in commit 8d15b8d (added import os)
  • file_organizer, reservation_service, weather_service -- already had import os on the fork branch (my earlier check against upstream main was misleading)

All CI checks pass (lint, test, security scans, DCO). LGTM.

@esnible
esnible merged commit 19e24ea into rossoctl:main Mar 16, 2026
9 checks passed
@esnible
esnible deleted the custom-host-part2 branch March 16, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants