<commit_before>#KidoZen Agent
Use this service to connect to the KidoZen platform and access to your Line of Business Systems even behind the firewall.

##Requirements
You will need version 0.10.33 or greater of Node.js installed in your system. You can download it [here](http://nodejs.org/download/).

##Installation
You can install this module from npm (by executing `npm install kido-agent -g` in your terminal) or by cloning this repo in a directory. If you cloned this repo, run npm to install the dependencies

```
npm install
```

After that, you can execute `node bin/server init` to create a config.json file or just `kido-agent init` if you installed it globally with npm. Config sample:

```
{
    "name": "name-of-the-agent",	// for instance, it could be the machine's name.
    "credentials": {
        "user": "<EMAIL>",
        "password": "<PASSWORD>",
        "marketplace": "https://my-company.kidocloud.com"
    }
}
```

Run the service executing:

```
node bin/server [--version] [--level error|warn|info|verbose|debug]
```

If you are planning to link local connectors then you have to run the agent under administrator's credentials.

### Init scripts for Linux

If you want to install kido-agent as a service, you can execute `kido-agent install-service` or in Unix systems with the following

* On Ubuntu/Debian
	`$ sudo cp installService_UBUNTU.sh /etc/init.d/kido-agent && sudo chmod +x /etc/init.d/kido-agent`

* On Red Hat/CentOS
	`$ sudo cp installService_REDHAT.sh /etc/init.d/kido-agent && sudo chmod +x /etc/init.d/kido-agent`


## Running your agent

Once you're done with the installation, you can run your agent with the following command:

```
kido-agent run
```

It will try to reach KidoZen's servers and authenticate against it's platform. If everything goes as expected, you should see `Agent is ready.` in your terminal.

In case you don't want to store your service credentials in KidoZen's platform, you can configure the service to use a local configuration json file. If you specify a relative path in your Marketplace, take notice that it will be relative from where your agent instance is running.<commit_msg>rewrited part of the 'Running your agent' section<commit_after>#KidoZen Agent
Use this service to connect to the KidoZen platform and access to your Line of Business Systems even behind the firewall.

##Requirements
You will need version 0.10.33 or greater of Node.js installed in your system. You can download it [here](http://nodejs.org/download/).

##Installation
You can install this module from npm (by executing `npm install kido-agent -g` in your terminal) or by cloning this repo in a directory. If you cloned this repo, run npm to install the dependencies

```
npm install
```

After that, you can execute `node bin/server init` to create a config.json file or just `kido-agent init` if you installed it globally with npm. Config sample:

```
{
    "name": "name-of-the-agent",	// for instance, it could be the machine's name.
    "credentials": {
        "user": "<EMAIL>",
        "password": "<PASSWORD>",
        "marketplace": "https://my-company.kidocloud.com"
    }
}
```

Run the service executing:

```
node bin/server [--version] [--level error|warn|info|verbose|debug]
```

If you are planning to link local connectors then you have to run the agent under administrator's credentials.

### Init scripts for Linux

If you want to install kido-agent as a service, you can execute `kido-agent install-service` or in Unix systems with the following

* On Ubuntu/Debian
	`$ sudo cp installService_UBUNTU.sh /etc/init.d/kido-agent && sudo chmod +x /etc/init.d/kido-agent`

* On Red Hat/CentOS
	`$ sudo cp installService_REDHAT.sh /etc/init.d/kido-agent && sudo chmod +x /etc/init.d/kido-agent`


## Running your agent

Once you're done with the installation, you can run your agent with the following command:

```
kido-agent run
```

It will try to reach KidoZen's servers and authenticate against it's platform. If everything goes as expected, you should see `Agent is ready.` in your terminal.

In case you don't want to store your service credentials in KidoZen's platform, you can configure the service to use a local configuration json file. Go to your Marketplace -> Select the Admin panel -> Click on Enterprise API section -> Select Services on the sidebar and create or edit the service of your choice adding the file path to your configuration file in the **Local configuration file path** field. 
![config example](http://i.imgur.com/NJZL8q2.png)
If you specify a relative path in your Marketplace, take notice that it will be relative from where your agent instance is running.
{'fraction_non_alphanumeric': 0.08989487234499034, 'fraction_numerical': 0.0025745548165629693, 'mean_word_length': 3.9914346895074946, 'pattern_counts': {'":': 10, '<': 7, '<?xml version=': 0, '>': 10, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2784999', 'n_tokens_mistral': 1382, 'n_tokens_neox': 1292, 'n_words': 630}