Skip to main content

Nexus Gateway Python SDK

Native tool wrappers for CrewAI and LangChain — generate bilingual legal contracts, audited Solidity smart contracts, and Digital Twin v3.1 mapping via a single import.

Install

pip install nexus-gateway-sdk

# Optional framework dependencies:
pip install "nexus-gateway-sdk[crewai]"     # CrewAI tools
pip install "nexus-gateway-sdk[langchain]"  # LangChain tools
pip install "nexus-gateway-sdk[all]"        # Both

Quick Start

CrewAI

from crewai import Agent, Task, Crew
from nexus_gateway import (
    NexusStructuredDataTool,
    NexusCodeModulesTool,
    NexusLegalCodeTool,
    NexusDryRunTool,
    NexusManifestTool,
)

# Free tools (no auth needed)
dry_run = NexusDryRunTool()
manifest = NexusManifestTool()

# Paid tools (free trial available)
structured_data = NexusStructuredDataTool(client_id="my-agent")
code_modules = NexusCodeModulesTool(client_id="my-agent")

# Create agents with Nexus tools
auditor = Agent(
    role="Smart Contract Auditor",
    goal="Audit Solidity contracts for security vulnerabilities",
    backstory="Expert in smart contract security",
    tools=[dry_run, manifest],
)

crew = Crew(agents=[auditor], tasks=[...])
result = crew.kickoff()

LangChain

from langchain.agents import AgentExecutor, create_react_agent
from langchain_openai import ChatOpenAI
from nexus_gateway import create_langchain_tools

tools = create_langchain_tools(client_id="my-agent")
agent = create_react_agent(ChatOpenAI(model="gpt-4"), tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools)

Direct Client

from nexus_gateway import NexusClient

client = NexusClient(client_id="my-agent")
manifest = client.get_manifest()
audit = client.dry_run(source_code="pragma solidity ^0.8.20; contract Token { }")
result = client.structured_data(schema_type="erc20_metadata", name="MyToken", symbol="MTK", decimals=18)

Available Tools

Tool Service Cost Auth
NexusStructuredDataTool structured_data 20 CRED ($0.20) Yes
NexusCodeModulesTool code_modules 120 CRED ($1.20) Yes
NexusLegalCodeTool legal_code 29,900 CRED ($299.00) Yes
NexusDryRunTool dry-run FREE No
NexusManifestTool manifest FREE No

License

MIT

Download files

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

Source Distribution

nexus_gateway_sdk-1.0.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

nexus_gateway_sdk-1.0.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file nexus_gateway_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: nexus_gateway_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.2

File hashes

Hashes for nexus_gateway_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 49b1b78bd3120ed56019b0118169d9955a75401992c59dcb8490fc941453524e
MD5 fafa22a83d9678e9273096ad14f2f2a7
BLAKE2b-256 3469983f84b277cb4d1e717088d55d63dfea2e1b864228e86e0a37eb65f64c24

See more details on using hashes here.

File details

Details for the file nexus_gateway_sdk-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nexus_gateway_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae22584acdb784b554cdde44862d12430dc81ed552084bfa754ac36be29b7a62
MD5 c6059f8a421db72d875a87233bc7eec5
BLAKE2b-256 4f3490635d617c4eb4599ae236f5a2696b99f4e46071382002d76db1bd7b2607

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

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