section_heading: Agent s periodičkim ponašanjem (Periodic Behaviour):
paragraph_text: import spade class MyAgent(spade.Agent.Agent): class MyBehav(spade.Behaviour.PeriodicBehaviour): def onStart(self): print "Starting behaviour. . ." self.counter = 0 def _onTick(self): print "Counter:", self.counter self.counter = self.counter + 1 def _setup(self): print "MyAgent starting. . ." b = self.MyBehav(1) self.addBehaviour(b, None) if __name__ == "__main__": a = MyAgent("agent@myhost.myprovider.com", "secret") a.start