cargo-ai 0.2.0

Build lightweight AI agents with Cargo. Powered by Rust. Declared in JSON.
{
  "version": "2026-03-03.r1",
  "inputs": [
    {
      "type": "text",
      "text": "What is 2 + 2? Return the answer as a number."
    }
  ],
  "agent_schema": {
    "type": "object",
    "properties": {
      "answer": {
        "type": "integer",
        "description": "The result of the math problem."
      }
    }
  },
  "actions": [
    {
      "name": "is_4",
      "logic": {
        "==": [ { "var": "answer" }, 4 ]
      },
      "run": [
        {
          "kind": "exec",
          "program": "echo",
          "args": ["Value return is equal to 4."]
        }
      ]
    },
    {
      "name": "is_not_4",
      "logic": {
        "!=": [ { "var": "answer" }, 4 ]
      },
      "run": [
        {
          "kind": "exec",
          "program": "echo",
          "args": ["Value return is not equal to 4."]
        }
      ]
    }
  ]
}