> For the complete documentation index, see [llms.txt](https://docs.amesa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amesa.com/deploy-agents/deploy-with-the-amesa-runtime-server.md).

# Deploy with the AMESA Runtime Server

## Overview

The AMESA Runtime allows you to run an AMESA agent on your own hardware. It handles receiving observations (sensor data), processing them through the agent, and computing output actions.&#x20;

The package consists of three components:&#x20;

* Light Touch Runtime — the core HTTP inference server that loads and runs the agent.&#x20;
* Client Runtime Proxy — the MQTT bridge that routes observations in and actions out.&#x20;
* Packaged Agent — the agent model and configuration files (agent.json, etc.).&#x20;

This guide walks through the full setup process: starting the runtime, and verifying the system is working end-to-end.

## Step 1: Start the Light Touch Runtime

The Light Touch Runtime is the inference server. It loads the agent and listens for incoming observations over HTTP.&#x20;

Set the required environment variables and start the runtime. Run these commands in sequence in your first terminal:&#x20;

### Set Environment Variables

```
export AMESA_LICENSE= ---- -- ---- --------- --- 
export AMESA_DISABLE_INSTALL_PACKAGES=true 
export AMESA_BASE_DIR=~/packaged_agent 
```

### Launch the Runtime

Point the runtime at the agent configuration file :

```
~/light_touch_runtime/dist/light_touch_runtime ~/packaged_agent/agent.json 
```

{% hint style="info" %}
Expected result: You know this step was successful when you see "Agent Loaded" printed in the terminal. Keep this terminal open — it must stay active for the rest of the process.
{% endhint %}

## Step 2: Start the Client Runtime Proxy

The Client Runtime Proxy handles the MQTT communication layer. It receives observations over MQTT and forwards them to the Light Touch Runtime's HTTP endpoint, then publishes the computed actions back out.&#x20;

Open a second terminal and run a quick sanity check to confirm the binary is executable:&#x20;

```
~/client_runtime_proxy/dist/client_runtime_proxy --agent-id prod-id-agent 
```

This will return a message saying PID folder missing — that is expected behavior at this stage.

### Run the Full Command

```
~/client_runtime_proxy/dist/client_runtime_proxy \ 
 --agent-id prod-id-agent \ 
 --license usb-token \ 
 --mqtt-broker localhost:1883 \ 
 --mqtt-input-topic amesa/input \ 
 --mqtt-output-topic amesa/output \ 
 --inference-url http://localhost:8080 
```

{% hint style="info" %}
Expected result: No PID file found, proceeding with start, followed by a summary of the arguments you passed. This confirms the proxy is running and connected to the runtime.
{% endhint %}

## Step 3: Send a Test Observation

With both terminals running, you can now verify the full pipeline by sending a test observation. This simulates what real sensor data will look like when the system is live.&#x20;

In your second terminal (or a third if preferred), send the following curl command:&#x20;

```
curl -X POST http://localhost:8080/mcp \ 
 -H "Content-Type: application/json" \ 
 -d '{ 
   "jsonrpc": "2.0", 
   "id": 1, 
   "method": "publish", 
   "params": { 
     "channel": "agent.observation", 
     "message": { 
       "observation": [1, 2, 3, 4, 5, 6] 
     } 
   } 
 }' 
```

Watch your first terminal (where the Light Touch Runtime is running). A successful result will print:

```
processing observation - 
computed action 
```

{% hint style="info" %}
Expected result: If you see both of these messages, the system is fully operational end-to-end.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.amesa.com/deploy-agents/deploy-with-the-amesa-runtime-server.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
