v2.43.13
spider-rs/spiderv2.43.13Feb 2, 2026by j-mendez
AI Summary
Added comprehensive agentic automation capabilities to spider with three phases of features including autonomous agent execution, action chaining, and self-healing selector caching.
Key Highlights
- Phase 1: Simplified APIs including act(), observe(), extract_page()
- Phase 2: Self-healing features with SelectorCache and structured outputs
- Phase 3: Autonomous agent execution with execute(), agent(), chain()
- RecoveryStrategy for error handling with Retry, Alternative, Skip, Abort options
- AI-powered URL discovery with map() method
New Features
- act() for single actions with natural language
- observe() for page state analysis
- extract_page() for structured data extraction
- execute() for autonomous goal-oriented execution
- chain() for sequential action composition with conditions
Full Release Notes
## 🤖 Advanced Agentic Automation Features
This release adds comprehensive agentic automation capabilities to spider, making it a powerful tool for autonomous web interactions.
### Phase 1: Simplified Agentic APIs
- `act(page, instruction)` - Execute single actions with natural language
- `observe(page)` - Analyze page state and get structured observations
- `extract_page(page, prompt, schema)` - Extract structured data from pages
- `AutomationMemory` - In-memory state management for multi-round automation
- `run_with_memory()` - Stateful automation with persistent context
### Phase 2: Self-Healing & Discovery
- `SelectorCache` - Self-healing selector cache with LRU eviction
- `act_cached(page, instruction, cache)` - Actions with automatic selector caching
- `StructuredOutputConfig` - Native JSON schema enforcement for reliable outputs
- `extract_structured(page, prompt, config)` - Schema-validated data extraction
- `map(page, prompt)` - AI-powered URL discovery and categorization
- `MapResult` / `DiscoveredUrl` - Relevance-scored URL discovery
### Phase 3: Autonomous Agent Execution
- `execute(page, config)` - Full autonomous goal-oriented execution
- `agent(page, goal)` - Simple goal execution with defaults
- `agent_extract(page, goal, prompt)` - Goal execution with data extraction
- `chain(page, steps)` - Sequential action composition with conditions
- `AgentConfig` - Comprehensive agent configuration (max_steps, timeout, recovery, etc.)
- `RecoveryStrategy` - Error handling strategies (Retry, Alternative, Skip, Abort)
- `ChainStep` / `ChainCondition` - Conditional action execution
- `AgentEvent` - Real-time progress tracking events
- `AgentResult` / `ChainResult` - Detailed execution results with history
### Example Usage
```rust
// Autonomous agent
let config = AgentConfig::new("Find and add the cheapest laptop to cart")
.with_max_steps(30)
.with_success_url("/cart")
.with_extraction("Extract cart total");
let result = engine.execute(&page, config).await?;
// Action chaining
let steps = vec![
ChainStep::new("click Login"),
ChainStep::new("type email").when(ChainCondition::ElementExists("#email")),
ChainStep::new("click Submit").then_extract("Extract any errors"),
];
let result = engine.chain(&page, steps).await?;
// Self-healing cache
let mut cache = SelectorCache::new();
engine.act_cached(&page, "click submit", &mut cache).await?;
```
### Full Changelog
- feat(automation): add Phase 3 agentic features - autonomous agent, action chaining, error recovery
- feat(automation): add Phase 2 agentic features - selector cache, structured outputs, map API
- feat(automation): add simplified agentic APIs - act(), observe(), extract()
- feat(automation): add agentic memory for multi-round automation