Skip to main content

langchain-verdo

LangChain tools for Verdo: structured team decisions with deadlines, routing and webhooks.

Use it when your agent needs a person to approve, pick or sign off on something, and needs a structured result rather than a discussion. The agent proposes; a person decides. No tool invites people, approves, rejects or settles a decision.

Install

pip install langchain-verdo

Set up

Create a full-access API key in Verdo (Settings > API keys). It starts with vdok_.

export VERDO_API_KEY=vdok_...

Or pass api_key= to the toolkit or to any tool. The key is held as a SecretStr, so it doesn't appear in reprs, logs or traces.

Use

from langchain_verdo import VerdoToolkit

tools = VerdoToolkit().get_tools()

With an agent:

from langchain.agents import create_agent

agent = create_agent(model, tools=tools)  # any tool-calling chat model
agent.invoke({"messages": [("user", "Ask the team whether we ship the new onboarding this sprint.")]})

Or call a tool directly:

import json
from langchain_verdo import CreateDecisionTool, CheckDecisionTool

created = json.loads(CreateDecisionTool().invoke({
    "title": "Ship the redesigned onboarding this sprint?",
    "options": ["Ship it", "One more round of testing", "Descope"],
    "tags": ["engineering"],              # a routing rule on this tag assigns its approver
    "idempotency_key": "onboarding-sprint-47",
    "source_agent": "sprint-planner",
}))
print(created["url"])                     # send this to the person who decides

status = json.loads(CheckDecisionTool().invoke({"id": created["id"]}))
print(status["status"], status["outcome"])

Tools

Tool What it does
verdo_create_decision Proposes a decision. It invites nobody: the decision opens in the Verdo dashboard, and tags can route it to an approver configured in Verdo. With an idempotency_key, a retry returns the same open decision (created: false).
verdo_check_decision Status, outcome once decided, votes per option, owner, dashboard link, request_fingerprint, notification_status, routing_rule_label.
verdo_list_decisions Up to 25 decisions, filtered by title words, status, tags, source_agent or notification status.
verdo_search_decisions Past decided decisions by title words, newest first.
verdo_get_precedent One past decision's record, with related decisions.
verdo_cancel_decision Withdraws a draft or open decision this key created.
verdo_edit_decision Revises a draft or open decision this key created. A change voids the votes cast so far.

Every tool returns a JSON string. Past decisions come back with execution_authorized: false: they're records, not consent to repeat them.

Async is supported (ainvoke).

Errors

A failed call raises VerdoAPIError (a ToolException) with a sentence the agent can act on, such as a rate limit with its retry time or a draft-only key that can't create. Set handle_tool_error=True on a tool to return that sentence to the agent instead of raising it.

Webhooks

Instead of polling verdo_check_decision, you can subscribe a public https URL. Make one subscription per event: decision.settled, decision.rejected, decision.cancelled, decision.expired or decision.escalated.

curl -X POST https://verdo.ink/api/v1/webhooks/subscribe \
  -H "Authorization: Bearer $VERDO_API_KEY" -H "Content-Type: application/json" \
  -d '{"event_type":"decision.settled","url":"https://your-server.example/webhook"}'

The response includes the signing_secret, and it's shown only once. Check every delivery's X-Verdo-Signature (HMAC-SHA256 over the X-Verdo-Timestamp and the body) before you trust it.

Development

pip install -e ".[test]"
pytest tests/ --ignore=tests/integration_tests
VERDO_API_KEY=vdok_... pytest tests/integration_tests   # live; creates and cancels decisions

License

MIT

Metadata

Release files for langchain-verdo 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-verdo 0.1.0
File Size Uploaded Provenance Actions
langchain_verdo-0.1.0.tar.gz 15.0 kB Without provenance Details for langchain_verdo-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-verdo 0.1.0
File Interpreter ABI Platform Actions
langchain_verdo-0.1.0-py3-none-any.whl Python 3 none any Details for langchain_verdo-0.1.0-py3-none-any.whl

Total release size: 31.0 kB

Release files / langchain_verdo-0.1.0.tar.gz

Download URL langchain_verdo-0.1.0.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
24885c1f2822f21b883784292de59d0f1149bbe5c68d49929f3e36e43355caa4
BLAKE2b-256 checksum
How to use checksums
329947eda9dfe6396f6320dab2d299ae9be4eefbc930efcb2b0d074c0c5e69d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / langchain_verdo-0.1.0-py3-none-any.whl

Download URL langchain_verdo-0.1.0-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3083ae8d378e21d1f1d024a4b792b536113c5a0db457ee2aef3b19bbc5abcbd4
BLAKE2b-256 checksum
How to use checksums
3d933b5229f85f6774b26ed647b886120e80bc17570f1d740a858ddec75a6e48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for langchain-verdo 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page