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 ncp_sdk

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

@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]
)

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. Develop: Edit agents and tools
  3. Validate: ncp validate .
  4. Package: ncp package .
  5. 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.1.tar.gz (36.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.1-py3-none-any.whl (44.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ncp_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 36.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.1.tar.gz
Algorithm Hash digest
SHA256 e13a2145a9b8df29b005568328a23c8fd32271ffdd033e972245e54c7b1ba23f
MD5 b58cc45a539736eb54cbb3016f14ea3b
BLAKE2b-256 ca399af2c82871fa5977dc085153d8aa49e3ccbba32f952aea64eac89ef6d1e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ncp_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 44.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c244741b258ede4ed47d52ec476e66232f909501a163447d1d4601e4148c70d3
MD5 eab6886aa6be57a2cb675d8feecb42a7
BLAKE2b-256 83d11ce8a9bfe2b88c8c8cd32910acf53b342c8ae83a8f41022c66a6eec05b6f

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