Skip to main content

Human-in-the-loop review as agent tools for LangChain, CrewAI, LlamaIndex, and AutoGen.

Project description

verifiedworkflows-langchain

Human-in-the-loop review as agent tools for LangChain, CrewAI, LlamaIndex, and AutoGen.

Install

pip install verifiedworkflows-langchain

Quick start

import os
os.environ["VW_API_KEY"] = "vw_live_xxx"

from verifiedworkflows_langchain import get_tools
from langchain.agents import create_agent
from langchain_openai import ChatOpenAI

model = ChatOpenAI(model="gpt-4o")
tools = get_tools()

agent = create_agent(model, tools=tools)

# The agent can now submit AI output for human review
# before sending it to users
response = agent.invoke({
    "messages": [{"role": "user", "content": "Write a patient summary, then review it"}]
})

Tools

Tool Description
submit_for_review Submit AI output for certified human review
get_review_status Check task status (pending, in_review, completed)
get_review_result Get verified result with corrections and HMAC signature

Direct client (without LangChain)

from verifiedworkflows_langchain import VerifiedWorkflows

vw = VerifiedWorkflows(api_key="vw_live_xxx")
task = vw.submit(content="AI output here", review_type="medical")
result = vw.result(task["id"])  # blocks until completed

Works with

  • LangChain / LangGraph@tool decorator
  • CrewAI — pass tools to agent
  • LlamaIndexFunctionTool.from_defaults
  • AutoGen — pass as function tools

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

verifiedworkflows_langchain-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

verifiedworkflows_langchain-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file verifiedworkflows_langchain-0.1.0.tar.gz.

File metadata

File hashes

Hashes for verifiedworkflows_langchain-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fd5f024fc4ab6f1df031a5834d7b768c1f262657825dbc5176555d0a215fb0e3
MD5 4d9cc2352a3256841f50b4db9463849c
BLAKE2b-256 ffc689ea935a4b0a4575b6d58f39b932f634035e73526b3e75fe5a166bf3a5af

See more details on using hashes here.

File details

Details for the file verifiedworkflows_langchain-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for verifiedworkflows_langchain-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cd7885fd2afda4ce5572eed1b09d34dbbbb857f52b70f11546ff5d5acded30e
MD5 d26c7e77cd52161855e74305ec0093ba
BLAKE2b-256 12e308346ef16400f3af18d54338819115a7e4fc3b5561e03d2a899efe13ac41

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page