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(name="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
from dotenv import loaddotenv

loaddotenv()

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 = agent.nw_run_async("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_adk-0.1.5.tar.gz (51.2 kB view details)

Uploaded Source

Built Distribution

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

netweb_adk-0.1.5-py3-none-any.whl (81.0 kB view details)

Uploaded Python 3

File details

Details for the file netweb_adk-0.1.5.tar.gz.

File metadata

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

File hashes

Hashes for netweb_adk-0.1.5.tar.gz
Algorithm Hash digest
SHA256 1c1bf7003012fe203e5feeda0df47c52572eb595d48d09b36c4e547c6e68a39d
MD5 db14a2bf003058d2e0ae85c6b9dca605
BLAKE2b-256 881ec0ae9d881db1c4a950ee0c5ae535ae1ee44cd554e0f3b8214cd930581755

See more details on using hashes here.

File details

Details for the file netweb_adk-0.1.5-py3-none-any.whl.

File metadata

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

File hashes

Hashes for netweb_adk-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4527316573c339303246602c33770d36f032203b5ef264f5da64b0dadfc8ccf3
MD5 d24f80907fee7fe29ce96471c592f9ab
BLAKE2b-256 a0e409c6e40cca8a1c3a4c8bf5ec60d32aacb3a720e34fc210c6cc833b18b730

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