You can get help for any command with --help. For example:

jason mas start --help

Application level

jason app is used to manage the source code of some application.

Usage: jason app (create | compile | add-agent | add-gradle | add-ia )
commands to handle applications

Commands:
  create      creates the files of a new application
  compile     compiles the java classes of an application (using Gradle)
  add-agent   adds the code of a new agent into the application
  add-gradle  adds a Gradle script for the application
  add-ia      adds the source code a new internal action into the application

MAS level

jason mas is used to manage the execution of applications.

Usage: jason mas (start | stop | list)
commands to handle running Multi-Agent Systems

Sub-commands:
  start  starts a new (empty) MAS
  stop   stops a MAS
  list   lists current running MAS

MAS start

Usage: jason mas start [--console] [--no-net] [<mas name>]
starts a new (empty) MAS
      [<mas name>]   MAS unique identification
      --console      output will be sent to the console instead of a GUI
      --no-net       disable all net services (mind inspector, runtime
                     services, Mbeans, ...
      --mas2j=<file> runs jason project without
                     gradle (offline), java classes should be compiled
                     before running.
      --cp=<classpath>    directories where java classes can be found (for
                     environment implementation, for instance)

Regarding .mas2j files, they can be executed in two ways:

  • jason x.mas2j: it creates a build.gradle for the project and then uses Gradle to compile and run the project. Gradle will download dependencies, so internet connection is necessary.

  • jason app start --mas2j=x.mas2j: it executes the MAS without Gradle (it thus runs offline). However, all java code have to be compiled before. The command jason app compile can be used for that (note that this command uses Gradle to compile --- so compile online, run offline).

MAS stop

Usage: jason mas stop [--exit] [--deadline=<deadline>] [<mas name>]
stops a MAS
      [<mas name>]   MAS unique identification
      --deadline=<deadline>
                     the amount of time (in milliseconds) to wait for stopping the MAS
      --exit         stops the MAS and terminates the process

Agent level

jason agent is used to manage the execution of agents.

Usage: jason agent (start | stop | list | run-as | load-into | mind | status)
commands to handle agents

Commands:
  start      starts a new (empty) agent
  stop       kills an agent
  list       lists running agents
  run-as     executes commands for an agent
  mind       inspects the mind of an agent
  status     shows the status of an agent
  load-into  loads some ASL code into a running agent

Agent start

Usage: jason agent start [--instances=<instances>] [--mas-name=<mas name>]
                         [--source=<source file>] <agent name>
starts a new (empty) agent
      <agent name>   agent unique identification
      --instances=<instances>
                     how many agents should be created
      --mas-name=<mas name>
                     MAS unique identification
      --source=<source file>
                     file (or URL) for the source code of the agent.

The source code can be informed at the end of the command enclosed by { and }. For instance:

jason agent start bob { +!g <- .print(ok). }

Other agent commands

Type jason agent stop --help for details of stop command …​