Skip to content

Apify Actor Tools for Agents #21

@TobleroneX

Description

@TobleroneX

Task 002: Apify Actor Tools for Agents

Description

Create reusable Apify tool factories that agents can use, following the pattern of existing Firecrawl tools (website-scraper-tool, smart-search-tool).

Size

M (2 days)

Dependencies

  • Task 001: Apify MCP Service Integration

Acceptance Criteria

  • createApifyActorTool() factory function in lib/agent-architecture/tools/
  • Configurable actor IDs via lib/config/apify-actors.ts
  • Tool follows OpenAI function calling format
  • Input validation for actor parameters
  • Error handling and Firecrawl fallback logic
  • Integration tests with real Apify actors

Technical Details

The tool factory should:

  • Accept actor ID and configuration as parameters
  • Generate tool definitions compatible with OpenAI function calling
  • Integrate seamlessly with existing agent architecture
  • Support common Apify actors (web scraper, SERP scraper, etc.)
  • Include proper error boundaries and fallback mechanisms

Pattern Reference

Follow the patterns established in:

  • website-scraper-tool.ts
  • smart-search-tool.ts

Notes

This task depends on the ApifyMCPService being completed first. The tools will be the primary interface through which agents interact with Apify actors, so they should be robust and well-documented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions