pub struct TurnRequest {Show 15 fields
pub context_compaction: ContextCompaction,
pub continuation: TurnContinuation,
pub execution_policy: ExecutionPolicy,
pub folder: PathBuf,
pub host_caches: HostCacheSharing,
pub main_checkout_root: Option<PathBuf>,
pub model: String,
pub permission_mode: PermissionMode,
pub agent_profile: AgentDefinitionPrompt,
pub prompt: TurnPrompt,
pub provider_call_budget: Option<ProviderCallBudget>,
pub reasoning_level: ReasoningLevel,
pub request_kind: AgentRequestKind,
pub response_style: ResponseStyle,
pub speed_mode: SpeedMode,
}Expand description
Input payload for one provider-agnostic agent turn.
Fields§
§context_compaction: ContextCompactionWhether the turn compacts the session’s earlier turns once they nearly fill the model’s context window. Only in-process harness turns compact; other agents manage their own context and ignore it.
continuation: TurnContinuationPrior context needed to continue this turn.
execution_policy: ExecutionPolicyResolved harness policy. The worker replaces this with its configured policy before dispatch; application callers supply the default value.
folder: PathBufSession worktree folder where the agent runs.
host_caches: HostCacheSharingWhich dependency caches sandboxed commands of an in-process harness turn use. Agents that run without the native sandbox ignore it.
main_checkout_root: Option<PathBuf>Main repository checkout that must remain read-only during the turn, when Agentty can resolve it.
model: StringProvider-specific model identifier.
permission_mode: PermissionModeFilesystem and command permission policy for this turn.
agent_profile: AgentDefinitionPromptAgent prompt state resolved from the session worktree.
prompt: TurnPromptStructured prompt payload for the turn.
provider_call_budget: Option<ProviderCallBudget>Shared provider-call ceiling, including retries and protocol repairs.
reasoning_level: ReasoningLevelReasoning effort preference for the turn.
Ignored by providers/models that do not support reasoning effort.
request_kind: AgentRequestKindCanonical request kind that drives transport behavior and protocol semantics for this turn.
response_style: ResponseStylePreferred amount of detail in user-facing session responses.
speed_mode: SpeedModeResponse-speed preference for the turn.