HumanLayer

Human in the Loop for AI Agents

HumanLayer is an API and SDK that enables AI Agents to contact humans for feedback, input, and approvals.

Y Combinator

Get started in 5 minutes

Drop in the SDK and start building. Clean APIs that fit right into your stack, whether you're using Python, TypeScript, or rolling your own client.

from langchain.agents import AgentType, initialize_agent
from langchain.tools import tool
from langchain_openai import ChatOpenAI

from humanlayer.core.approval import ApprovalMethod, HumanLayer

hl = HumanLayer(api_key="sk-example-key", verbose=True)

# add can be called without approval
@tool
def add(x: int, y: int) -> int:
    """Add two numbers together."""
    return x + y


# but multiply must be approved by a human
@tool
@hl.require_approval()
def multiply(x: int, y: int) -> int:
    """multiply two numbers"""
    return x * y


tools = [add.as_tool(), multiply.as_tool()]

llm = ChatOpe...

Trusted By Engineers At

For builders obsessed with quality

"Inversion of the AI agent model — long-running processes that pause for human direction when necessary ... The demo Dex of @humanlayer_dev did at @AITinkerers in SF last week really stuck with me."

kwindla
kwindla@trydaily
Company logo

This is awesome! Can't wait to integrate this with OpenFunnel Agents

Fenil Suchak
Fenil Suchak@OpenFunnel

This is awesome! So instead of RLHF for Gen 1 (system 1), HumanLayer (YC F24) is analogous to "RLHF for Gen 2 (system 2)"

Jerry Hsiang
Jerry HsiangFinance @Royal

Ever since I got hands-on with HumanLayer, I'm asking my whole team to think more about Agentic AI workflows - I used to think agents were not worth the effort to get them to production-grade reliability, but now I'm stoked on what is possible when you bring humans into the loop

Vaibhav Gupta
Vaibhav Gupta@Boundary (YC W23)

Thanks for making sure the AI Agents don't go Agent Smith on us

Clint Dunn
Clint Dunn@Wilde

Everyone needs to check out humanlayer... dope software

Kirby Winfield
Kirby Winfield@Ascend

Hot take: If you're serious about AI you don't want someone making the "hard AI parts go away" You want someone making the NON CORE PARTS go away so ALL YOU DO is work on the hard parts. This is why I'm excited to try @humanlayer_dev

Amir Elaguizy
Amir Elaguizy@amirpc

Really enjoying playing with @humanlayer_dev - instead of the manual outreach grind, I just hang out in slack and give the agent feedback as it finds new leads. Pretty darn cool @dexhorthy

Tom Granot
Tom Granot@TomGranot

Key Features

Require Human Approval for Function Calls

@hl.require_approval()
decorator blocks specific function calls until a human has been consulted - upon denial, feedback will be passed to the LLM.

OmniChannel Contact

Contact humans and collect responses across Slack, Email, Discord, and more.

Advanced Approvals

Coordinate approvals across multiple teams and individuals with escalations and timeouts.

Human as Tool

hl.human_as_tool()
allows for contacting a human for answers, advice, or feedback.

Granular Routing

Route approvals to specific teams or individuals.

Bring your own LLM + Framework

Because HumanLayer is implemented at tools layer, it supports any LLM and all major orchestration frameworks that support tool calling.

How it Works

Approval Workflows

Get running with SDK in 5 minutes

Get running with SDK in 5 minutes

Guarantee human oversight of key function calls

Guarantee human oversight of key function calls

On denial, feedback added to agent context window

On denial, feedback added to agent context window

Human as Tool

Custom Responses and Escalations

from humanlayer import HumanLayer
hl = HumanLayer()

@hl.require_approval()
def send_email(to: str, subject: str, body: str):
    """Send an email to the customer"""
    ...

def run_llm_task(prompt, tools, llm="gpt-4"):
    """Your custom LLM task implementation"""
    ...

run_llm_task(
    prompt="Send an email welcoming the user to 
    the platform and encouraging them to...",
    tools=[send_email],
    llm="gpt-4o"
)
human

Plans & Pricing

$0/month

Starter

Free forever for Hackers and Tinkerers

Works with all popular frameworks
100 operations/month
Pay as you go ($20/200 addt'l)
Send to Slack, Email, Discord
Up to 10 active users
Limited Data Retention
$500/month

Premium

Collaborate and scale

Remove HumanLayer Branding (BYO app/keys)
Includes 2000 operations/month ($18/200 add'l)
Advanced Approval Workflows w/ Escalations and Timeouts
Learning and Auto Approvals
Channels for MSTeams, SMS, RCS
Priority Support
180-day retention on feedback datasets export
Custom

Enterprise

Deploy into your Private VPC or on-prem
RBAC and SSO support
Volume discounts
Custom notification channels
Expert Advice on custom-built agents for sales, marketing, hiring, and more.

Pricing FAQs

Can’t find the answer you’re looking for? Please chat with our team

What's an active user?

An active user is any user that is registered to approve or respond to agents.

Learning and Auto Approvals

Learning and Auto Approvals allow you to set a threshold for automatically approving or denying requests based on past human interactions.

Escalations and Timeouts

Escalations and Timeouts allow you to coordinate approvals across multiple teams and individuals with escalations and timeouts. Supports Promise.race() and Promise.all() semantics.

Exporting Datasets for Training and Evals

With HumanLayer, you can take the live feedback from your Human SMEs and periodically export it to one or more high-fidelity labeled datasets to power either fine-tuning, evals, or both.

Can't find the answer you're looking for?

Let's chat! - grab some time using one of the links above