Calculator-Example

This is a simple example of an calculator "agent system" using the Agents Platform and based on Agent Template.

Start by docker compose up and open web interface of management at http://localhost:8080/.

Calculator

A riddle is a math expression, e.g., x * y = and the values of the variables x and y are defined via text files. For example a line x = 12 in text file assigns the value to 12 to the variable x.

For example, the result of a riddle x * x = would be 144 with the explanation 12 * 12 = 144.

Riddle Example

In this example the values of the variables are x = 10, y = 15, z = 20, see the files in ./data/share/example/.

  1. You may send a riddle to the management using the web interface (http://localhost:8080/app/new) and press "Send Message"
  2. The message to the management will look like:
    {
      "id": "test1",
      "sub_ids": [],
      "riddle": {
        "context": "",
        "question": "y + x =",
        "solutions_before": []
      },
      "solution": [],
      "data": [
        {
          "type": "text",
          "file_plain": "example/z.txt",
          "file_extracted": null
        },
        {
          "type": "text",
          "file_plain": "example/y.txt",
          "file_extracted": null
        }
      ],
      "status": {
        "extract": {
          "required": true,
          "finished": false
        },
        "solve": {
          "required": true,
          "finished": false
        },
        "validate": {
          "required": true,
          "finished": false
        },
        "trial": 0,
        "solved": false
      },
      "contacts": 0
    }
    
  3. Message will be send between agents for solving the riddle.
  4. Result can be found in web interface (http://localhost:8080/app/table)
Description
This is a simple example of an calculator "agent system" based on the Agent Template and Agents Platform.
Readme 268 KiB
Languages
Python 100%