Skip to content

Reference

lg_evals_add: Add an eval case

Markdown version

Add an eval case to an agent: an input and what a good result looks like.

  • Changes data: yes
  • Credential scope: settings:write (an API key's scopes, or what you allowed when connecting with OAuth)
  • Assistant level: an assistant at Read and draft or above

Inputs

FieldTypeRequiredNotes
idstringyes
bodyobject (name, input, expect)yes
body.namestringyes
body.inputobjectno
body.expectobject (status, waits_for_approval, steps)no
body.expect.status"succeeded" | "failed" | "waiting_approval"no
body.expect.waits_for_approvalbooleanno
body.expect.stepsobjectno

Example MCP call

A tools/call request to https://manage.restolayer.com/mcp:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "lg_evals_add",
    "arguments": {
      "id": "agt_01HZXEXAMPLE",
      "body": {
        "name": "Brief is sent",
        "input": {},
        "expect": {}
      }
    }
  }
}

Example REST call

The same thing over REST (POST /v1/agents/:id/evals):

curl -s -X POST "https://manage.restolayer.com/v1/agents/agt_01HZXEXAMPLE/evals" \
  -H "Authorization: Bearer $LG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Brief is sent","input":{},"expect":{}}'

All tools: MCP tools. Connecting: connect your assistant.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.
Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.