Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion examples/parlant/01_basic_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ async def main() -> None:
if not rest_url:
raise ValueError("BAND_REST_URL environment variable is required")
# Start Parlant server with OpenAI (requires OPENAI_API_KEY env var)
async with p.Server(nlp_service=p.NLPServices.openai) as server:
async with p.Server(
port=0,
tool_service_port=0,
nlp_service=p.NLPServices.openai,
) as server:
# Create Parlant tools INSIDE server context
parlant_tools = create_parlant_tools()
logger.info(
Expand Down
6 changes: 5 additions & 1 deletion examples/parlant/02_with_guidelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ async def main() -> None:
if not rest_url:
raise ValueError("BAND_REST_URL environment variable is required")
# Start Parlant server with OpenAI
async with p.Server(nlp_service=p.NLPServices.openai) as server:
async with p.Server(
port=0,
tool_service_port=0,
nlp_service=p.NLPServices.openai,
) as server:
# Create Parlant tools INSIDE server context
parlant_tools = create_parlant_tools()
logger.info(
Expand Down
6 changes: 5 additions & 1 deletion examples/parlant/03_support_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ async def main() -> None:
if not rest_url:
raise ValueError("BAND_REST_URL environment variable is required")
# Start Parlant server
async with p.Server(nlp_service=p.NLPServices.openai) as server:
async with p.Server(
port=0,
tool_service_port=0,
nlp_service=p.NLPServices.openai,
) as server:
# Create support agent with guidelines
parlant_agent = await setup_support_agent(server)
logger.info("Support agent created: %s", parlant_agent.id)
Expand Down
6 changes: 5 additions & 1 deletion examples/parlant/04_tom_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ async def main() -> None:
raise ValueError("BAND_REST_URL environment variable is required")

# Load Tom's credentials from agent_config.yaml
async with p.Server(nlp_service=p.NLPServices.openai) as server:
async with p.Server(
port=0,
tool_service_port=0,
nlp_service=p.NLPServices.openai,
) as server:
parlant_tools = create_parlant_tools()

# Create Parlant agent with Tom's personality
Expand Down
6 changes: 5 additions & 1 deletion examples/parlant/05_jerry_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ async def main() -> None:
raise ValueError("BAND_REST_URL environment variable is required")

# Load Jerry's credentials from agent_config.yaml
async with p.Server(nlp_service=p.NLPServices.openai) as server:
async with p.Server(
port=0,
tool_service_port=0,
nlp_service=p.NLPServices.openai,
) as server:
parlant_tools = create_parlant_tools()

# Create Parlant agent with Jerry's personality
Expand Down
14 changes: 14 additions & 0 deletions examples/parlant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,20 @@ uv run python examples/parlant/03_support_agent.py

> **Note:** The config loader looks for `agent_config.yaml` in the current working directory. Running from a subdirectory will cause a `FileNotFoundError`.

### Running two agents locally (Tom and Jerry)

Each Parlant agent starts its own in-process server. The examples pass
`port=0` and `tool_service_port=0` so the OS assigns free ports, which lets
several agents run side by side without colliding on a fixed default port:

```bash
# terminal 1
uv run python examples/parlant/04_tom_agent.py

# terminal 2 (while Tom is still running)
uv run python examples/parlant/05_jerry_agent.py
```

---

## Adapter Options
Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ agentcore_runtime = [
]
google_adk = [
"google-adk>=1.0.0,<2",
# google-adk pulls opentelemetry-exporter-gcp-trace, which only depends on
# pre-release (alpha) builds of opentelemetry-resourcedetector-gcp. A plain
# install excludes pre-releases by default and the one stable build (1.13.0)
# was yanked upstream, leaving no solution — so request it explicitly with a
# pre-release specifier to allow the alpha.
"opentelemetry-resourcedetector-gcp>=1.11.0a0",
]
agno = [
"agno>=2.6.0",
Expand Down Expand Up @@ -194,6 +200,9 @@ dev = [
"google-genai>=1.43.0",
# Include google-adk for testing
"google-adk>=1.0.0,<2",
# See the google_adk extra: force the pre-release resourcedetector build so
# a plain (non-locked) install of this extra can resolve.
"opentelemetry-resourcedetector-gcp>=1.11.0a0",
# Include Agno for testing
"agno>=2.6.0",
# Include letta-client for testing
Expand Down
4 changes: 4 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.