googleapis / googleapis/python-aiplatform

Agent Engine, ADK agent: no Response Returned for streamQuery for deployed Agent Engine instance

オープン
#5,454 コメント 0 件 リアクション 0 件 担当者 1 名 @DeanChensj が担当を希望しています GitHub で見る
api: vertex-ai
主要言語
Python
スター
905
フォーク
465
平均マージ
1日 13時間
マージ済み PR(30日)
44

説明

I have a simple ADK agent written in Python working locally. However when i deploy to Agent Engine and try and query it, it does not return any response.

I've created and deployed an adk agent to Agent Engine which I can see is running and listed in the console. Everything seems to be working fine however if I call the api or interact via vertexai I do not receive any response

**Using API call**
https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/europe-west2/reasoningEngines/ENGINEID:streamQuery?alt=sse
The response I get is a 200 but is always empty.

**Using VertexAI**
```
def send_message(resource_id: str, message: str) -> None:
"""Send a message to the deployed agent."""
remote_agent = agent_engines.get(resource_id)

print(f"Trying remote agent: {resource_id}")
for event in remote_agent.stream_query(
user_id="user101",
session_id="888888888888", //just hard coding this for now
message=message,
):
print(event)
print("Done.")
```

The result is just an empty response.

This is my deployment code:
```
remote_agent = agent_engines.create(
app,
requirements=[
"google-cloud-aiplatform[adk,agent-engines]",
"google-adk",
"python-dotenv",
"google-auth",
"tqdm",
"requests",
"absl-py",
],
extra_packages=[
"./agent_aura", # The main package
],
display_name="Agent Aura"
)
```

If I create the adk app locally and try and query everything works as expected including trace logs.

```
app = AdkApp(
agent=root_agent,
enable_tracing=True
)

session = app.create_session(user_id="user_123")
print(f"session created for{session}")

for event in app.stream_query(
user_id="user_123",
session_id=session.id,
message="hello there"
):
print(event)
```

I can't see any errors in the logs when I deploy the app and there are no trace logs if I try and interact with the deployed agent so there is definitely something wrong somewhere.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。