Skip to main content

Overview

The Client class is the main entry point for all interactions with the Noxus AI platform. It handles authentication, request management, and provides access to all SDK resources including workflows, conversations, knowledge bases, and agents.

Basic Initialization

The simplest way to create a client:

Configuration Options

The client supports several configuration options for different use cases:
string
required
Your Noxus API key for authentication
string
default:"https://backend.noxus.ai"
The base URL of the Noxus backend. Can also be set via NOXUS_BACKEND_URL environment variable
boolean
default:"true"
Whether to automatically load available workflow node types on initialization
boolean
default:"true"
Whether to load user information and check admin permissions
dict
default:"None"
Additional HTTP headers to include with all requests

Environment Variables

The client respects these environment variables:
Override the default backend URL
Set your API key (though passing it directly is recommended)

Resource Access

The client provides access to all Noxus resources through dedicated services:

Workflows

client.workflows - Create and manage AI workflows

Conversations

client.conversations - Handle chat interactions

Knowledge Bases

client.knowledge_bases - Manage document repositories

Agents

client.agents - Deploy autonomous AI agents

Runs

client.runs - Monitor workflow executions

Admin

client.admin - Administrative functions

Platform Information Methods

The client provides methods to retrieve platform capabilities:

Asynchronous Versions

All platform information methods have async counterparts:

Error Handling

The client handles various types of errors that can occur during API interactions:

Best Practices

Never hardcode API keys in your source code:
Create one client instance and reuse it throughout your application:
Always implement proper error handling:
Be mindful of resource usage with large datasets:

Advanced Configuration

Custom HTTP Client

For advanced use cases, you can customize the underlying HTTP client:

Logging Configuration

Enable detailed logging for debugging:

Testing with the Client

When writing tests, consider using dependency injection:

Next Steps

Authentication

Learn about API key management and security

Async Operations

Understand asynchronous programming with the SDK

Workflows

Start building AI workflows

API Reference

Explore the complete client API