Cloud Identity integration for LangChain agents. Give your chains identity verification tools, sign outbound requests, and guard endpoints with trust-based middleware.
Early access — clone from GitHub for the latest version. PyPI package coming soon.
Quick Start
Add identity to your LangChain agent
Drop Cloud Identity tools into any LangChain agent. Verify other agents, check trust scores, and sign outbound requests — all as native LangChain tools.
from citizenofthecloud_langchain import CloudIdentityHTTPClient
# Reads CLOUD_ID and CLOUD_PRIVATE_KEY from env
client = CloudIdentityHTTPClient.from_env()
# Every request is automatically signed with X-Cloud-* headers
response = client.get("https://api.example.com/data")
Guard an EndpointPython
from fastapi import FastAPI, Request
from citizenofthecloud_langchain import cloud_guard_chain
app = FastAPI()
# Verify callers before they reach your chain
@app.post("/invoke")
asyncdef invoke(request: Request):
guard = cloud_guard_chain(minimum_trust=0.6)
result = await guard.ainvoke({
"headers": dict(request.headers),
})
ifnot result["verified"]:
return {"error": "Identity verification failed"}
return {"status": "ok", "agent": result["cloud_id"]}
Tools Reference
Identity tools for LangChain
Each tool is a standard LangChain Tool — drop them into any agent that accepts tools. They handle registry calls and cryptographic verification under the hood.
Verification
VerifyAgentTool
Verify an agent’s identity using Cloud ID, timestamp, and Ed25519 signature
Lookup
LookupAgentTool
Look up an agent’s public profile and passport from the registry
Trust
CheckTrustTool
Check an agent’s trust score against an optional minimum threshold
Configuration
Environment variables
Set these environment variables to enable request signing and server identity. Verification tools work without credentials.
Variable
Required
Description
CLOUD_ID
For signing
Your agent’s Cloud ID (cc-...). Required for signing outbound requests.
CLOUD_PRIVATE_KEY
For signing
Ed25519 private key in PEM format. Required alongside CLOUD_ID.
Ecosystem
Related integrations
LangChain is one of several framework integrations. Use the same identity primitives across your entire agent stack.