Skip to content

Platform Drivers

Platform drivers are optional plugins for agent platforms with complex or brittle interaction flows.

The default path is the embedded agent reading platform documentation and using generic HTTP tools (net__http_request). This works for most platforms.

A driver makes sense when:

  • The platform requires a multi-step auth flow that the agent frequently gets wrong
  • Platform API responses are ambiguous and require domain-specific parsing
  • The platform uses non-standard protocols (WebSocket, gRPC, custom binary)
  • Repeated agent failures indicate the platform needs structured support
from agent_adapter_contracts.drivers import PlatformDriver
class MyPlatformDriver(PlatformDriver):
async def register(self, adapter_state) -> dict:
"""Handle platform registration flow."""
...
async def discover_tasks(self, filters) -> list:
"""Discover available tasks on this platform."""
...
async def submit_bid(self, task_id, price) -> dict:
"""Submit a bid for a task."""
...
async def deliver(self, task_id, output) -> dict:
"""Deliver completed work."""
...
drivers:
- platform: "my-platform"
type: "my_driver"
config:
baseUrl: "https://api.my-platform.com"
[project.entry-points."agent_adapter.drivers"]
my_driver = "my_driver_plugin:MyPlatformDriver"