fix(sdk): use ephemeral ports for Parlant servers#341
Open
darvell-thenvoi wants to merge 2 commits into
Open
Conversation
darvell-thenvoi
marked this pull request as ready for review
June 3, 2026 19:41
darvell-thenvoi
force-pushed
the
fix/parlant-port-collision-INT-530
branch
from
June 4, 2026 20:47
c54eb0c to
60f93d3
Compare
amit-gazal-thenvoi
force-pushed
the
fix/parlant-port-collision-INT-530
branch
from
July 23, 2026 13:15
60f93d3 to
5638081
Compare
Parlant's in-process server binds a fixed default port, so starting a second Parlant agent on the same machine fails when the first still holds the port. Pass port=0 and tool_service_port=0 in the example servers so the OS assigns free ports, letting agents like Tom and Jerry run side by side. Document the two-terminal multi-agent run in the README. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A fresh, lockfile-free install of the google_adk / dev extras fails to
resolve: google-adk pulls opentelemetry-exporter-gcp-trace, which only
depends on prerelease (alpha) builds of opentelemetry-resourcedetector-gcp.
Plain installs exclude prereleases by default, and the sole stable build
(1.13.0) was yanked upstream ("breaks imports"), so there is no solution --
which breaks the packaging CI job's "install with all extras" step.
Declare opentelemetry-resourcedetector-gcp directly with a prerelease
specifier so the resolver may pick the alpha on a plain install, matching
what the lockfile already used.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
amit-gazal-thenvoi
force-pushed
the
fix/parlant-port-collision-INT-530
branch
from
July 23, 2026 13:50
68fc7cb to
3533aff
Compare
amit-gazal-thenvoi
requested review from
a team
and removed request for
amit-gazal-thenvoi
July 23, 2026 13:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
1. Ephemeral ports for the Parlant example servers. All five Parlant examples (
01_basic_agent.py–05_jerry_agent.py) now start their in-process servers on OS-assigned ports:The README gains a "Running two agents locally (Tom and Jerry)" section documenting the two-terminal invocation.
2. Allow the prerelease
opentelemetry-resourcedetector-gcp(CI fix). Declares that transitive package directly with a prerelease specifier in thegoogle_adkanddevextras, plus the regenerateduv.lock.Why
Ports: Parlant's in-process server binds a fixed default port. Starting a second Parlant agent on the same machine fails when the first still holds the port — e.g. running Tom and Jerry side by side, the second crashes with
SystemExit: 1from uvicorn startup.port=0/tool_service_port=0lets the OS pick free ports, so agents run concurrently. (Closes INT-530.)Dependency:
google-adkpullsopentelemetry-exporter-gcp-trace, which only depends on prerelease (alpha) builds ofopentelemetry-resourcedetector-gcp. A plain, lockfile-free install excludes prereleases by default, and the sole stable build (1.13.0) was yanked upstream ("breaks imports") — so a fresh resolve of[dev]/[google_adk]has no solution. This surfaced as thepackagingCI job's "Install with all extras" step failing (thetestjobs pass because they use the pinneduv.lock). It affects real end users ofband-sdk[google_adk], not just CI. Declaring the package with a prerelease specifier lets the resolver pick the alpha, matching what the lockfile already used.Validation
Notes
Rebuilt on current
main. Earlier revisions of this branch carried a large Parlant rewrite plus generic-runner/docs changes; those either landed onmainindependently or were superseded bymain's later Parlant work, so the Parlant change here is scoped to just the ephemeral-port fix.Closes INT-530