Post on 30-Jan-2022
© 2000, James Odell Agent Interaction Protocols in UML Page 1
Representing
Agent InteractionProtocols
in UML
James J. Odell
H. Van Dyke Parunak
Bernhard Bauer
© 2000, James Odell Agent Interaction Protocols in UML Page 2
Agent UMLA Formalism for
Specifying Multiagent
Software Systems
Bernhard BauerJörg P. MüllerJames Odell
Intelligent Autonomous Agents© Siemens AG
© 2000, James Odell Agent Interaction Protocols in UML Page 3
AN AGENT CONVERSATION
Seq Sndr Rcvr Utterance Rspndsto
Repliesto
Re-solves
Com-pletes
1. A B,C,D REQUEST: Please send me 50 widgets at yourcatalog price by next Thursday.
2. B C QUESTION: Are you bidding on A’s RFQ? 13. C B INFORM: Yes, I am. 2 2 24. B A REFUSE 3 1 15. C A PROPOSE (INFORM + REQUEST): How about
40 widgets at catalog price by next Friday?1 1
6. A C REQUEST: Please send me 40 widgets atcatalog price by next Friday.
5 5 5
7. C A COMMIT: I plan to send y ou 40 widgets atcatalog price by next Friday.
6 6 6
8. D A COMMIT: I plan to send y ou 50 widgets atcatalog price by next Thursday.
1 1 1
9. A C ASSERT: I’ve found a better supplier, and amnot relying on your COMMIT.
7,8 7
10. C A REFUSE: I’m abandoning my COMMIT. 9 9 711. D A SHIP: Here are your widgets. Please pay me. 1 1 812. A D ASSERT + REQUEST: You’re five short. Please
send the difference.11 11
13. D A SHIP: Here are five more widgets. Please payme.
12 12 12
14. A D PA Y 13 13 13
© 2000, James Odell Agent Interaction Protocols in UML Page 4
WINOGRAD-FLORES VERSION OF AN
AGENT INTERACTION PROTOCOL (AIP)
After Smith and Cohen 1995
1 2
8 9
7
43 5A: REQUEST
B: PROPOSE
A: ASSERT O
ut
B: REFUSE
B: SHIP A: PAY
A: ASSERT BadA: ASSER
T Out
A: A
SSER
T Ou
tB: REFU
SE
A: REFUSE
B: COMMIT
© 2000, James Odell Agent Interaction Protocols in UML Page 5
STANDARDIZATION
Analysis and Design Task Force (ADTF) ofObject Management Group (OMG)
Object Management Groupwww.omg.org
(508) 820-4300
Mission
❏ To enable developers to better understand how to developapplications using OT—thereby growing the market.
❏ To recommend technology that interoperates across thelifecycle of A&D tools designs/work products.
❏ To recommend technology that enables reuse of designs andwork products developed using A&D tools
❏ To recommend technology that has common semantics,meta-model, and abstract syntax for A&D methodologies.
❏ To leverage existing OMG specifications.
Overall goal: vendor-neutral common semantics, meta-
model, and abstract syntax for A&D methodologies
OA&D TF RFP-1 - approved and released June 1996Submissions due: 17 Jan 1997; Revisions due: 1 September 1997
Selection: 25 September 1997; Adoption: November 1997
© 2000, James Odell Agent Interaction Protocols in UML Page 6
MOF/OADF/BOF ARCHITECTURE
Met
aMod
el S
peci
aliz
atio
n
Low
Specific
Generic
High
Meta-Object Facility
OA&D (UML)Facility
Common Business Objects
Business Object Facility
Mfg Fin Med
CORBA 3.0
M3
M2
M2
M1
© 2000, James Odell Agent Interaction Protocols in UML Page 7
UML DIAGRAMS
❏ Static Diagrams
❏ Class diagrams
❏ Packages
❏ Component diagrams
❏ Dynamic Diagrams
❏ Statechart
❏ Collaboration diagrams
❏ Sequence diagrams
❏ Activity diagrams
❏ Deployment diagrams
❏ Use Case diagrams
So, which will be useful for representing
agent interaction protocols?
© 2000, James Odell Agent Interaction Protocols in UML Page 8
AGENTS STANDARDIZATION
AND AGENT UML (AUML)
❑ OMG Agents Working Group recommends standards foragent technology where appropriate—particularly theOMG's Object Management Architecture (OMA).(www.omg.org)
❑ FIPA (Federated Intelligent Physical Agents) has beenworking to develop and promote standardization in thearea of agent interoperability since 1996. It has an on-going work program, meeting around the globe on aquarterly basis, with excess of 50 member organizations.(www.fipa.org)
© 2000, James Odell Agent Interaction Protocols in UML Page 9
A COMMON AIPREPRESENTATION
UML Sequence Diagrams
FIPA Contract Net Protocol
call-for-proposal
Initiator Participant
refuse
not-understood
propose
accept-proposal
reject-proposal
inform
cancel
deadline
x
x
© 2000, James Odell Agent Interaction Protocols in UML Page 10
INTERACTION PROTOCOLS CAN BE
SPECIFIED IN MORE DETAIL
Role-1 Role-2
••• •••
CA-1
CA-2
CA-3
CA-4
Role-3x
y
g z
Role-2
© 2000, James Odell Agent Interaction Protocols in UML Page 11
A LAYERED APPROACH TO AIPs
❏ Level 1: Representing the overall protocol
❏ Level 2: Representing interaction among agents
❏ Level 3: Representing internal agent processing
© 2000, James Odell Agent Interaction Protocols in UML Page 12
USING PACKAGES TO EXPRESS
“NESTED” PROTOCOL
call-for-proposal
Purchasing
Supplying
Broker Retailer Wholesaler
request
inform
propose
•••
© 2000, James Odell Agent Interaction Protocols in UML Page 13
LEVEL 1
Generic AIP expressed
as a template package
contract initiation
call-for-proposal
FIPA Contract Net Protocol
Initiator Participant
refuse
not-understood
propose
accept-proposal
reject-proposal
inform
cancel
deadline
x
x
Initiator, ParticipantDeadline
call-for-proposal, refuse*, not-understood*, propose,
reject-proposal*, accept-proposal*, cancel*, inform*
© 2000, James Odell Agent Interaction Protocols in UML Page 14
BINDING THE PARAMENTERSOF THE FIPA� CONTRACT NET
PROTOCOL PACKAGE TEMPLATE
Buyer, Seller
FIPA Contract Net Protocol
8/8/99 at 12:00
seller-rfp, refuse-1, refuse-2, not-understood, propose,reject-proposal, accept-proposal, cancel, inform
© 2000, James Odell Agent Interaction Protocols in UML Page 15
APPLYING A TEMPLATE TO
A PARTICULAR SCENARIO
seller-rfp
Buyer Seller
refuse-1
not-understood
propose
accept-proposal
reject-proposal
inform
cancel
deadline:8/8/99 at
12:00 hoursx
x
xrefuse-2
© 2000, James Odell Agent Interaction Protocols in UML Page 16
LEVEL 2:
Basic format of Sequence Diagramsfor agent communication
Agent-1/Role:Class
CA-1
Agent-2/Role:Class
CA-2
© 2000, James Odell Agent Interaction Protocols in UML Page 17
CONCURRENT COMMUNICATIONWITH AN AGENT PLAYING
DIFFERENT ROLES
CA-1
Agent
or[role-1]
[role-1]
Agent Agent Agent
CA-2
CA-3
CA-1
CA-2
CA-3
Agent Agent Agent Agent
or
CA-1
CA-2
CA-3
CA-1
CA-2
CA-3
Agent Agent Agent Agent
or
CA-1
CA-2
CA-3
CA-1
CA-2
CA-3
x x
x
© 2000, James Odell Agent Interaction Protocols in UML Page 18
SEQUENCE DIAGRAM
Example
A /Negotiator
C /Contractor1
C /Contractor2
assert + request
pay
B /Contractor
request
question
inform
refuse
refuse
propose
commit
commit
assert
ship
ship
request
A /Customer
B /Competitor
Analyzer
C /Competitor
D /Contractor
D /Debtor
<<rolechange>>
<<rolechange>>
<<rolechange>>
© 2000, James Odell Agent Interaction Protocols in UML Page 19
DETECTING ROLES AS TIME INTERVALS
IN A SEQUENCE DIAGRAM
(only A’s roles labeled)
A : C : D :
assert + request
pay
B :
request
questioninform
refuse
refuse
propose
commit
commit
assert
ship
ship
request
<<role: customer>>
<<role: customer>>
<<role: customer>>
<<role: negotiator>>
<<role: negotiator>>
© 2000, James Odell Agent Interaction Protocols in UML Page 20
D :
ROLES AS PARALLEL BRANCHES
IN A SEQUENCE DIAGRAM
C :
assert + request
pay
B :
request
question
informrefuse
refuse
propose
commit
commit
assert
ship
ship
request
A :
<<role: customer>>
<<role:negotiator>>
<<role:contractor>>
<<role:contractor>>
<<role:contractor>>
<<role:contractor>>
<<role:competitoranalyzer>>
<<role:competitor>>
<<role:debtor>>
© 2000, James Odell Agent Interaction Protocols in UML Page 21
ROLES AS TYPES
WITHOUT INDIVIDUAL AGENTS
Negotiator Contractor
assert + request
pay
Contractor
request
questioninform
refuse
refuse
propose
commit
commit
assert
ship
ship
request
CustomerCompetitor
AnalyzerDebtor
<<role change>>
<<role change>>
<<role change>>
*
© 2000, James Odell Agent Interaction Protocols in UML Page 22
COLLABORATION DIAGRAM
An alternative representation
12: assert + request14:
6:
2: question
3:
4:
10: refuse
5: propose7: commit
8: commit11: ship
9: assert
13: ship
1.1: request
<<role change>>
1.2: request
1.3: request
<<role change>>
<<role change>>
C /Contractor2
C /Contractor1
B /Contractor
A Customer
B /Competitor
Analyzer
C /Competitor
D /Contractor
D /Debtor
A /Negotiator
© 2000, James Odell Agent Interaction Protocols in UML Page 23
ROLES ON MESSAGES
IN A COLLABORATION DIAGRAM
(only roles for A shown)
1.3: request<<role: customer>>
12: assert + request<<role: customer>>
14: pay<<role: customer>>
2: question
3: inform
4: refuse
5: propose 7: commit10: refuse
8: commit11: ship13: ship
1.1: request<<role: customer>> 1.2: request
<<role: customer>> 6: request
<<role: negotiator>> 9: assert
<<role: negotiator>>
B :
A :
C :
D :
© 2000, James Odell Agent Interaction Protocols in UML Page 24
ProcessOrder
CreateQuoteAccept
QuoteAcceptOrder
PlaceOrder
MatchOrder and
Quote
CloseOrder
UpdateQuote
SettleOrder
ACTIVITY DIAGRAMS
Another alternative representation
© 2000, James Odell Agent Interaction Protocols in UML Page 25
ORDER PROCESSING:
ACTIVITY DIAGRAMS WITH SWIMLANES
Customer Broker Market MakerECN
ProcessOrder
CreateQuoteAccept
QuoteAcceptOrder
PlaceOrder
MatchOrder and
Quote
CloseOrder
UpdateQuote
SettleOrder
© 2000, James Odell Agent Interaction Protocols in UML Page 26
ORDER PROCESSING:
ACTIVITY DIAGRAMSWITH SWIMLANES AND OBJECT FLOW
ProcessOrder
CreateQuoteAccept
QuoteAcceptOrder
PlaceOrder
Match Order and
Quote
CloseOrder
UpdateQuote
SettleOrder
Customer Broker Market MakerECN
Order[requested] Order
[unfilled]
Order [accepted]
Quote[unfilled]
Order[filled]
Quote[accepted]
Quote[filled]
Order[closed]
Quote[updated]
© 2000, James Odell Agent Interaction Protocols in UML Page 27
LEVEL 3
Generic AIP expressed
as a template package
completed
(Payment)(Invoice)
OrderAccepted
Orderplaced
OrderClose
Orderaccepted
Orderassembled
OrderShip
Ordershipped
Order
Paymentaccepted
OrderAssembled
Customer
Place order
Completed
Order Processor Invoice Sender Payment Receiver
Invoice request
Received payment
Invoice
Prepare/send
PaymentProcess
© 2000, James Odell Agent Interaction Protocols in UML Page 28
STATECHART NOTATION
Even another alternative
Proposed
Rejected
Aborted
Reneged
Committed Paid
A: REQUEST
B: PROPOSE
B: SHIP
A: PAYA: ASSERT Bad
B: COMMIT
A: ASSERT Out
A: ASSERT Out
B. RENEGE
B: REFUSEA: ASSERT Out
B: REFUSE
Open Closed
Requested Shipped
A state-based speech-act version
of the Winograd-Flores protocol
in UML statechart notation
© 2000, James Odell Agent Interaction Protocols in UML Page 29
REPRESENTING AGENT
INTERACTION PROTOCOLS
IN UML
❏ Level 1: Representing the overall protocol
❏ Level 2: Representing interaction among agents
❏ Level 3: Representing internal agent processing
© 2000, James Odell Agent Interaction Protocols in UML Page 30
OTHER UML EXTENSION
Package specifying agentsinstead of operations as interface points.
interfaceagent
NegotiatorAgent
• • •
ManufacturingCell
CommonFunctionAgents
ResourceAgent Resource
0..*
1..*
an aggregate
CommonFunctionAgents
ProcessPlanning
Agent
CapacityManager
Agent
AccountManager
Agent
1..
0..
DispatchAgent
• • •
telescopingagent
packages
© 2000, James Odell Agent Interaction Protocols in UML Page 31
OTHER UML EXTENSION
Adding mobility to deployment diagrams.
SalesWeb Internet server
Accountingmainframe
Inventorymainframe
CorporateNovell
Network/SQL
Internet
SalesAgent
ShopperAgent
Salesperson'slaptop
ShopperAgent
<<at-home>>
<<mobile>>
© 2000, James Odell Agent Interaction Protocols in UML Page 32
OTHER UML EXTENSION
Representing cloning, mitosis, and reproductionusing sequence and activity diagrams
Dolly:Sheep
Dolly2:Sheep
<<clone>><<prototype>>
Class Diagram
Dolly:Sheep
Dr_Frankenstein:Scientist
Dolly2:Sheep
get specs
<<clone>>
Sequence Diagram
A:Amoeba
A1:Amoeba
<<mitosis>>
A2:Amoeba
Mitosis
Sequence Diagram
Junior:Starfish
John:Starfish
Janet:Starfish
<<reproduction>>
Bisexual
Collaboration Diagram
© 2000, James Odell Agent Interaction Protocols in UML Page 33
OTHER UML EXTENSION
Representing parasitic, symbiotic, and emergencerelationship using class diagrams
Dog
Flea
0..*
0..*
<<host/parasite>>
Tree
Epiphyte
0..*
1
<<symbiosis>>
Market
Consumer
0..*
0..*
<<emergence>>
© 2000, James Odell Agent Interaction Protocols in UML Page 34
RepresentingAgent Interaction Protocols
(and then some)in UML
James J. Odell
H. Van Dyke Parunak
Bernhard Bauer
Agent UMLA Formalism for Specifying
Multiagent Software Systems
Bernhard Bauer
Jörg P. Müller
James Odell