Files
humanlayer/examples
2025-06-17 08:12:26 -07:00
..
2025-06-03 13:30:15 -07:00
2025-06-03 13:30:15 -07:00
2025-06-03 13:30:15 -07:00
2025-06-03 13:30:15 -07:00
2025-06-04 15:54:32 -05:00
2025-06-03 13:30:15 -07:00
2025-06-03 13:30:15 -07:00
2025-06-03 13:30:15 -07:00
2025-06-03 13:30:15 -07:00
2025-06-03 13:30:15 -07:00
2025-06-03 13:30:15 -07:00
2025-06-02 14:52:05 -07:00
2025-06-03 13:30:15 -07:00
2025-06-03 13:30:15 -07:00
2025-06-03 13:30:15 -07:00
2025-06-03 13:30:15 -07:00
2025-06-03 13:30:15 -07:00
2025-06-04 15:54:32 -05:00
2025-05-29 08:54:45 -07:00
2025-06-03 13:30:15 -07:00
2025-01-05 01:51:44 -08:00

Humanlayer Cookbooks and Examples

Basics and hello-world-y things

The most basic examples are:

  • openai_client - basic example of HumanLayer using raw OpenAI client and function calling.
  • langchain - basic langchain examples, includes the most complete set of examples including human as tool and email channel features
  • controlflow - basic controlflow example
  • crewai - basic crewai example
  • fastapi - basic fastapi server showcasing AsyncHumanLayer for asyncio apps
  • curl - interact with the HumanLayer API using curl

More advanced examples

These examples include more end-to-end API examples, using webservers like flask and fastapi, and using some more advanced state management techniques.

  • openai_client/03-imperative_fetch.py - showing how you can use lower-level SDK methods to interact with the HumanLayer API.
  • fastapi-webhooks - fastapi server that leverage humanlayer webhooks (e.g. with ngrok locally) to fire-and-forget function calls, and handle human approval events as they are received
  • fastapi-email - two end-to-end examples of a workflow designed to be initiated via email, where approvals and requests from the agents are sent as replies on the same email thread. Includes two versions:
    • one where the fastapi server manages state
    • one where the fastapi server leverages the HumanLayer state management to manage state

TypeScript examples

  • ts_openai_client - basic example of HumanLayer using raw OpenAI client and function calling
  • ts_vercel_ai_sdk - example showcasing HumanLayer + Vercel AI SDK
  • ts_langchain - basic example of HumanLayer using LangchainJS
  • ts_email_classifier - basic example of various classification/labeling workflows, using an llm to label emails and then providing sync or async mechanisms for human input on classifications

Other LLMs

Other Frameworks

  • chainlit is a python-only ui framework for building chat apps
  • griptape is an agent orchestration and workflow framework
  • flask - basic flask server showcasing HumanLayer for sync apps