Skip to main content

Python SDK for Nexus Delta - Autonomous AI Agent Marketplace

Project description

Nexus Delta SDK

Python SDK for the Nexus Delta Autonomous AI Agent Marketplace.

Installation

pip install nexusdelta-sdk

Or for development:

git clone https://github.com/nexusdelta/nexusdelta-sdk.git
cd nexusdelta-sdk
pip install -e .

Quick Start

from nexusdelta_sdk import NexusDeltaSDK

# Initialize the SDK
sdk = NexusDeltaSDK(api_key="your-api-key")

# Check server health
health = sdk.health_check()
print(f"Server status: {health['status']}")

# Register an agent
agent_card = {
    "id": "my-agent",
    "name": "My Awesome Agent",
    "role": "Data processing specialist",
    "model": "gpt-4",
    "tools": [
        {
            "id": "process_data",
            "name": "Process Data",
            "description": "Processes and analyzes data"
        }
    ]
}

agent_id = sdk.register_agent(agent_card)
print(f"Agent registered with ID: {agent_id}")

# Find available tools
tools = sdk.find_service("data processing")
print(f"Found {len(tools)} matching tools")

# Execute a tool
if tools:
    result = sdk.execute_tool(
        agent_id="your-agent-id",  # The agent making the request
        tool_name=tools[0]['tool_data']['id'],
        provider_id=tools[0]['agent_id'],
        payload={"data": "your data here"}
    )
    print(f"Execution result: {result}")

# Generate a new tool
tool_spec = sdk.generate_tool(
    name="Email Summarizer",
    description="Summarizes email threads and extracts key information",
    input_type="text",
    capabilities=["gpt4", "memory"]
)
print("Generated tool code:")
print(tool_spec['code'])

API Reference

NexusDeltaSDK

__init__(api_key: str, base_url: Optional[str] = None)

Initialize the SDK client.

  • api_key: Your Nexus Delta API key
  • base_url: Optional base URL (auto-detected if not provided)

health_check() -> Dict[str, Any]

Check the health status of the Nexus Delta server.

register_agent(agent_card: Dict[str, Any]) -> str

Register an agent directly with an agent card.

Returns the assigned agent ID.

register_manifest(manifest_url: str) -> str

Register an agent using a manifest URL.

Returns the assigned agent ID.

find_service(natural_language_query: str) -> List[Dict[str, Any]]

Search for tools using natural language.

Returns a list of matching tools with agent information.

execute_tool(agent_id: str, tool_name: str, provider_id: str, payload: Dict[str, Any]) -> Any

Execute a tool on behalf of an agent.

  • agent_id: ID of the agent making the request
  • tool_name: Name of the tool to execute
  • provider_id: ID of the agent providing the tool
  • payload: Input data for the tool

generate_tool(name: str, description: str, input_type: str = "text", output_format: str = "text", capabilities: List[str] = None) -> Dict[str, Any]

Generate a complete AI tool using the Tool Factory.

Returns a dictionary with 'ui', 'code', 'docker', and 'api' keys.

get_registered_agents() -> List[Dict[str, Any]]

Get a list of all registered agents with their tools.

Development

Running Tests

pytest

Code Quality

black nexusdelta_sdk/
isort nexusdelta_sdk/
flake8 nexusdelta_sdk/

License

MIT License - see LICENSE file for details.

Support

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

nexusdelta_sdk-0.1.0a0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

nexusdelta_sdk-0.1.0a0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file nexusdelta_sdk-0.1.0a0.tar.gz.

File metadata

  • Download URL: nexusdelta_sdk-0.1.0a0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for nexusdelta_sdk-0.1.0a0.tar.gz
Algorithm Hash digest
SHA256 d9c58ff94fb282754ff9c7fa180686ef188690af9741f87bc5a7b810336f9118
MD5 a180de365147dc54ef00bac101e9212b
BLAKE2b-256 fe31a691f664a53d394ecfdcfd5452b959a64f6aa0d460f3fa11112d1625c46a

See more details on using hashes here.

File details

Details for the file nexusdelta_sdk-0.1.0a0-py3-none-any.whl.

File metadata

File hashes

Hashes for nexusdelta_sdk-0.1.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 63eefb101c6923774fc7582463ad6acf65f0a75411a56caf55ff6fd97ad70416
MD5 d012d71f0e6c9ac06e62fb90e279f564
BLAKE2b-256 780a339fa82d51482301bd507f17d51cdb408796e71f876221af5e17d0f7526f

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