Interface Environment
- All Known Implementing Classes:
VirtualThreadAgentProvider
public interface Environment
The environment in which agents live and interact.
It acts as a container, service registry, and communication medium.
- Since:
- 2.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptionvoidRegisters an agent in this environment.voidBroadcasts a message (object payload) to all agents.Finds an agent by its ID.Returns a read-only view of all agents in the environment.voidremoveAgent(Agent agent) Removes an agent from this environment.voidsend(ACLMessage message) Sends a directed ACL message.
-
Method Details
-
addAgent
Registers an agent in this environment.- Parameters:
agent- the agent to add.
-
removeAgent
Removes an agent from this environment.- Parameters:
agent- the agent to remove.
-
getAgent
-
getAgents
Collection<Agent> getAgents()Returns a read-only view of all agents in the environment.- Returns:
- collection of agents.
-
broadcast
-
send
Sends a directed ACL message.- Parameters:
message- the ACL message containing sender, receiver, and content.
-