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, workflows, and LLM providers.

  • Custom tool integration with @nw_tool decorator
  • Composable agents via create_agent
  • Structured tool execution with JSON tool calls
  • Built-in providers for OpenAI, Anthropic, Google, and open-source models
  • Workflow orchestration for multi-agent and handoff patterns

Why Netweb SDK

Netweb SDK is designed for production AI applications that need:

  • deterministic tool invocation from generated outputs
  • reusable agent components and prompt configuration
  • enterprise workflows for multi-step tasks
  • provider-agnostic architecture for LLM integration

Installation

Install from PyPI:

pip install netweb-sdk

Or install from source:

pip install .

Quick Start

1. Define a custom tool

Use @nw_tool to expose an async Python function as a structured tool that agents can call.

from sdk import nw_tool

@nw_tool("add", description="Add two integers together")
async def add(a: int, b: int) -> int:
    return a + b

2. Create an agent

Use create_agent to instantiate an agent with a role, goal, LLM provider, and tool set.

from sdk import create_agent, nw_tool, OpenAIProvider

@nw_tool("add", description="Add two integers together")
async def add(a: int, b: int) -> int:
    return a + b

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

agent = create_agent(
    name="calculator_agent",
    role="calculator",
    goal="perform accurate arithmetic using available tools",
    llm=llm,
    tools=[add],
    extra_instructions="You are a precise calculator. Use the add tool for addition operations."
)

3. Run the agent

response = await agent.nw_run("Add 5 and 3 together")
print(response.output)

Output:

8

API Overview

nw_tool

nw_tool registers a function as a structured LangChain tool and wraps it for SDK execution.

  • name: tool identifier
  • description: user-facing tool description
  • accepts async callables
  • exposes execute(**kwargs) and schema()

Example:

from sdk import nw_tool

@nw_tool("summarize", description="Summarize text into concise bullet points")
async def summarize(text: str) -> str:
    return "..."

create_agent

Creates an SDK agent instance with tools, system prompts, and memory.

from sdk import create_agent, OpenAIProvider

agent = create_agent(
    name="research_agent",
    role="technical researcher",
    goal="produce high-quality technical research articles",
    llm=OpenAIProvider(model="gpt-4o-mini"),
    tools=[add],
    extra_instructions="Always return valid JSON when invoking tools."
)

agent.nw_run(input)

Executes the agent on a user prompt and returns a structured AgentResponse.

response = await agent.nw_run("Calculate 12 + 34")
print(response.output)

Advanced Use

Combining tools and memory

The SDK supports conversation memory and tool pipelines so agents can remember context and execute tool calls consistently.

Workflow orchestration

For advanced multi-agent workflows, use WorkflowBuilder, SupervisorWorkflow, and HandoffWorkflow from the SDK.

Publishing to PyPI

Ensure the package metadata is up to date in pyproject.toml and README.md is present.

Build and upload:

python -m pip install --upgrade build twine
python -m build
python -m twine upload dist/*

Notes

  • Set your LLM provider credentials using environment variables for OpenAI, Anthropic, or Google before running agents.
  • The package is built for Python 3.12 and above.
  • Use structured JSON tool outputs to keep LLM tool calls reliable.

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.1.tar.gz (47.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.1-py3-none-any.whl (74.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: netweb_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 47.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.1.tar.gz
Algorithm Hash digest
SHA256 70f9983f9cee172e486a918e7e43c637051d7a540f958c992bd0732ad9ca7ee1
MD5 6cf81dacefc35a2aeb9ddfa745afdd5b
BLAKE2b-256 025e3a4da31e98b02b0ba1c5de072172aa1d347247b9b69d1e64a56aec082e2d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: netweb_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 74.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d8f9f29942d3b0206ae6496477a98ccaee3ec13f3e3a0672e724640db728c26e
MD5 3d0cdc4f2976c876500cbc7ab47d40c0
BLAKE2b-256 4398ef7501b50b4c4ef8dd614746a8c53df6101b3524d0ef11235c87e9fcbe0b

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