open_agent_spec: "1.5.0"

agent:
  name: sentiment
  description: >
    Analyse the sentiment of a piece of text. Returns a sentiment label,
    confidence score, and brief reasoning. Designed to be reused via
    spec delegation (spec: oa://prime-vector/sentiment).
  role: analyst

intelligence:
  type: llm
  engine: openai
  model: gpt-4o-mini
  config:
    temperature: 0.1

tasks:
  analyse_sentiment:
    description: Determine the overall sentiment of a piece of text
    input:
      type: object
      properties:
        text:
          type: string
          description: The text to analyse
      required:
        - text
    output:
      type: object
      properties:
        sentiment:
          type: string
          description: "One of: positive, negative, neutral, mixed"
        confidence:
          type: number
          description: Confidence score between 0.0 and 1.0
        reasoning:
          type: string
          description: Brief explanation of the sentiment verdict
      required:
        - sentiment
        - confidence
        - reasoning
    prompts:
      system: >
        You are a precise sentiment analysis engine. Classify the sentiment of
        the provided text as positive, negative, neutral, or mixed.
        Always respond with valid JSON.
      user: |
        Analyse the sentiment of the following text.

        Text:
        {text}

        Respond with JSON:
        {
          "sentiment": "positive|negative|neutral|mixed",
          "confidence": 0.0-1.0,
          "reasoning": "<brief explanation>"
        }
