mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
a2a sample update (#2391)
This commit is contained in:
committed by
GitHub
Unverified
parent
f9a94ce7b5
commit
ec08ee541d
@@ -53,7 +53,7 @@ async def main():
|
||||
resolver = A2ACardResolver(httpx_client=http_client, base_url=a2a_agent_host)
|
||||
|
||||
# Get agent card
|
||||
agent_card = await resolver.get_agent_card(relative_card_path="/.well-known/agent.json")
|
||||
agent_card = await resolver.get_agent_card()
|
||||
print(f"Found agent: {agent_card.name} - {agent_card.description}")
|
||||
|
||||
# Create A2A agent instance
|
||||
@@ -66,7 +66,7 @@ async def main():
|
||||
|
||||
# Invoke the agent and output the result
|
||||
print("\nSending message to A2A agent...")
|
||||
response = await agent.run("Tell me a joke about a pirate.")
|
||||
response = await agent.run("What are your capabilities?")
|
||||
|
||||
# Print the response
|
||||
print("\nAgent Response:")
|
||||
|
||||
Reference in New Issue
Block a user