eidolon-ai / eidolon

The first AI Agent Server, Eidolon is a pluggable Agent SDK and enterprise ready, deployment server for Agentic applications
https://www.eidolonai.com/
Apache License 2.0
286 stars 31 forks source link

Simple Agent Output Json Schema Error #872

Closed LukeLalor closed 3 weeks ago

LukeLalor commented 3 weeks ago

the following json schema output format was responsible for the error. Issue parsing into a base model.

type: object
properties:
 stock_prices:
   type: array
   items:
     type: object
     properties:
       Symbol:
         type: string
         description: The symbol or ticker representing a stock or asset.
       Price:
         type: number
         description: The price of the asset at the given time.
       Time:
         type: string
         format: date-time
         description: The time of the price in ISO 8601 format.
       Time zone:
         type: string
         description: The time zone for the recorded time.
       Delta:
         type: number
         description: The change in price since the last recorded time.
     required:
       - Symbol
       - Price
       - Time
       - Time zone
       - Delta
     additionalProperties: false
required:
 - stock_prices
additionalProperties: false
LukeLalor commented 3 weeks ago

Looks like this was just a yaml formatting issue. The following agent has an action with a working json schema representation object:

apiVersion: server.eidolonai.com/v1alpha1
kind: Agent
metadata:
  name: hello-world

spec:
  implementation: SimpleAgent
  actions:
    - name: converse
      output_schema: 
        type: object
        properties:
          stock_prices:
            type: array
            items:
              type: object
              properties:
                Symbol:
                  type: string
                  description: The symbol or ticker representing a stock or asset.
                Price:
                  type: number
                  description: The price of the asset at the given time.
                Time:
                  type: string
                  format: date-time
                  description: The time of the price in ISO 8601 format.
                Time zone:
                  type: string
                  description: The time zone for the recorded time.
                Delta:
                  type: number
                  description: The change in price since the last recorded time.
              required:
                - Symbol
                - Price
                - Time
                - Time zone
                - Delta
              additionalProperties: false
        required:
        - stock_prices
        additionalProperties: false
  description: "This is an example of a agent using the 'SimpleAgent' template."

Image

This did however point out that the errors we report for invalid json schema are insufficient, so I will make a pr to clear that up