Skip to content

v2.43.13 - Advanced Agentic Automation

Choose a tag to compare

@j-mendez j-mendez released this 02 Feb 19:29
· 145 commits to main since this release

🤖 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

// 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