DEV Community

Kyonis
Kyonis

Posted on

Build a KYC Agent with LangChain + Kyonis in 50 Lines of Python

Banks spend $270B/year on compliance. 95%+ of sanctions screening results are false positives. And most compliance APIs aren't designed for AI agents.

We built Kyonis to fix this — an agent-native KYC/AML API with sanctions screening in <500ms, full explainability, and a free tier.

Here's how to build a compliance agent in 50 lines of Python.

Install

pip install kyonis langchain-anthropic

Get your free API key (500 verifications/month): app.kyonis.com/register

The Agent

from langchain_anthropic import ChatAnthropic
from kyonis.langchain_tool import get_kyonis_tools
from langchain.agents import initialize_agent, AgentType

llm = ChatAnthropic(model="claude-sonnet-4-20250514")
tools = get_kyonis_tools(api_key="sk_sandbox_...")

agent = initialize_agent(tools, llm, agent=AgentType.OPENAI_FUNCTIONS)

result = agent.run(
"Screen these people against sanctions lists: "
"1. Jean Dupont (France) "
"2. Mohammed Al-Rashid (Iraq) "
"Give me the risk level for each."
)
print(result)

What Happens Under the Hood

  1. LangChain agent receives the request
  2. Agent calls kyonis_aml_screen for each person
  3. Kyonis screens against OFAC, EU, UN, HMT sanctions (<500ms)
  4. Each result includes a reasoning field explaining the decision
  5. Agent compiles a human-readable summary

The Response

Every Kyonis response includes explainability:

{
"match": true,
"score": 0.92,
"reasoning": "Matched against OFAC SDN entry using fuzzy matching (Jaro-Winkler: 0.92). Country match confirmed.",
"sources": ["OFAC", "EU_SANCTIONS"],
"latency_ms": 417
}

Why Agent-Native Matters

Traditional compliance APIs return raw data. Kyonis returns reasoned decisions that AI agents can act on directly:

  • reasoning field → agent understands why
  • Structured scores → agent can make decisions
  • MCP server → Claude discovers Kyonis automatically

Try It

  • Free tier: 500 verifications/month
  • No credit card required
  • MCP server for Claude Desktop
  • SDK for Python & TypeScript

👉 kyonis.com
👉 GitHub
👉 API Docs

Top comments (0)