Agent parameters
| Field | Type | Required | Notes |
|---|---|---|---|
instruction | string | yes | The natural-language task. |
max_steps | number | no | Integer step cap, max 20. |
budget_usd | number | no | Hard budget cap for tool work. |
response_format | text | json | no | Controls the final answer payload. |
json_schema | object | conditional | Required when response_format is json. |
JSON mode
If you need machine-readable output, request response_format: "json" and provide a JSON Schema.
Structured JSON answer
```bash
curl https://api.faircompany.ai/v1/crawl/agent \
-X POST \
-H "Authorization: Bearer fc_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"instruction": "Compare Notion and Confluence pricing for teams under 50 seats.",
"response_format": "json",
"json_schema": {
"type": "object",
"properties": {
"winner": { "type": "string" },
"notes": { "type": "array", "items": { "type": "string" } }
},
"required": ["winner", "notes"]
}
}'
```
```ts
const result = await fc.agent({
instruction: "Compare Notion and Confluence pricing for teams under 50 seats.",
response_format: "json",
json_schema: {
type: "object",
properties: {
winner: { type: "string" },
notes: { type: "array", items: { type: "string" } },
},
required: ["winner", "notes"],
},
});
console.log(result.answer);
```
```python
result = fc.agent(
"Compare Notion and Confluence pricing for teams under 50 seats.",
response_format="json",
json_schema={
"type": "object",
"properties": {
"winner": {"type": "string"},
"notes": {"type": "array", "items": {"type": "string"}},
},
"required": ["winner", "notes"],
},
)
print(result.answer)
```
```json
{
"tool": "faircrawl_agent",
"arguments": {
"instruction": "Compare Notion and Confluence pricing for teams under 50 seats.",
"response_format": "json",
"json_schema": {
"type": "object",
"properties": {
"winner": { "type": "string" },
"notes": { "type": "array", "items": { "type": "string" } }
},
"required": ["winner", "notes"]
}
}
}
```