0
0
Agentic AIml~10 mins

Agent communication protocols in Agentic AI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to send a message from one agent to another using the basic send method.

Agentic AI
agent.send([1])
Drag options to blanks, or click blank then click option'
A"Hello, Agent!"
Bmessage
Creceive()
Dconnect()
Attempts:
3 left
💡 Hint
Common Mistakes
Passing a variable instead of a string literal.
Using receive() instead of send().
Calling connect() which is unrelated here.
2fill in blank
medium

Complete the code to receive a message from another agent.

Agentic AI
incoming = agent.[1]()
Drag options to blanks, or click blank then click option'
Aconnect
Bsend
Creceive
Dlisten
Attempts:
3 left
💡 Hint
Common Mistakes
Using send() instead of receive().
Trying to use connect() which is for establishing connections.
Using listen() which is not a standard method here.
3fill in blank
hard

Fix the error in the code to broadcast a message to all connected agents.

Agentic AI
agent.[1]("Broadcast message")
Drag options to blanks, or click blank then click option'
Abroadcast
Bsend
Creceive
Dconnect
Attempts:
3 left
💡 Hint
Common Mistakes
Using send() which only sends to one agent.
Using receive() which is for incoming messages.
Using connect() which is for establishing connections.
4fill in blank
hard

Fill both blanks to check if the agent is connected and then send a message.

Agentic AI
if agent.[1]():
    agent.[2]("Status update")
Drag options to blanks, or click blank then click option'
Ais_connected
Bsend
Creceive
Dconnect
Attempts:
3 left
💡 Hint
Common Mistakes
Using receive() instead of send() to send messages.
Using connect() instead of is_connected() for checking status.
5fill in blank
hard

Fill all three blanks to create a message dictionary with sender, receiver, and content keys.

Agentic AI
message = {
    "sender": [1],
    "receiver": [2],
    "content": [3]
}
Drag options to blanks, or click blank then click option'
A"agent_1"
B"agent_2"
C"Hello there!"
D"status"
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up sender and receiver values.
Using status instead of a greeting message for content.