How to create a new Agent

In reality we must say an agent prototype. If for example we program a coordinator for "order" processing then in the case of five (5) running "orders" then five (5) different instances of the coordinator agent are active. Lets see then how an agent prototype  is constructed.

 

1. By right clicking the mouse we select Developer.
2. In the appearing window we select Agents.
3. In the appearing window we select Agent Builder.

 

In the form that is displayed it appears:

 

{....................................AGENT INFO..............................................}

start_agent_info

       AgentName = "replace this with the agent name"

       AgentDescr = ""

       AgentLanguage = ""

       __timer_interval = 0{....define (in seconds) the timer interval for the wake up}

       __is_registered = 1{.....1=the agent keeps trail to database, 0=starting without trail}

       __delete_on_termination = 0{....1=the agent frees itself when terminates its task}

end_agent_info

{....................................ACTION CODE..............................................}

start_action

       {.....put some action code here}

end_action

 

4.By pressing the Create button the first agent has been created.

 

The agent info and the action are required sections in agent building.