Skip to content

Agent mode (multi-pass) switch for a card

GET
/open/v1/player/agent-mode
curl --request GET \
--url 'https://api.harperharbor.com/open/v1/player/agent-mode?roleId=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0&contextLevel=1' \
--header 'Authorization: Bearer <token>'

Reads the caller’s Agent preference and a read-only estimate for the proposed model/context/thinking/response length. costEstimate is preferred to the legacy costWarning boolean; no preference is saved by GET. Only a high estimate at least 1000 credits requires confirmation; the caller can still enable Agent.

roleId
required
string format: uuid

Card id.

model
string

Model value the client is about to select; modelSupported/costWarning are computed for it instead of the saved model.

contextLevel
integer
Allowed values: 1 2 3 4 5 100

Selected context tier; 100 is the legacy alias for 5.

thinkingDepth
string

Selected thinking option from the model catalog.

lengthTarget
integer

Supported response length target; omitted uses the current save preference.

Agent-mode state.

Media typeapplication/json
object
roleId
required
string format: uuid
multiPassEnabled
required

Per-card switch saved by the player.

boolean
runtimeEnabled
required

Whether the server currently executes agent mode at all.

boolean
modelSupported
required

Whether the evaluated model (query model or the saved one) supports agent mode.

boolean
costWarning
required

Compatibility decision: true for a high estimate (at least 1000 credits) or unknown; false for a known lower estimate. Does not determine Agent support.

boolean
costEstimate

Selected Agent turn estimate at current rates. Observed high is a matched 14-day p90; estimated high is a conservative fallback, not a percentile or maximum. Unknown amounts are null. Actual usage, retries, continuation and separate memory work can cost more.

object
typicalCredits
required

Credits, not a charge limit. Unknown amounts are null.

integer | null
highCredits
required

Credits, not a charge limit. Unknown amounts are null.

integer | null
normalTypicalCredits
required

Credits, not a charge limit. Unknown amounts are null.

integer | null
status
required
string
Allowed values: observed estimated unknown
source
required
string
Allowed values: observed estimated bootstrap unknown
presentation
required
string
Allowed values: none inline confirm
sampleCount
required
integer
reason
required
string
selectionKey
required
string
ruleVersion
required
string
model
string
contextLevel
string
thinkingDepth
string
lengthBucket
string
inputBucket
string
billingRegime
string
pricingFingerprint
string
costRuntimeVersion
string
generatedAt
required
string format: date-time
expiresAt
required
string format: date-time
fixedRuleCredits

Numeric normal fixed-price rule used only to invalidate an estimate when pricing changes; Agent itself is priced by token usage.

integer
costPhase

Which cost estimate applies to the next Agent turn: first until a completed Agent turn has been recorded for cost estimation on this runtime and conversation branch; steady afterwards. A display hint only, not a guarantee about setup state. Omitted when unknown. Does not change selectionKey.

string
Allowed values: first steady
Example
{
"costEstimate": {
"status": "observed",
"source": "observed",
"presentation": "none",
"costPhase": "first"
}
}

invalid_param — missing roleId.

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
Examplegenerated
{
"error": "example",
"message": "example",
"retryable": true,
"required_context_tier": 1,
"required_context_tokens": 1,
"constant_lore_trim_fits": true,
"credits_needed": 1,
"credits_available": 1
}

unauthorized.

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
Examplegenerated
{
"error": "example",
"message": "example",
"retryable": true,
"required_context_tier": 1,
"required_context_tokens": 1,
"constant_lore_trim_fits": true,
"credits_needed": 1,
"credits_available": 1
}

generic_error.

Media typeapplication/json
object
error
required

Error code (snake_case) or, for legacy handlers, a free-text/localized message.

string
message

Human-readable sentence. Present only on middleware errors and /me, /me/wallet.

string
retryable

Whether retrying may succeed. Present only on middleware errors, /me, /me/wallet and service/share routes.

boolean
required_context_tier

Only on a first-turn context_capacity_exceeded: the smallest context tier that fits the whole card with room to talk. Save it as context in player settings and resend. Absent when no tier fits.

integer
>= 1 <= 5
required_context_tokens

The token budget of required_context_tier for the selected model, for display.

integer
constant_lore_trim_fits

Only on a first-turn context_capacity_exceeded: whether saving trimConstantLore=true lets the card play at the current tier. Absent on mid-conversation capacity errors.

boolean
credits_needed

Only on insufficient_credits: the credits this turn needs before it can start. Absent when the refusal came without an estimate.

integer
credits_available

Only on insufficient_credits: the credits the wallet could set aside for it.

integer
Examplegenerated
{
"error": "example",
"message": "example",
"retryable": true,
"required_context_tier": 1,
"required_context_tokens": 1,
"constant_lore_trim_fits": true,
"credits_needed": 1,
"credits_available": 1
}