Pilot Profile¶
techrevati.runtime.pilot ¶
Pilot-ready runtime profile helpers.
The helpers in this module do not change AgentSession defaults. They build
an explicit profile that applications can opt into for controlled release
candidate pilots:
- deny-by-default tool permissions through an allowed-tool list,
- prompt-injection checks on tool outputs,
- hard-stop governance limits for turns, cost, failures, and tool calls.
PilotRuntimeProfile
dataclass
¶
PilotRuntimeProfile(
permissions, guardrails, governance, max_iterations
)
Reusable pilot components for AgentSession construction.
GovernancePlane contains mutable counters, so agent_session_kwargs()
returns a fresh plane every time. Use the returned mapping directly when
constructing an AgentSession.
build_pilot_profile ¶
build_pilot_profile(
*,
role,
allowed_tools,
budget_usd,
permission_mode=PermissionMode.READ_ONLY,
denied_tools=(),
tool_requirements=None,
max_iterations=25,
max_tool_calls=100,
max_consecutive_failures=3,
prompt_injection_stages=("post",),
extra_prompt_injection_patterns=(),
tool_deny_patterns=(),
)
Build a conservative profile for a controlled RC pilot.
The profile is intentionally explicit: callers must supply the role, allowed tools, and session budget. Unknown tools are denied by the allowed list; governance breaches terminate the session; prompt-injection signatures are checked on tool outputs by default.