Skip to main content

Netweb SDK

Netweb SDK is an enterprise-grade agent engineering framework for building, orchestrating, and deploying AI assistants with custom tools and multiple LLM providers.

Key capabilities:

  • Custom tool integration with the @nw_tool decorator
  • Composable agents via create_agent
  • Deterministic, structured tool invocation (JSON/structured calls)
  • Multiple built-in provider adapters (OpenAI, Anthropic, Google, open-source)
  • Pluggable memory stores (ConversationMemory, VectorMemory, PersistentMemory)
  • Tracing integration (LangSmith-compatible) via enable_tracing

Why use Netweb SDK

Netweb SDK is intended for production AI applications that require:

  • Reliable tool invocation from generated outputs
  • Reusable agent components and configurable system prompts
  • Provider-agnostic integrations for deploying across clouds and local runtimes

Installation

Install from PyPI:

pip install netweb-sdk

Or install from source:

pip install .

Quick Start

The SDK exports common helpers from sdk (see sdk/__init__.py): create_agent, get_tool, get_tools, list_tools, nw_tool, provider classes, memory helpers, and tracing utilities.

  1. Define a custom tool with @nw_tool:
from sdk import nw_tool

@nw_tool("add", description="Add two integers together")
def add(a: int, b: int) -> int:
    return a + b
  1. Create an agent. Note: current create_agent signature accepts name, role, llm, tools, memory (bool or instance), input_schema, output_schema, prompt_path, system_prompt, retries, and retry_delay.
from sdk import create_agent, OpenAIProvider

llm = OpenAIProvider(model="gpt-4o-mini")

agent = create_agent(
    name="calculator_agent",
    role="calculator",
    llm=llm,
    tools=[add],
    system_prompt="You are a precise calculator. Use the add tool for addition operations.",
    memory=True,
)
  1. Run the agent (sync or streamed):
resp = await agent.nw_run("Add 5 and 3 together")
print(resp.output)

# Streamed
async for chunk in agent.nw_run_streamed("Tell me a short joke"):
    print(chunk, end="", flush=True)

Providers

The SDK includes adapters for multiple LLM providers. Examples exported from sdk:

  • OpenAIProvider
  • AnthropicProvider
  • GoogleProvider
  • OpenSourceProvider (HuggingFace, Ollama, local runtimes)

Provider classes wrap the API surface for sync/async generation and streaming and are pluggable when creating agents.

Memory

Memory implementations available in the SDK:

  • ConversationMemory: in-memory conversation history
  • VectorMemory: vector-store backed memory for retrieval-augmented generation
  • PersistentMemory: durable stores (e.g., redis/postgres checkpointers supported in runtime)

Pass memory=True to create_agent to enable default conversation memory (a ConversationMemory instance).

Tools API

Tool utilities exported from sdk:

  • nw_tool: decorator for registering tools
  • get_tools(names: list[str]): fetch tool instances by name
  • get_tool(name: str): fetch a single tool
  • list_tools(): list available tool metadata

Tools are executed by the agent via ToolRunner and are registered in the ToolRegistry on agent creation.

Tracing

Enable LangSmith-compatible tracing using:

from sdk.tracing import enable_tracing
enable_tracing(project_name="my_project")

Tracing hooks into execution to capture runs, tool calls, and metadata.

Prompts and Templates

Prompts are managed via abstractions.agents.prompts with utilities for loading prompt files, templating, and prompt composition. You can pass prompt_path to create_agent to use a custom prompt file, or provide system_prompt directly.

Metadata

Release files for netweb-sdk 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netweb-sdk 0.1.3
File Size Uploaded
netweb_sdk-0.1.3.tar.gz 51.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for netweb-sdk 0.1.3
File Interpreter ABI Platform
netweb_sdk-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 133.7 kB

Release files / netweb_sdk-0.1.3.tar.gz

Download URL netweb_sdk-0.1.3.tar.gz
Size 51.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6f5562f96b0aef78802de8cc4560b9efdcc1fd566b7337812c2d8f3e71acb7b5
BLAKE2b-256 checksum
How to use checksums
77ec39899b96fc877ca7c4943f12f37d9231d4510cf266eacee7e97c818eac00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Release files / netweb_sdk-0.1.3-py3-none-any.whl

Download URL netweb_sdk-0.1.3-py3-none-any.whl
Size 82.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85a735998d77fb9b7bf2cb772953d04856bf196a90de39338eb3aab70c67f581
BLAKE2b-256 checksum
How to use checksums
1b4011380ad1e0802a3dde66b5ccf1ec1925529cff14b6b45e673ca2da6da7ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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