API Reference

The AGENSTAB API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Authentication

Authenticate your API requests using a Bearer token in the HTTP Authorization header. Manage your API keys in the AGENSTAB Dashboard.

Authentication Example
import requests

headers = {
    "Authorization": "Bearer sk_live_...",
    "Content-Type": "application/json"
}
                            

Create Session

Initializes a new isolated V8 browsing session in our edge network. Returns a unique session ID required for all subsequent interactions.

Parameters

  • tier string (optional)
    The compute tier to use ('standard', 'elite'). Default: standard.
  • region string (optional)
    Preferred edge region (e.g., 'us-east-1').
Create Session
response = requests.post(
    "https://api.agenstab.com/v1/sessions",
    json={"tier": "elite"},
    headers=headers
)
print(response.json())
# {"session_id": "ses_123abc"}
                            

Semantic Interact

Executes a deterministic state transition using the semantic representation. Bypasses visual rendering and interfaces directly with the Chromium Accessibility Tree.

Parameters

  • agent_id string (required)
    The stable semantic identifier mapped during extraction.
  • action_type string (required)
    e.g., 'semantic_click', 'type'.
Interact — Python
url = "https://api.agenstab.com/v1/sessions/ses_abc123/interact"
payload = {
    "agent_id": "submit_btn",
    "action_type": "semantic_click"
}
requests.post(url, json=payload, headers=headers)
                            
Interact — Go SDK
agent := agenstab.New(agenstab.Config{
    URL: "ws://localhost:8080/v1/session",
})
agent.Click("submit_btn")
                            

Session Configuration

Advanced session parameters available via browser.create_session.

Parameters

  • token_ttl integer (optional, default: 3600)
    Session expiration in seconds. Session is forcefully terminated after this duration.
  • hitl_transaction_threshold integer (optional, default: 10000)
    Threshold in cents. When a click targets a payment-related element, the session auto-pauses and emits error -32009.
  • max_elements integer (optional, default: 50)
    Maximum number of elements returned by browser.observe. Controls LLM context budget.
  • focus_id string (optional)
    An agent_id to prioritize. Elements near this ID receive higher relevance scores.
  • stealth_mode boolean (optional, default: false)
    Enables advanced browser fingerprint evasion (Canvas noise, WebGL spoofing).
  • domain_allowlist array (optional)
    Restrict navigation to specified domains. Supports wildcards (e.g., *.salesforce.com).
Session Config — Go SDK
agent.CreateSession(agenstab.SessionConfig{
    TokenTTL:                 3600,
    HitlTransactionThreshold: 10000,
    StealthMode:              true,
})
                            

Error Codes

All errors follow JSON-RPC 2.0 format. The error.code field identifies the specific failure.

Code Name Description
-32001ELEMENT_NOT_FOUNDNo mapped element for the given agent_id.
-32002PERMISSION_DENIEDAction blocked by session policy (e.g., allow_js_eval=false).
-32003DOMAIN_RESTRICTEDNavigation target is not in the session's domain_allowlist.
-32004INTERSTITIAL_BLOCKEDA modal, popup, or overlay is blocking the target element.
-32005SESSION_EXPIREDSession has been terminated or token_ttl has elapsed.
-32006RATE_LIMIT_EXCEEDEDActions per minute limit (600 APM) breached.
-32007NAVIGATION_TIMEOUTPage failed to load within the configured timeout.
-32008VLM_GROUNDING_FAILEDTier 3 visual grounding failed or GDPR redaction blocked cloud VLM.
-32009HITL_THRESHOLD_EXCEEDEDHigh-value transaction detected. Session paused for human review.