{
  "openapi": "3.1.0",
  "info": {
    "title": "IO Intelligence",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.intelligence.io.solutions"
    }
  ],
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/api/v1/workflows/run": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Run Builtin Workflow",
        "operationId": "run_builtin_workflow_v1_workflows_run_post",
        "parameters": [
          {
            "name": "token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "description": "JWT token",
              "title": "Token"
            },
            "description": "JWT token"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "description": "io.net provided API Key",
              "title": "Authorization"
            },
            "description": "io.net provided API Key"
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "description": "API key set by an SDK client",
              "title": "X-Api-Key"
            },
            "description": "API key set by an SDK client"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TextRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl https://api.intelligence.io.solutions/api/v1/workflows/run \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer $IOINTELLIGENCE_API_KEY\" \\\n  -d '{\n   \"text\":\"Artificial Intelligence (AI) has rapidly transformed the business landscape, offering automation, data-driven insights, and enhanced decision-making. Companies across industries—ranging from healthcare to finance—are leveraging AI to improve efficiency and customer experience.\\n\\nOne major application of AI is in customer service, where chatbots and virtual assistants provide instant responses, reducing the need for human intervention. AI-powered analytics also help businesses predict market trends, personalize marketing strategies, and optimize supply chains.\\n\\nHowever, the adoption of AI comes with challenges, such as ethical concerns, data privacy, and the need for specialized skills. As AI continues to evolve, companies must balance innovation with responsible AI deployment.\",\n   \"agent_names\":[\n      \"summary_agent\"\n   ],\n   \"args\":{\n      \"type\":\"summarize_text\",\n      \"name\":\"Summary Agent\",\n      \"instructions\":\"Summarize the above passage in 2-3 sentences.\"\n   }\n}'"
            },
            {
              "language": "python",
              "code": "from iointel import (\n    Agent,\n    Workflow\n)\n\nimport os\nimport asyncio\n\napi_key = os.environ[\"OPENAI_API_KEY\"]  # Replace with your actual IO.net API key\n\ntext = \"\"\"In the rapidly evolving landscape of artificial intelligence, the ability to condense vast amounts of information into concise and meaningful summaries is crucial. From research papers and business reports to legal documents and news articles, professionals across industries rely on summarization to extract key insights efficiently. Traditional summarization techniques often struggle with maintaining coherence and contextual relevance. However, advanced AI models now leverage natural language understanding to identify core ideas, eliminate redundancy, and generate human-like summaries. As organizations continue to deal with an ever-growing influx of data, the demand for intelligent summarization tools will only increase. Whether enhancing productivity, improving decision-making, or streamlining workflows, AI-powered summarization is set to become an indispensable asset in the digital age.\"\"\"\n\nagent = Agent(\n    name=\"Summarize Agent\",\n    instructions=\"You are an assistant specialized in summarization.\",\n    model=\"meta-llama/Llama-3.3-70B-Instruct\",\n    api_key=api_key,\n    base_url=\"https://api.intelligence.io.solutions/api/v1\"\n)\n\nworkflow = Workflow(objective=text, client_mode=False)\n\nasync def run_workflow():\n    results = (await workflow.summarize_text(max_words=50,agents=[agent]).run_tasks())[\"results\"]\n    return results\n\nresults = asyncio.run(run_workflow())\nprint(results)"
            }
          ],
          "samples-languages": [
            "curl",
            "python"
          ]
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {}
      }
    },
    "schemas": {
      "TextRequest": {
        "properties": {
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text",
            "deprecated": true
          },
          "objective": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Objective"
          },
          "persona": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonaConfig-Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "args": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ReasoningArgs"
                  },
                  {
                    "$ref": "#/components/schemas/SummarizeArgs"
                  },
                  {
                    "$ref": "#/components/schemas/SentimentArgs"
                  },
                  {
                    "$ref": "#/components/schemas/ExtractEntitiesArgs"
                  },
                  {
                    "$ref": "#/components/schemas/TranslateArgs"
                  },
                  {
                    "$ref": "#/components/schemas/ClassificationArgs"
                  },
                  {
                    "$ref": "#/components/schemas/ModerationArgs"
                  },
                  {
                    "$ref": "#/components/schemas/CustomArgs"
                  }
                ],
                "discriminator": {
                  "propertyName": "type",
                  "mapping": {
                    "classify": "#/components/schemas/ClassificationArgs",
                    "custom": "#/components/schemas/CustomArgs",
                    "extract_categorized_entities": "#/components/schemas/ExtractEntitiesArgs",
                    "moderation": "#/components/schemas/ModerationArgs",
                    "sentiment": "#/components/schemas/SentimentArgs",
                    "solve_with_reasoning": "#/components/schemas/ReasoningArgs",
                    "summarize_text": "#/components/schemas/SummarizeArgs",
                    "translate_text": "#/components/schemas/TranslateArgs"
                  }
                }
              },
              {
                "type": "null"
              }
            ],
            "title": "Args"
          },
          "agent_names": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Agent Names"
          }
        },
        "type": "object",
        "required": [
          "agent_names"
        ],
        "title": "TextRequest"
      },
      "PersonaConfig-Input": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "If the persona has a specific name or nickname."
          },
          "age": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Age",
            "description": "Approximate age of the persona (if relevant)."
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role",
            "description": "General role or type, e.g. 'a brave knight', 'a friendly teacher', etc."
          },
          "style": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Style",
            "description": "A short description of the agent's style or demeanor (e.g., 'formal and polite')."
          },
          "domain_knowledge": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Domain Knowledge",
            "description": "List of domains or special areas of expertise the agent has."
          },
          "quirks": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quirks",
            "description": "Any unique quirks or mannerisms, e.g. 'likes using puns' or 'always references coffee.'"
          },
          "bio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bio",
            "description": "A short biography or personal background for the persona."
          },
          "lore": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lore",
            "description": "In-universe lore or backstory, e.g. 'grew up in a small village with magical powers.'"
          },
          "personality": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Personality",
            "description": "A more direct statement of the persona's emotional or psychological traits."
          },
          "conversation_style": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversation Style",
            "description": "How the character speaks in conversation, e.g., 'often uses slang' or 'very verbose and flowery.'"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "A general descriptive text, e.g., 'A tall, lean figure wearing a cloak, with a stern demeanor.'"
          },
          "friendliness": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  }
                ],
                "ge": 0,
                "le": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Friendliness",
            "description": "How friendly the agent is, from 0 (hostile) to 1 (friendly)."
          },
          "creativity": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  }
                ],
                "ge": 0,
                "le": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Creativity",
            "description": "How creative the agent is, from 0 (very logical) to 1 (very creative)."
          },
          "curiosity": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  }
                ],
                "ge": 0,
                "le": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Curiosity",
            "description": "How curious the agent is, from 0 (disinterested) to 1 (very curious)."
          },
          "empathy": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  }
                ],
                "ge": 0,
                "le": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Empathy",
            "description": "How empathetic the agent is, from 0 (cold) to 1 (very empathetic)."
          },
          "humor": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  }
                ],
                "ge": 0,
                "le": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Humor",
            "description": "How humorous the agent is, from 0 (serious) to 1 (very humorous)."
          },
          "formality": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  }
                ],
                "ge": 0,
                "le": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Formality",
            "description": "How formal the agent is, from 0 (very casual) to 1 (very formal)."
          },
          "emotional_stability": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  }
                ],
                "ge": 0,
                "le": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Emotional Stability",
            "description": "How emotionally stable the agent is, from 0 (very emotional) to 1 (very stable)."
          }
        },
        "type": "object",
        "title": "PersonaConfig",
        "description": "A configuration object that describes an agent's persona or character."
      },
      "ReasoningArgs": {
        "properties": {
          "type": {
            "type": "string",
            "const": "solve_with_reasoning",
            "title": "Type"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "ReasoningArgs"
      },
      "SummarizeArgs": {
        "properties": {
          "type": {
            "type": "string",
            "const": "summarize_text",
            "title": "Type"
          },
          "max_words": {
            "type": "integer",
            "title": "Max Words",
            "default": 100
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "SummarizeArgs"
      },
       "SentimentArgs": {
        "properties": {
          "type": {
            "type": "string",
            "const": "sentiment",
            "title": "Type"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "SentimentArgs"
      },
      "ExtractEntitiesArgs": {
        "properties": {
          "type": {
            "type": "string",
            "const": "extract_categorized_entities",
            "title": "Type"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "ExtractEntitiesArgs"
      },
      "TranslateArgs": {
        "properties": {
          "type": {
            "type": "string",
            "const": "translate_text",
            "title": "Type"
          },
          "target_language": {
            "type": "string",
            "title": "Target Language"
          }
        },
        "type": "object",
        "required": [
          "type",
          "target_language"
        ],
        "title": "TranslateArgs"
      },
      "ClassificationArgs": {
        "properties": {
          "type": {
            "type": "string",
            "const": "classify",
            "title": "Type"
          },
          "classify_by": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Classify By"
          }
        },
        "type": "object",
        "required": [
          "type",
          "classify_by"
        ],
        "title": "ClassificationArgs"
      },
      "ModerationArgs": {
        "properties": {
          "type": {
            "type": "string",
            "const": "moderation",
            "title": "Type"
          },
          "threshold": {
            "type": "number",
            "title": "Threshold"
          }
        },
        "type": "object",
        "required": [
          "type",
          "threshold"
        ],
        "title": "ModerationArgs"
      },
      "CustomArgs": {
        "properties": {
          "type": {
            "type": "string",
            "const": "custom",
            "title": "Type"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Unique name/ID for the custom workflow step."
          },
          "objective": {
            "type": "string",
            "title": "Objective",
            "description": "Primary objective or text prompt for the workflow."
          },
          "instructions": {
            "type": "string",
            "title": "Instructions",
            "description": "Optional instructions to be passed along."
          },
          "context": {
            "additionalProperties": true,
            "type": "object",
            "title": "Context",
            "description": "Additional context or parameters."
          }
        },
        "type": "object",
        "required": [
          "type",
          "name",
          "objective",
          "instructions"
        ],
        "title": "CustomArgs"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      }
    }
  }
}