Skip to main content

Bidda Compliance Intelligence SDK — LangChain, AutoGen, CrewAI integration

Project description

bidda-shield

Verified compliance intelligence for AI agents. Stop your LangChain, AutoGen, and CrewAI agents from hallucinating legal requirements.

pip install bidda-shield

The problem

AI agents making decisions about hiring, credit scoring, data processing, or content moderation are operating under dozens of overlapping regulations — GDPR, EU AI Act, HIPAA, CCPA, Basel III. When an agent gets the legal logic wrong, it isn't just a bug. It's a regulatory liability event.

LLMs hallucinate regulations. bidda-shield doesn't.

Every compliance node in the Bidda registry traces to a specific clause of a primary legal instrument, verified against the source URL, and drift-checked weekly. No inference. No approximation.


Quickstart

from bidda_shield import BiddaShield

shield = BiddaShield()

# Find the compliance node most relevant to your agent's action
result = shield.check_compliance("process biometric data for access control")
print(result["title"])   # EU AI Act Article 5 — Prohibited AI Practices
print(result["bluf"])    # Plain-English summary of the legal obligation

LangChain

from langchain.agents import initialize_agent, AgentType
from langchain_openai import ChatOpenAI
from bidda_shield import BiddaLangChainTool

llm  = ChatOpenAI(model="gpt-4o")
tool = BiddaLangChainTool()

agent = initialize_agent(
    tools=[tool],
    llm=llm,
    agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
    verbose=True,
)

agent.run(
    "My agent is about to make an automated credit decision. "
    "What regulations apply and what do they require?"
)

The tool returns the regulation title, domain, plain-English summary (BLUF), and a link to the full verified node — for $0.01 USDC per full unlock.


AutoGen

import autogen
from bidda_shield import BiddaAutoGenTool

config_list = [{"model": "gpt-4o", "api_key": "YOUR_OPENAI_KEY"}]

bidda_tool = BiddaAutoGenTool()

assistant = autogen.AssistantAgent(
    name="compliance_assistant",
    llm_config={
        "config_list": config_list,
        "functions": [bidda_tool.function_schema],
    },
)

user_proxy = autogen.UserProxyAgent(
    name="user",
    human_input_mode="NEVER",
    function_map={"bidda_compliance_lookup": bidda_tool.execute},
)

user_proxy.initiate_chat(
    assistant,
    message="What does GDPR Article 22 require for automated decision-making?",
)

CrewAI

from crewai import Agent, Task, Crew
from bidda_shield import BiddaCrewAITool

compliance_tool = BiddaCrewAITool()

compliance_officer = Agent(
    role="Chief Compliance Officer",
    goal="Ensure all AI agent actions comply with applicable regulations",
    backstory="Expert in GDPR, EU AI Act, HIPAA, and global data protection law.",
    tools=[compliance_tool],
    verbose=True,
)

task = Task(
    description="Review the agent action 'train a model on employee performance data' and identify all applicable regulations.",
    agent=compliance_officer,
)

crew = Crew(agents=[compliance_officer], tasks=[task])
crew.kickoff()

Direct API usage

from bidda_shield import BiddaShield

shield = BiddaShield()

# Search by keyword
nodes = shield.search_nodes("automated decision making")
for n in nodes:
    print(n["node_id"], "—", n["title"])

# Get a specific node (free discovery tier)
node = shield.get_node("gdpr-article-22-automated-decisions")
print(node["bluf"])

# Get full vault data (requires Skyfire JWT or USDC payment — $0.01)
shield_paid = BiddaShield(skyfire_token="YOUR_SKYFIRE_JWT")
full_node = shield_paid.get_node("gdpr-article-22-automated-decisions", vault=True)
print(full_node["deterministic_workflow"])  # Step-by-step legal compliance logic

What's in a full node

Each vault-tier node contains:

  • BLUF — plain-English summary of the legal obligation
  • deterministic_workflow — step-by-step compliance checklist derived from the primary legal text
  • actionable_schema — machine-readable compliance checkpoints
  • primary_citations — exact section references to the legal instrument
  • crosswalks — mappings to NIST, ISO, and peer standards
  • dependencies — other regulations this one depends on or triggers
  • verification — source URL, jurisdiction, instrument type, integrity hash

All content traces to a real primary legal source. No secondary commentary. No paraphrasing.


Payment

  • Discovery tier (free): node ID, title, domain, plain-English summary
  • Vault tier ($0.01 USDC per node): full deterministic logic, citations, crosswalks, workflow

Pay with:

  • Skyfire — pass a skyfire-pay-id bearer token (agent-native, no wallet required)
  • L402 / Base USDC — send $0.01 to the Bidda Base wallet, pass the tx hash
# With Skyfire
shield = BiddaShield(skyfire_token=os.getenv("BIDDA_SKYFIRE_TOKEN"))

# With Base tx hash
shield = BiddaShield(base_tx_hash="0xYOUR_TRANSACTION_HASH")

Install options

# Core (no framework dependencies)
pip install bidda-shield

# With LangChain
pip install "bidda-shield[langchain]"

# With AutoGen
pip install "bidda-shield[autogen]"

# With CrewAI
pip install "bidda-shield[crewai]"

# Everything
pip install "bidda-shield[all]"

Registry coverage

  • 4,600+ verified nodes across 31 regulatory pillars
  • Pillars: AI Governance, Cybersecurity, Banking & Finance, Healthcare, Legal & IP, ESG, Workplace, Aviation & Defense, Crypto, Cloud, and 21 more
  • Jurisdictions: EU, US, UK, Germany, Australia, Singapore, South Africa, and global instruments
  • Sources: EU AI Act, GDPR, NIST CSF, ISO 27001, Basel III/IV, HIPAA, DORA, NIS2, FATF, and 150+ authority bodies

Full registry: bidda.com/intelligence


Links


License

MIT — use freely, attribution appreciated.

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

bidda_shield-0.1.0.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

bidda_shield-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bidda_shield-0.1.0.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for bidda_shield-0.1.0.tar.gz
Algorithm Hash digest
SHA256 647e6a5661d53b7e3b74a5e1a45fec6a2a8f1ea0846ca0f0b2d0894a49b87d29
MD5 984b8f3f8ee868466422ad485e037f21
BLAKE2b-256 9a02636072e03ea98864d660b93d7da35ea2a86f9d579a18546a5a0dc9e05105

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bidda_shield-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for bidda_shield-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa51420f93dda479545186fd9231177e05bfdada76ad0d237f1020230cba7ee3
MD5 1a4c53352249645ffdc01cd536802665
BLAKE2b-256 abfe9fb5861ff3dc28eca3a75e122f9fbd786215b8cca78621dbf053b69ae662

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