reach.runtime¶
Agent execution runtime interfaces, selection outcomes, and driver options models.
Define the core AgentRuntime interface and shared runtime agent helpers.
AgentOptions ¶
Bases: BaseModel
Base configuration common to all agent drivers.
Source code in src/reach/runtime/__init__.py
custom_isolation_dir
property
¶
Return custom isolation directory path configured on this options instance, if any.
AgentRuntime ¶
Bases: ABC
Define standard abstract base class for agent runtime implementations.
Source code in src/reach/runtime/__init__.py
637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 | |
allowed_tools
property
¶
Return explicit allowed tools override from options or settings.
auto_clean
property
¶
Return whether automatic post-probe cleanup is enabled on the runtime options.
blocked_env_vars
property
¶
Return explicit blocked environment variables override from options or settings.
custom_isolation_dir
property
¶
Return the configured custom isolation directory path, or None.
effective_effort
property
¶
Return configured reasoning effort or default from model profile.
isolate_config_dir
property
¶
Return whether isolated runtime config is enabled on the runtime options.
isolation_dir_field
property
¶
Return the options field name used for custom directory isolation, if supported.
rations_catalog
property
¶
Return True if this runtime actively rations skill listing budgets.
skills_subpath
property
¶
Return relative skill directory subpath from profile or runtime default.
timeout_s
property
¶
Return per-probe execution timeout in seconds from settings.
use_symlinks
property
¶
Return whether symlink installation is enabled on the runtime options.
__init__ ¶
__init__(
settings: RuntimeSettings | None = None,
options: OptionsT | None = None,
) -> None
Initialize agent runtime settings and options.
Source code in src/reach/runtime/__init__.py
build_env ¶
Assemble process environment with API keys and workspace overrides.
Source code in src/reach/runtime/__init__.py
cleanup ¶
clone_isolated ¶
fit ¶
fit(
catalog: Catalog, skills: Iterable[Skill]
) -> CatalogFit
Evaluate whether a catalog fits listing budgets without materializing.
install ¶
Materialize resident skills in workspace and return workspace path.
Source code in src/reach/runtime/__init__.py
parse_stream ¶
parse_stream(
lines: Iterable[str],
resident: Sequence[str] = (),
early_exit: bool = False,
) -> SessionSummary
Parse transcript or log lines into a standardized SessionSummary.
Default implementation records early_exit and assigns SUCCESS status if lines were produced. Subclasses override this to extract tool invocations, reasoning, and telemetry.
Source code in src/reach/runtime/__init__.py
post_probe ¶
resident_skill_paths ¶
Return set of valid filesystem directory paths for resident skills.
Source code in src/reach/runtime/__init__.py
select
abstractmethod
¶
select(
query_text: str,
workdir: Path,
target_skill: str | None = None,
) -> SelectionOutcome
Execute a single query probe and return the observed skill selection.
skill_roots ¶
skill_roots(workdir: Path) -> tuple[SkillRoot, ...]
Return discovery directories where runtime searches for skills.
Source code in src/reach/runtime/__init__.py
skills_dir ¶
AntigravityOptions ¶
Bases: VertexOptions
Configure common options for Antigravity-ecosystem agent runtimes.
Source code in src/reach/runtime/__init__.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | |
effective_api_key
property
¶
Return configured API key or fallback to environment variables.
effective_location
property
¶
Return resolved Google Cloud location when Vertex/ADC is active.
When api_key is explicitly set alongside Vertex (Express Mode), omit ambient/registry location fallback because VertexEndpoint forbids combining api_key with regional project/location parameters.
effective_project
property
¶
Return resolved Google Cloud project ID when Vertex/ADC is active.
When api_key is explicitly set alongside Vertex (Express Mode), omit ambient/registry project fallback because VertexEndpoint forbids combining api_key with regional project/location parameters.
effective_vertex
property
¶
Return True if Vertex AI / Enterprise ADC mode is active.
When vertex is not explicitly set and no Vertex toggle env var is active, ambient GEMINI_API_KEY / GOOGLE_API_KEY takes precedence over implicit GOOGLE_CLOUD_PROJECT detection.
resolve_model_provider ¶
Resolve model provider unless Vertex/ADC mode is active without explicit provider.
Source code in src/reach/runtime/__init__.py
resolve_schema_dict ¶
Parse and validate explicit or configured JSON schema into a dictionary.
Source code in src/reach/runtime/__init__.py
CatalogFit ¶
Bases: BaseModel
Report catalog residency limits and potential description truncation metrics.
Source code in src/reach/runtime/__init__.py
CliOptions ¶
Bases: AgentOptions
Hold common configuration options for CLI subprocess-driven agent runtimes.
Source code in src/reach/runtime/__init__.py
SelectionOutcome ¶
Bases: _ProbeTelemetry
Represent the observable result of probing an agent runtime with a query.
Source code in src/reach/runtime/__init__.py
SessionStatus ¶
Bases: StrEnum
Enumerate canonical terminal execution statuses of an agent session.
Source code in src/reach/runtime/__init__.py
SessionSummary ¶
Bases: _ProbeTelemetry
Hold parsed session outcomes and telemetry across CLI runtime logs.
Source code in src/reach/runtime/__init__.py
saw_result
property
¶
Return True if stream contained a terminal result event or early exit.
to_outcome ¶
to_outcome(
observed_catalog: tuple[str, ...] | list[str] = (),
fallback_model: str = "",
early_exit: bool = False,
turns_taken: int | None = None,
) -> SelectionOutcome
Convert parsed session summary into a canonical SelectionOutcome.
Source code in src/reach/runtime/__init__.py
SkillRoot ¶
Bases: BaseModel
Represent a skill discovery directory location and its resolution precedence.
Source code in src/reach/runtime/__init__.py
ToolCallInfo ¶
Bases: BaseModel
Represent an observed tool invocation and its parameters.
Source code in src/reach/runtime/__init__.py
path
property
¶
Extract first non-empty filesystem path from recognized tool parameters.
__init__ ¶
__init__(
name: str = "",
parameters: dict[str, Any] | None = None,
path: str | None = None,
**data: Any,
) -> None
Initialize tool invocation with optional direct path argument.
Source code in src/reach/runtime/__init__.py
VertexOptions ¶
Bases: AgentOptions
Configure Google Cloud Vertex AI and Application Default Credentials options.
Source code in src/reach/runtime/__init__.py
build_runtime ¶
build_runtime(settings: RuntimeSettings) -> AgentRuntime
Instantiate and configure an AgentRuntime from settings.
Source code in src/reach/runtime/__init__.py
known_agents ¶
Return tuple of supported agent runtime names from configuration.
Source code in src/reach/runtime/__init__.py
register_agent ¶
register_agent(
name: str,
factory: Callable[[RuntimeSettings], AgentRuntime],
options: type[BaseModel] | None = None,
) -> None
Register a runtime factory and optional options schema for an agent name.