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
- Initialize:
ncp init my-project - Setup:
ncp setup --dev - Develop: Edit agents and tools
- Validate:
ncp validate . - Package:
ncp package . - Deploy:
ncp deploy my-project.ncp
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
ncp_sdk-0.1.0-py3-none-any.whl
(36.8 kB
view details)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43af0d6c0c128a1dd6c596de3accc4d787abbdc4416bffab561015598766b3d1
|
|
| MD5 |
6e1ce03bb7bcd4fcbaeeabc4dcc0eef7
|
|
| BLAKE2b-256 |
72106861be1d4ea9649f1cf93f78ac3b29d6ce2214c63e022e7a4ff0cd441198
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abd09e8782b2dbc3abb9461c4cb682742998339f79b43d28e5c8db9bc2353cc3
|
|
| MD5 |
c6cdcc54218eab2c1da48b6922d0ce38
|
|
| BLAKE2b-256 |
281be8fc032fe6fa7c9538039cfcb94b753d969bd0640de49762ef2f628a5748
|