All integrations

Human in the loop for the OpenAI Agents SDK.

The Agents SDK can pause for a tool approval, but someone has to be there to give it. A function tool that asks ID verified people lets the agent check a judgment call itself, at any hour, and tells it whether the answer is safe to act on.

pip install openai-agents plures
Your Agents SDK agent“Should this customer get a full refund?”
3 ID verified peopleEach answers alone, on their phone
Yes agreement 1.0 · actSplit · your team decides

How it works

  1. 1

    Add the tool

    A function_tool with a docstring that says when to use it: refunds, tone and intent, whether two things match.

  2. 2

    Tell the agent to use it

    Put the rule in the instructions: before approving or declining, ask verified humans and follow the answer.

  3. 3

    Let the reply steer

    The tool's reply says the answer, the agreement and whether to act or escalate, so the agent doesn't have to guess.

The code

Runs as is with a free pk_test_ key, which answers instantly without reaching people.

from typing import List

from agents import Agent, Runner, function_tool
from plures import Plures

plures = Plures()  # reads PLURES_API_KEY


@function_tool
def ask_verified_humans(question: str, options: List[str], context: str) -> str:
    """Ask ID verified people to decide a judgment call before acting on it.

    Use it when a wrong call costs money or trust: tone and intent, refunds,
    whether two things match. Returns their answer and how strongly they agreed.

    Args:
        question: What people should decide, answerable from the context alone.
        options: Two to eight possible answers.
        context: The material to judge, as plain text.
    """
    task = plures.verify(question, options, context=context, verifiers=3, timeout=300)
    r = task.get("result") or {}
    if task["status"] != "completed" or r.get("answer") is None:
        return "No clear answer from verified people. Escalate to the team."
    return "Verified people answered %s, agreement %.0f%%. %s" % (
        r["label"], r["agreement"] * 100,
        "Safe to act on." if r["agreement"] >= 1 else "Not unanimous: escalate instead of acting.",
    )


agent = Agent(
    name="Refunds",
    instructions="Before approving or declining any refund, use ask_verified_humans and follow the answer.",
    tools=[ask_verified_humans],
)

result = Runner.run_sync(agent, "My order arrived broken, I want my $64 back.")
print(result.final_output)

What your agent gets back

The answer, how strongly people agreed from 0 to 1, and each vote. Act on a unanimous answer; send anything less to your team.

{
  "status": "completed",
  "result": {
    "answer": "Yes",
    "label": "Yes",
    "agreement": 1,
    "answers": 3,
    "votes": { "Yes": 3, "No": 0 }
  }
}

Questions

Can I use the hosted MCP server instead?

Yes. Point the SDK's MCP support at https://plures.si/mcp with your key as a bearer token and the agent gets an ask_humans tool, with nothing to install.

What if people don't answer in time?

verify returns the task as it stands when the timeout runs out. The tool then tells the agent to escalate, and the answer still arrives later by webhook or GET /api/v1/tasks/:id.

How do I start?

Get a free API key at plures.si. Test keys (pk_test_) answer instantly without reaching people, so you can build the whole flow first. Then send your own team up to 50 decisions a month for free, and add credit when you want ID verified people on the rest.

Other integrations