1#![warn(missing_docs)]
82
83mod agent;
84pub mod automation;
85mod config;
86mod error;
87mod llm;
88mod memory;
89pub mod tools;
90
91#[cfg(feature = "search")]
92pub mod search;
93
94#[cfg(feature = "chrome")]
95pub mod browser;
96
97#[cfg(feature = "webdriver")]
98pub mod webdriver;
99
100#[cfg(feature = "fs")]
101pub mod temp;
102
103pub use agent::{Agent, AgentBuilder, FetchResult, PageExtraction};
105pub use config::{
106 AgentConfig, HtmlCleaningMode, LimitType, ResearchOptions, RetryConfig, SearchOptions,
107 TimeRange, UsageLimits, UsageSnapshot, UsageStats,
108};
109pub use error::{AgentError, AgentResult, SearchError};
110pub use llm::{
111 CompletionOptions, CompletionResponse, LLMProvider, Message, MessageContent, TokenUsage,
112};
113pub use memory::AgentMemory;
114pub use tools::{
115 AuthConfig, CustomTool, CustomToolRegistry, CustomToolResult, HttpMethod,
116 SpiderBrowserToolConfig, SpiderCloudToolConfig,
117};
118
119pub use automation::{
121 ActResult, ActionRecord, ActionResult, ActionType, AutomationConfig, AutomationResult,
122 AutomationUsage, CaptureProfile, ChainBuilder, ChainCondition, ChainContext, ChainResult,
123 ChainStep, ChainStepResult, CleaningIntent, ClipViewport, ContentAnalysis, CostTier,
124 ExtractionSchema, FormField, FormInfo, HtmlCleaningProfile, InteractiveElement,
125 ModelCapabilities, ModelEndpoint, ModelInfoEntry, ModelPolicy, ModelPricing, ModelProfile,
126 ModelRanks, NavigationOption, PageObservation, PromptUrlGate, ReasoningEffort,
127 RecoveryStrategy, RetryPolicy, SelectorCache, SelectorCacheEntry, StructuredOutputConfig,
128 VisionRouteMode, MODEL_INFO,
129};
130
131pub use automation::{RemoteMultimodalConfig, RemoteMultimodalConfigs, RemoteMultimodalEngine};
133
134pub use automation::{EngineError, EngineResult};
136
137pub use automation::{
139 best_effort_parse_json_object, extract_assistant_content, extract_last_code_block,
140 extract_last_json_array, extract_last_json_boundaries, extract_last_json_object, extract_usage,
141 fnv1a64, truncate_utf8_tail,
142};
143
144pub use automation::{
146 clean_html, clean_html_base, clean_html_full, clean_html_raw, clean_html_slim,
147 clean_html_with_profile, clean_html_with_profile_and_intent, smart_clean_html,
148};
149
150pub use automation::{categories, DiscoveredUrl, MapResult};
152
153pub use automation::{AutomationMemory, MemoryOperation};
155
156pub use automation::{
158 ACT_SYSTEM_PROMPT, CONFIGURATION_SYSTEM_PROMPT, DEFAULT_SYSTEM_PROMPT, EXTRACT_SYSTEM_PROMPT,
159 MAP_SYSTEM_PROMPT, OBSERVE_SYSTEM_PROMPT,
160};
161
162pub use automation::{
164 ConcurrentChainConfig, ConcurrentChainResult, DependencyGraph, DependentStep, StepResult,
165};
166
167pub use automation::{
169 Alternative, ConfidenceRetryStrategy, ConfidenceSummary, ConfidenceTracker, ConfidentStep,
170 Verification, VerificationType,
171};
172
173pub use automation::{
175 ActionToolSchemas, FunctionCall, FunctionDefinition, ToolCall, ToolCallingMode, ToolDefinition,
176};
177
178pub use automation::{
180 ChangeType, DiffStats, ElementChange, HtmlDiffMode, HtmlDiffResult, PageStateDiff,
181};
182
183pub use automation::{
185 Checkpoint, CheckpointResult, CheckpointType, ExecutionPlan, PageState, PlanExecutionState,
186 PlannedStep, PlanningModeConfig, ReplanContext,
187};
188
189pub use automation::{
191 HealedSelectorCache, HealingDiagnosis, HealingRequest, HealingResult, HealingStats,
192 SelectorIssueType, SelfHealingConfig,
193};
194
195pub use automation::{
197 MultiPageContext, PageContext, PageContribution, SynthesisConfig, SynthesisResult,
198};
199
200pub use automation::{
202 build_schema_generation_prompt, generate_schema, infer_schema, infer_schema_from_examples,
203 refine_schema, GeneratedSchema, SchemaCache, SchemaGenerationRequest,
204};
205
206pub use automation::extract_html_context;
208
209pub use automation::{parse_tool_calls, tool_calls_to_steps};
211
212pub use automation::execute_graph;
214
215pub use automation::cache::{CacheStats, CacheValue, SmartCache};
217pub use automation::executor::{BatchExecutor, ChainExecutor, PrefetchManager};
218pub use automation::router::{
219 auto_policy, estimate_tokens, ModelRequirements, ModelRouter, ModelSelector, RoutingDecision,
220 ScoredModel, SelectionStrategy, TaskAnalysis, TaskCategory,
221};
222
223#[cfg(feature = "search")]
224pub use agent::ResearchResult;
225
226#[cfg(feature = "search")]
227pub use search::{SearchProvider, SearchResult, SearchResults};
228
229#[cfg(feature = "openai")]
230pub use llm::OpenAIProvider;
231
232#[cfg(feature = "search_serper")]
233pub use search::SerperProvider;
234
235#[cfg(feature = "search_brave")]
236pub use search::BraveProvider;
237
238#[cfg(feature = "search_bing")]
239pub use search::BingProvider;
240
241#[cfg(feature = "search_tavily")]
242pub use search::TavilyProvider;
243
244#[cfg(feature = "memvid")]
245pub use automation::{
246 ExperienceMemory, ExperienceMemoryConfig, ExperienceOutcome, ExperienceRecord,
247 MemoryStats as ExperienceMemoryStats, RecalledExperience,
248};
249
250#[cfg(feature = "chrome")]
251pub use browser::BrowserContext;
252
253#[cfg(feature = "chrome")]
254pub use automation::{
255 run_remote_multimodal_with_page, run_spawn_pages_concurrent, run_spawn_pages_with_factory,
256 run_spawn_pages_with_options, PageFactory, PageSetupFn, SpawnPageOptions, SpawnedPageResult,
257};
258
259#[cfg(feature = "webdriver")]
260pub use webdriver::WebDriverContext;
261
262#[cfg(feature = "fs")]
263pub use temp::{TempFile, TempStorage};