Skip to main content
GET
/
api
/
suggestions
Action suggestions
curl --request GET \
  --url https://api.example.com/api/suggestions
{
  "action_name": "<string>",
  "success_probability": 123,
  "evidence_count": 123,
  "reasoning": "<string>"
}
This is the Policy Guide endpoint. Given the current context, it recommends the next best action based on past experiences and learned strategies.

Query parameters

context_hash
integer
required
Context fingerprint (computed from the current context).
last_action_node
integer
Last action node ID. Set to null to get suggestions from the start.
limit
integer
default:"10"
Maximum number of suggestions to return.

Response

Returns an array of ActionSuggestionResponse objects.
action_name
string
Suggested action name.
success_probability
number
Probability of success (0.01.0).
evidence_count
integer
Number of supporting past examples.
reasoning
string
Explanation for why this action is recommended.
[
  {
    "action_name": "check_seat_availability",
    "success_probability": 0.94,
    "evidence_count": 12,
    "reasoning": "After confirming the movie title, checking availability has a 94% success rate based on 12 past interactions."
  }
]

Usage with the SDK

const suggestions = await client.getActionSuggestions(contextHash, lastActionNode, 3);

if (suggestions.length > 0) {
  const best = suggestions[0];
  console.log(`Recommended: ${best.action_name} (${(best.success_probability * 100).toFixed(0)}% success)`);
  console.log(`Reasoning: ${best.reasoning}`);
}