Skip to main content

Module agent

Module agent 

Source
Expand description

Agent backend wiring split into provider-specific submodules.

This module keeps the public API stable while delegating command building and response parsing to focused files under infra/agent/ using the standard agent.rs + agent/ module layout.

Structs§

BuildCommandRequest
Request payload used to build provider transport commands.
OneShotRequest
Input payload for one isolated prompt that prefers structured protocol output.
OneShotSubmission
Parsed result returned by one isolated prompt execution.
ParsedResponse
Parsed agent response including content text and usage statistics.
PromptPreparationRequest
Shared prompt preparation input for one transport turn.
RealAgentAvailabilityProbe
Production availability probe backed by PATH executable discovery.
StaticAgentAvailabilityProbe
Availability probe that returns one caller-provided snapshot.

Enums§

AgentBackendError
Error type for backend setup and command construction failures.
AgentTransport
Transport runtime used to execute turns for one backend.
InstructionDeliveryMode
Prompt-shaping mode used for one app-server turn attempt.

Traits§

AgentAvailabilityProbe
Detects which provider CLIs are locally runnable on the current machine.
AgentBackend
Builds and configures external agent CLI commands.

Functions§

build_command_stdin_payload
Builds one optional stdin payload for providers that stream prompts instead of sending them through argv.
cleanup_session_worktree_artifacts
Removes provider-owned worktree artifacts that are derived from one session folder.
compact_codex_progress_message
Maps a Codex item type to a compact progress message for the UI.
create_app_server_client
Returns the app-server client for the selected provider when applicable.
create_backend
Creates the backend implementation for the selected agent provider.
diff_fence
Builds a Markdown code-fence delimiter long enough to safely wrap an arbitrary prompt payload.
executable_name
Returns the CLI executable name used by the provided agent kind.
is_app_server_thought_chunk
Returns whether one app-server assistant chunk should be treated as thought text instead of transcript output.
is_codex_completion_status_message
Returns whether a Codex agent_message is a synthetic completion status.
normalize_instruction_conversation_id
Normalizes one provider-native conversation id for persisted bootstrap reuse tracking.
parse_response
Parses provider output and returns final response content and usage stats.
parse_stream_output_line
Parses one stream line into incremental text and content classification.
parse_turn_response
Parses one final assistant payload strictly against the shared protocol and normalizes it for the active request profile.
plan_app_server_instruction_delivery
Plans how one app-server turn should deliver Agentty’s instruction contract.
prepare_prompt_text
Applies transcript replay and protocol instructions to one prompt.
protocol_schema_instruction_mode
Returns whether bootstrap prompts should include schema text for the selected provider.
provider_kind_for_model
Parses one app-server model string into its routing provider kind.
submit_one_shot
Executes one isolated prompt and returns the parsed response.
submit_one_shot_with_app_server_client
Executes one isolated prompt through the shared app-server transport.
submit_one_shot_with_backend
Executes one isolated prompt using the provided backend.
transport_mode
Returns transport mode for the selected provider.