Rascunhe respostas a pedidos de reembolso com IA, sem nunca enviá-las
Um agente confere um pedido de reembolso com a sua política e rascunha uma resposta para uma pessoa aprovar. Ele não consegue emitir o reembolso.
- Arquivos
- Conexão somente leitura
- Callback
- Limite de orçamento
Veja uma execução real
Uma execução real em 7 de out. de 2026, reproduzida. Modelo: openai/gpt-6-luna.
{
"ticket_id": "tkt_1001",
"today": "2026-10-06"
}- Na filaorçamento de $0.03 reservado
- MicroVMmicroVM ready
- MicroVMworker started · shell off · web off
- Arquivo
read refund-policy.md - Conexãohelpdesk GET /tickets/tkt_1001
- Resultado
helpdesk GET → 200 - MicroVMmicroVM destroyed
- Concluída3 chamadas ao modelo, 4,442 tokensSaída gravada (em inglês)
Decision: Eligible
Reason: Policy clause 1 allows a full refund within 14 days for an annual plan if no project was created and no API call was made. The ticket shows purchase on 2026-09-28, zero projects, and zero API calls; the request is dated 2026-10-06, within 14 days.
Draft reply: Hi Maria, your annual plan meets the refund criteria. The billing team will process the refund to your original payment method. Best, Support
- Worker destruído$0.002782 cobrados, $0.027218 liberados
Execute você mesmo
Abra o exemplo no playground com a requisição inteira preenchida. Ele roda na sua própria conta, dentro do orçamento indicado, contra os mesmos sistemas de exemplo somente leitura.
Orçamento deste exemplo: $0.03
Como funciona
A política é um arquivo e o ticket vem de uma conexão somente leitura com o helpdesk. O agente decide se o pedido é elegível, cita a cláusula em que se baseou e escreve um rascunho. Uma pessoa aprova e o sistema de faturamento faz o resto.
O que o agente pode e não pode fazer
As permissões fazem parte da requisição. Tudo o que não está listado aqui não está disponível para a execução.
| Configuração | Permitido |
|---|---|
| Conexões | helpdesk: somente GET, em ephemer.al/api/samples/support-api |
| Web | Desativado |
| Shell | Desativado |
| Arquivos | refund-policy.md (somente leitura) |
| Retenção zero de dados | Desativada: o registro é mantido por 30 dias |
| Orçamento | $0.03, um limite rígido |
| Tempo limite | 60 segundos |
As credenciais nunca entram na máquina: um broker as adiciona a cada chamada e aplica os métodos acima.
O código
Esta é a requisição exata que o exemplo envia. Defina EPHEMERAL_API_KEY com uma chave de membro da sua organização.
curl -X POST $EPHEMERAL_URL/v1/runs \
-H "Authorization: Bearer $EPHEMERAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d @request.jsonArquivos na requisição
Enviados inline, então nada é carregado antes. O agente vê cada um como um arquivo somente leitura.
refund-policy.md
# Refund policy
1. Annual plans may be refunded in full within 14 days of purchase if no project has been created and no API call has been made.
2. After 14 days, or after any use, annual plans are refunded pro rata for the unused full months only, at our discretion.
3. Monthly plans are not refunded for the current month; cancelling stops the next charge.
4. A refund is issued by the billing team only, to the original payment method. Never promise a date.
5. Always be polite, concise and plain. Do not offer discounts.
Corpo completo da requisição request.json
O mesmo corpo, com os arquivos inline.
{
"prompt": "Handle the refund request in the helpdesk ticket input.ticket_id (GET /tickets/{id}); today's date is input.today. Apply refund-policy.md. Reply in Markdown with: Decision (eligible, not eligible or needs a human, one line), Reason (cite the policy clause number and the ticket facts you used), and Draft reply (under 90 words, in the customer's language). The draft is for a human to review: never say a refund has been issued, only that the billing team will process it if the decision is eligible. Use only what the data returns and never guess; if a call fails or a field is missing, say so.",
"input": {
"ticket_id": "tkt_1001",
"today": "2026-10-06"
},
"files": [
{
"path": "refund-policy.md",
"content": "# Refund policy\n\n1. Annual plans may be refunded in full within 14 days of purchase if no project has been created and no API call has been made.\n2. After 14 days, or after any use, annual plans are refunded pro rata for the unused full months only, at our discretion.\n3. Monthly plans are not refunded for the current month; cancelling stops the next charge.\n4. A refund is issued by the billing team only, to the original payment method. Never promise a date.\n5. Always be polite, concise and plain. Do not offer discounts.\n"
}
],
"connections": {
"helpdesk": {
"type": "http",
"url": "https://ephemer.al/api/samples/support-api",
"auth": {
"type": "bearer",
"token": "sample_read_key"
},
"allowed_methods": [
"GET"
],
"instructions": "A helpdesk. GET /tickets lists tickets (id, subject, status, language). GET /tickets/{id} returns one ticket with customer, context (order or invoice facts) and the full message thread. Amounts are in cents."
}
},
"shell": false,
"timeout_seconds": 60,
"max_cost_micros": 30000
}