Passing Context Information
Last updated
Was this helpful?
Was this helpful?
"userRole": {"type": "string", "value": "premium"}"userInfo": {"type": "object", "value": {"name": "John", "age": 30}}"intent": {"type": "expressions", "value": "purchase(product)"}Your App → POST /agents/conv456
{
"input": "What's my account balance?",
"context": {
"userId": {"type": "string", "value": "user-789"},
"accountType": {"type": "string", "value": "premium"}
}
}
→ EDDI Behavior Rule checks context:
IF context.accountType = "premium" THEN httpcall(get-balance)
→ HTTP Call uses context:
GET /api/accounts/${context.userId}/balance
→ Output Template uses context:
"Hello! Your premium account balance is ${httpCalls.balance.amount}"
→ Response to Your App:
"Hello! Your premium account balance is $1,250.00"{
"input": "",
"context": {
"onboardingOfUser": {
"type": "string",
"value": "true"
},
"userInfo": {
"type": "object",
"value": {
"username": "Barbara"
}
}
}
}