jason-lang / jason

Jason is a fully-fledged interpreter for an extended version of AgentSpeak, a BDI agent-oriented logic programming language.
http://jason-lang.github.io
GNU Lesser General Public License v3.0
217 stars 67 forks source link

Add agent runtime from code #105

Closed Breinich closed 5 months ago

Breinich commented 5 months ago

I would like to ask, is there a way to add a new agent instance runtime from code, like the way you can do from the MAS window?

As I've browsed the code maybe if I could get to the Mas2jProject instance then I could call the addAgent function, am I on the right way?

Thank you for your help!

jomifred commented 5 months ago

hi Vencel,

you can use the .create_agent internal action. See the doc at

https://jason-lang.github.io/api/jason/stdlib/package-summary.html

HTH,

Jomi

On 9 May 2024, at 19:09, Vencel Bajnok @.***> wrote:

I would like to ask, is there a way to add a new agent instance runtime from code, like the way you can do from the MAS window? As I've browsed the code maybe if I could get to the Mas2jProject instance then I could call the addAgent function, am I on the right way? Thank you for your help! — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Breinich commented 5 months ago

Thank you very much Jomi!

Breinich commented 5 months ago

This is what I really thought about, my mistake that I haven't read the FAQ before asking the question:

https://jason-lang.github.io/doc/faq#is-it-possible-to-addremove-an-agent-tofrom-a-running-mas