Skip to main content

Netweb Enterprise Agent Engineering Framework

Project description

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.

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

netweb_sdk-0.1.3.tar.gz (51.1 kB view details)

Uploaded Source

Built Distribution

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

netweb_sdk-0.1.3-py3-none-any.whl (82.6 kB view details)

Uploaded Python 3

File details

Details for the file netweb_sdk-0.1.3.tar.gz.

File metadata

  • Download URL: netweb_sdk-0.1.3.tar.gz
  • Upload date:
  • Size: 51.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for netweb_sdk-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6f5562f96b0aef78802de8cc4560b9efdcc1fd566b7337812c2d8f3e71acb7b5
MD5 7fe8df2047cd208863fe884b306dad5c
BLAKE2b-256 77ec39899b96fc877ca7c4943f12f37d9231d4510cf266eacee7e97c818eac00

See more details on using hashes here.

File details

Details for the file netweb_sdk-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: netweb_sdk-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 82.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for netweb_sdk-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 85a735998d77fb9b7bf2cb772953d04856bf196a90de39338eb3aab70c67f581
MD5 fb0d442c37821837b38f798f4bde0f9d
BLAKE2b-256 1b4011380ad1e0802a3dde66b5ccf1ec1925529cff14b6b45e673ca2da6da7ee

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