Skip to main content

Network Copilot SDK for AI agent development

Project description

NCP SDK

Network Copilot SDK for AI agent development

The NCP SDK enables developers to create and deploy custom agents and tools on the NCP platform with full type safety and development support.

Features

  • 🤖 Agent Development: Create sophisticated AI agents with custom tools
  • 🔧 Type Safety: Full Python type definitions for IDE support
  • 📦 Easy Packaging: Package agents for deployment with one command
  • 🚀 Simple Deployment: Deploy to NCP platform instances
  • 🛠️ CLI Tools: Complete command-line interface for development workflow
  • 🔍 Validation: Comprehensive project and package validation

Quick Start

Installation

pip install git+https://github.com/AvizNetworks/ncp-sdk.git

Create a New Project

# Initialize new project
ncp init my-agent-project
cd my-agent-project

Create Your First Agent

Edit agents/main_agent.py:

from ncp import Agent, tool, ModelConfig

@tool
def get_weather(city: str) -> str:
    """Get current weather for a city."""
    return f"Weather in {city}: Sunny, 22°C"

@tool
def calculate_tip(bill: float, percentage: float = 15.0) -> dict:
    """Calculate tip amount and total."""
    tip = bill * (percentage / 100)
    return {
        "bill": bill,
        "tip": tip, 
        "total": bill + tip,
        "percentage": percentage
    }

# Create your agent
my_agent = Agent(
    name="HelperBot",
    description="A helpful assistant with weather and calculation tools",
    instructions="Help users with weather information and calculations. Be friendly and accurate.",
    tools=[get_weather, calculate_tip],
    llm_config=ModelConfig(
        model="gpt-4-turbo",
        api_key="your-api-key-here"
    )
)

CLI Commands

Project Management

# Create new project
ncp init my-project

Packaging and Deployment

# Package project
ncp package . --output my-project.ncp

# Deploy package
ncp deploy my-project.ncp --platform https://ncp.example.com

Development Workflow

  1. Initialize: ncp init my-project
  2. Setup: ncp setup --dev
  3. Develop: Edit agents and tools
  4. Validate: ncp validate .
  5. Package: ncp package .
  6. Deploy: ncp deploy my-project.ncp

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

ncp_sdk-0.1.0.tar.gz (30.9 kB view details)

Uploaded Source

Built Distribution

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

ncp_sdk-0.1.0-py3-none-any.whl (36.8 kB view details)

Uploaded Python 3

File details

Details for the file ncp_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: ncp_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 30.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for ncp_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 43af0d6c0c128a1dd6c596de3accc4d787abbdc4416bffab561015598766b3d1
MD5 6e1ce03bb7bcd4fcbaeeabc4dcc0eef7
BLAKE2b-256 72106861be1d4ea9649f1cf93f78ac3b29d6ce2214c63e022e7a4ff0cd441198

See more details on using hashes here.

File details

Details for the file ncp_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ncp_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 36.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for ncp_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 abd09e8782b2dbc3abb9461c4cb682742998339f79b43d28e5c8db9bc2353cc3
MD5 c6cdcc54218eab2c1da48b6922d0ce38
BLAKE2b-256 281be8fc032fe6fa7c9538039cfcb94b753d969bd0640de49762ef2f628a5748

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