Skip to main content

What is Nadoo Plugin SDK?

Nadoo Plugin SDK is the official Python SDK for developing custom plugins for Nadoo AI Platform. It enables you to extend Nadoo’s capabilities by creating reusable tools that can be invoked within AI workflows.

Key Features

Simple API

Decorator-based API for defining tools with minimal boilerplate

Built-in LLM Access

Invoke AI models configured in your workspace

Knowledge Integration

Search and retrieve from knowledge bases

Powerful Debugging

Comprehensive logging, tracing, and variable watching

Core Concepts

Plugin Class

Every plugin inherits from NadooPlugin and defines tools as decorated methods:
from nadoo_plugin import NadooPlugin, tool, parameter

class MyPlugin(NadooPlugin):
    @tool(name="my_tool", description="Does something useful")
    @parameter("input", type="string", required=True)
    def my_tool(self, input: str) -> dict:
        return {"result": input.upper()}

Decorators

Decorators define tool metadata, parameters, validators, and permissions:
  • @tool - Mark method as a tool
  • @parameter - Define tool parameters
  • @validator - Validate parameter values
  • @permission_required - Require permissions
  • @retry - Automatic retry on failure

Plugin Context

Every plugin has access to a rich execution context:
def my_tool(self, input: str) -> dict:
    # Logging
    self.context.info("Processing input...")

    # Tracing
    self.context.trace("data_loaded", {"rows": 100})

    # Variable watching
    self.context.watch_variable("result", result)

    return result

Internal APIs

Plugins can invoke internal Nadoo APIs:
# Invoke LLM
response = self.api.llm.invoke(
    messages=[{"role": "user", "content": "Hello"}]
)

# Search knowledge base
results = self.api.knowledge.search(query="AI")

# Invoke another tool
result = self.api.tools.invoke(tool_id="tool-123", params={})

# Store/retrieve data
self.api.storage.set("key", "value")

Plugin Lifecycle

  1. Initialize: Plugin is instantiated and context is injected
  2. on_initialize: User initialization hook (load config, setup connections)
  3. Tool Discovery: Framework discovers @tool decorated methods
  4. Execution: Tools are invoked as needed
  5. Finalize: on_finalize hook for cleanup
  6. Cleanup: API connections are closed

Development Workflow

1. Create Plugin

nadoo-plugin create my-plugin
cd my-plugin

2. Implement Tools

# main.py
from nadoo_plugin import NadooPlugin, tool, parameter

class MyPlugin(NadooPlugin):
    def on_initialize(self):
        self.api_key = self.require_env("API_KEY")

    @tool(name="process", description="Process data")
    @parameter("data", type="string", required=True)
    def process(self, data: str) -> dict:
        self.context.info(f"Processing: {data}")
        result = self._do_processing(data)
        return {"success": True, "result": result}

3. Test Locally

nadoo-plugin test

4. Build & Install

nadoo-plugin build
nadoo-plugin install

Use Cases

Connect to third-party APIs (Weather, Stocks, News, etc.)
Transform, analyze, or validate data within workflows
Combine LLM calls with custom logic
Enrich AI responses with external knowledge sources
Orchestrate complex operations across multiple tools

Architecture

SDK Components

ComponentPurposeDocumentation
NadooPluginBase class for all pluginsPlugin Class
DecoratorsDefine tools and parametersDecorators
PluginContextExecution contextContext
LLMClientInvoke AI modelsLLM API
ToolsClientCall other toolsTools API
KnowledgeClientSearch knowledge basesKnowledge API
StorageClientPersistent storageStorage API
Testing UtilitiesTest your pluginsTesting

Next Steps