Send Action
Send an action event.
Body
Action type (llm_call, tool_call, etc.)
Action metadata (key-value pairs)
Event timestamp (ISO 8601, defaults to now)
curl -X POST https://api.valmi.io/v1/actions \
-H "Authorization: Bearer sk_api_abc123xyz" \
-H "Content-Type: application/json" \
-d '{
"agent_key": "agent_abc123xyz",
"action_type": "llm_call",
"metadata": {
"model": "gpt-4",
"input_tokens": 1000,
"output_tokens": 500
}
}'
{
"id": "action_xyz789",
"status": "processed",
"created_at": "2024-01-15T10:30:00Z"
}
Send Outcome
Send an outcome event.
Body
Outcome type (successful_hire, converted_lead, etc.)
Outcome value (count or amount)
curl -X POST https://api.valmi.io/v1/outcomes \
-H "Authorization: Bearer sk_api_abc123xyz" \
-H "Content-Type: application/json" \
-d '{
"agent_key": "agent_abc123xyz",
"outcome_type": "successful_hire",
"value": 1,
"metadata": {
"candidate_id": "cand_123"
}
}'