feedback

Create a new feedback.

session_id identifies the tracing project the feedback belongs to. It is required unless the feedback is addressed by address, which names that project through an Agent environment that already exists.

post/api/v1/feedback

Request

  • Base URL
    https://api.smith.langchain.com
  • URL
    https://api.smith.langchain.com/api/v1/feedback
  • Auth
    • API key in header X-API-Key
    • or API key in header X-Tenant-Id
    • or HTTP bearer

Request body

created_atstring date-time
modified_atstring date-time
keystring required
commentstring nullable
feedback_group_idstring uuid nullable
comparative_experiment_idstring uuid nullable
run_idstring uuid nullable
session_idstring uuid nullable

Required unless the feedback is addressed by address. The ID of the tracing project (session) the feedback belongs to.

addressstring

Addresses the tracing project through an Agent environment, as lrn:agents/{id}/environments/{environment}, instead of session_id. The id is 1 to 63 lowercase ASCII letters, digits, or hyphens, starting with a letter and ending with a letter or digit. The environment is local, development, staging, or production, matched case-insensitively. Never combined with session_id. The Agent and the environment must already exist; sending feedback does not create them. Self-hosted deployments need LangSmith v0.18 or later.

trace_idstring uuid nullable
start_timestring date-time nullable
feedback_thread_idstring nullable
extend_trace_retentionboolean
idstring uuid
feedback_config_idstring uuid nullable

The ID of the feedback config this feedback was written against. It must be a feedback config for this feedback key in the same workspace, or the feedback is rejected. It doesn't change how the score is checked; feedback_config does that. If omitted, the server may record the key's enforced feedback config, or the one created for the key by this request.

errorboolean nullable

Deprecated. Use extra.error instead. If both values are provided, error takes precedence.

extraobject nullable

Example request

{
  "address": "lrn:agents/support-agent/environments/production"
}

Response

Successful Response

created_atstring date-time
modified_atstring date-time
keystring required
commentstring nullable
feedback_group_idstring uuid nullable
comparative_experiment_idstring uuid nullable
run_idstring uuid nullable
session_idstring uuid nullable
idstring uuid required
trace_idstring uuid nullable
start_timestring date-time nullable
is_rootboolean
extraobject nullable
feedback_thread_idstring nullable

Changes

    • breaking

      the / response's property type changed from object to string for status

    • breaking

      removed the required property // from the response with the status

    • breaking

      removed the required property // from the response with the status

    • breaking

      removed the required property // from the response with the status

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      request property deprecated

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status