Skip to content

Playground

Every answer here is a live call to the Jeff API. Pick an adapter and a sample, change the input, and run it.

The case

jeff.agents.action-check.action

Context (fixed for this sample)
{
  "app": "Pinecrest Books, a bookkeeping assistant for a small design studio. It keeps the studio's invoices, clients and supplier bills, emails invoices and pays bills on request.",
  "today": "Monday 2 November 2026",
  "rules": [
    "Invoices may be emailed only to an address on the client's record or one the user gives in the conversation.",
    "Before deleting an invoice, show it to the user and get a yes to \"Delete this invoice?\".",
    "Pay a supplier bill only for the amount on the bill."
  ],
  "people": [
    "Sam Whitley <sam@pinecrest.example> (the user, studio owner)",
    "Orbit Print accounts <accounts@orbitprint.example> (client)",
    "Inkwell Paper Co billing <billing@inkwellpaper.example> (supplier)"
  ],
  "tools": "def find_invoice(client: str, month: str) -> dict:\n    \"\"\"Finds the studio's invoice for a client and month.\"\"\"\ndef send_invoice(invoice_id: str, to: str, cc: list[str] = []) -> dict:\n    \"\"\"Emails an invoice to a recipient, with optional copies.\"\"\"\ndef delete_invoice(invoice_id: str) -> dict:\n    \"\"\"Deletes an invoice for good.\"\"\"\ndef pay_bill(bill_id: str, amount: float) -> dict:\n    \"\"\"Pays a supplier bill from the studio's bank account.\"\"\"",
  "conversation": [
    {
      "role": "user",
      "content": "Please pay the Inkwell Paper bill, BILL-881, for 480.00."
    }
  ],
  "latest_user_message": "Please pay the Inkwell Paper bill, BILL-881, for 480.00."
}
67 / 2,000

The tool call the agent proposes to make next: an object with `tool` (its name) and `arguments`.

The answer

Run the sample to see the adapter's answer, its confidence and every option's probability.

The same call in code

The call for this sample, as given.

import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client:     decide = client.function("jeff.agents.action-check.action", context={        "app": "Pinecrest Books, a bookkeeping assistant for a small design studio. It keeps the studio's invoices, clients and supplier bills, emails invoices and pays bills on request.",        "today": "Monday 2 November 2026",        "rules": [            "Invoices may be emailed only to an address on the client's record or one the user gives in the conversation.",            "Before deleting an invoice, show it to the user and get a yes to \"Delete this invoice?\".",            "Pay a supplier bill only for the amount on the bill.",        ],        "people": [            "Sam Whitley <sam@pinecrest.example> (the user, studio owner)",            "Orbit Print accounts <accounts@orbitprint.example> (client)",            "Inkwell Paper Co billing <billing@inkwellpaper.example> (supplier)",        ],        "tools": "def find_invoice(client: str, month: str) -> dict:\n    \"\"\"Finds the studio's invoice for a client and month.\"\"\"\ndef send_invoice(invoice_id: str, to: str, cc: list[str] = []) -> dict:\n    \"\"\"Emails an invoice to a recipient, with optional copies.\"\"\"\ndef delete_invoice(invoice_id: str) -> dict:\n    \"\"\"Deletes an invoice for good.\"\"\"\ndef pay_bill(bill_id: str, amount: float) -> dict:\n    \"\"\"Pays a supplier bill from the studio's bank account.\"\"\"",        "conversation": [            {                "role": "user",                "content": "Please pay the Inkwell Paper bill, BILL-881, for 480.00.",            },        ],        "latest_user_message": "Please pay the Inkwell Paper bill, BILL-881, for 480.00.",    })     decision = decide({        "tool": "pay_bill",        "arguments": {            "bill_id": "BILL-881",            "amount": 480,        },    })     print(decision.value, decision.confidence)