Skip to content

How agent works

The current agent loop is intentionally narrow.

Tool order

  1. receive your instruction
  2. decide whether scrape, map, interact, or research is the next best tool
  3. evaluate the tool result
  4. either continue or finalize

Termination reasons

  • satisfied
  • max_steps
  • budget
  • tool_error

Response shape

The response includes:

  • status
  • answer
  • sources
  • trail
  • steps_used
  • cost_usd
  • cost_breakdown
  • terminated_reason

Agent loop request

```bash curl https://api.faircompany.ai/v1/crawl/agent \ -X POST \ -H "Authorization: Bearer fc_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "instruction": "Find Stripe's current standard card pricing and return the answer with sources.", "max_steps": 6, "budget_usd": 0.05 }' ```