Parameters
The /api/agent endpoint accepts several optional parameters to customize the agent’s behavior.
residence — Tax jurisdiction
ISO 2-letter country code of the end-user’s fiscal residence. The agent adapts its answers to local tax law.
| Code | Country |
|---|
fr | France (default) |
ch | Switzerland |
lu | Luxembourg |
be | Belgium |
mc | Monaco |
de | Germany |
it | Italy |
es | Spain |
pt | Portugal |
gb | United Kingdom |
us | United States |
ae | UAE |
sg | Singapore |
hk | Hong Kong |
il | Israel |
br | Brazil |
ma | Morocco |
language — Response language
The language the agent responds in.
| Code | Language |
|---|
fr | French (default) |
en | English |
de | German |
it | Italian |
es | Spanish |
pt | Portuguese |
residence and language are independent. A user residing in Switzerland (residence: "ch") can receive answers in English (language: "en").
extended_thinking — Deep reasoning
Activates Claude’s native extended thinking mode.
| Value | Behavior |
|---|
false | Fast response (default) |
true | The agent reasons step-by-step before answering — better for complex, cross-border questions |
Extended thinking uses more tokens but produces significantly better answers for complex fiscal scenarios.
effort — Analysis depth
Controls how deeply the agent explores the Knowledge Graph.
| Value | Behavior |
|---|
null | Auto — the agent decides based on question complexity (default) |
"low" | Concise answer, minimal exploration |
"medium" | Detailed answer, moderate exploration |
"high" | In-depth analysis, broad KG exploration |
"max" | Exhaustive analysis, all relevant sources |
Example: complex cross-border query
curl -X POST https://api.inwealth.fr/api/agent \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk_live_your_key_here" \
-d '{
"messages": [
{"role": "user", "content": "I am moving from France to Switzerland. How are my stock options taxed during the transition?"}
],
"session_id": "session-crossborder",
"residence": "fr",
"language": "en",
"extended_thinking": true,
"effort": "max"
}'