GET
/
v1
/
teams
/
{teamId}
/
campaigns
/
{campaignId}
/
bandits
/
{banditId}
/
offline-evaluation
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

const client = new OctosparkClient({
  token: process.env.OCTOSPARK_TOKEN
})

const response = await client.campaignBandits.getBanditOfflineEvaluation({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  campaignId: process.env.OCTOSPARK_CAMPAIGN_ID ?? "campaignId",
  banditId: process.env.OCTOSPARK_BANDIT_ID ?? "banditId",
})
{
  "banditId": "<string>",
  "decisions": 123,
  "loggedMeanReward": 123,
  "current": {
    "ips": {
      "value": 123,
      "lower": 123,
      "upper": 123
    },
    "snips": {
      "value": 123,
      "lower": 123,
      "upper": 123
    },
    "doublyRobust": {
      "value": 123,
      "lower": 123,
      "upper": 123
    },
    "effectiveSampleSize": 123,
    "maxWeight": 123
  },
  "uniform": {
    "ips": {
      "value": 123,
      "lower": 123,
      "upper": 123
    },
    "snips": {
      "value": 123,
      "lower": 123,
      "upper": 123
    },
    "doublyRobust": {
      "value": 123,
      "lower": 123,
      "upper": 123
    },
    "effectiveSampleSize": 123,
    "maxWeight": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

teamId
string
required

Team (workspace) id (UUID). Discover ids via the list teams endpoint or the agent context.

campaignId
string
required

Campaign id (UUID): a named group of managed agents and their workflow schedules.

banditId
string
required

Campaign bandit id (UUID), as returned by the list campaign bandits endpoint.

Response

Success

banditId
string
required
decisions
number
required

Logged decisions with a trained reward on this bandit.

loggedMeanReward
number
required
current
object
required

The current policy (Thompson sampling on today's posteriors).

uniform
object
required

Uniform random selection over the logged candidates.