Skip to main content

Skill SDK for AI Teammate - Add custom tools to your AI agents

Project description

AI Teammate Skill SDK

AI Teammate 에이전트에 **커스텀 도구(스킬)**를 추가하기 위한 Python SDK.

외부 API나 커스텀 로직을 스킬 서비스로 패키징하면, AI Teammate 플랫폼이 웹훅으로 호출합니다.

[사용자] → [AI Teammate] → [Skill Server (이 SDK)] → [외부 시스템]

설치

pip install ai-teammate-skill-sdk

빠른 시작

방법 1: 커스텀 코드로 스킬 만들기

# my_skill.py
from ai_teammate_skill import Skill, tool

class LibrarySkill(Skill):
    name = "library"
    description = "도서관 도서 검색 및 대출 관리"

    @tool("search_books", description="도서 검색")
    async def search_books(self, query: str, category: str = "") -> str:
        # 실제 API 호출 로직
        return f"'{query}' 검색 결과: ..."

    @tool("check_availability", description="도서 대출 가능 여부 확인")
    async def check_availability(self, book_id: str) -> str:
        return f"도서 {book_id}: 대출 가능"

LibrarySkill().serve(port=9001)

방법 2: OpenAPI spec에서 자동 생성

from ai_teammate_skill import Skill

skill = Skill.from_openapi("https://api.example.com/openapi.json")
skill.serve(port=9001)

로컬 파일도 지원합니다:

skill = Skill.from_openapi("./my-api-spec.yaml")
skill.serve(port=9001)

CLI 사용법

# 스킬 로드 및 도구 목록 확인
skill test ./my_skill.py

# 제출 요건 검증 (이름, 설명, 타입 힌트 등)
skill validate ./my_skill.py

# 로컬 웹훅 서버 실행
skill serve ./my_skill.py --port 9001

# 인증 토큰 설정
skill serve ./my_skill.py --secret my-secret-token

웹훅 프로토콜

스킬 서버는 두 가지 엔드포인트를 제공합니다:

GET /manifest

스킬 정보와 도구 목록을 반환합니다.

{
  "name": "library",
  "description": "도서관 도서 검색 및 대출 관리",
  "version": "0.1.0",
  "tools": [
    {
      "name": "search_books",
      "description": "도서 검색",
      "parameters": [
        { "name": "query", "type": "string", "required": true },
        { "name": "category", "type": "string", "required": false, "default": "" }
      ]
    }
  ]
}

POST /execute

도구를 실행합니다.

요청:

{
  "tool": "search_books",
  "arguments": { "query": "파이썬", "category": "프로그래밍" },
  "context": { "agent_id": "...", "end_user_id": "..." }
}

응답:

{
  "result": "검색 결과: ...",
  "status": "success"
}

GET /health

서버 상태를 확인합니다.

테스트

코드에서 직접 스킬을 테스트할 수 있습니다:

from ai_teammate_skill import SkillTestClient
from my_skill import LibrarySkill

client = SkillTestClient(LibrarySkill())

# 도구 목록 확인
print(client.list_tools())  # ['search_books', 'check_availability']

# 도구 호출
result = client.call("search_books", query="파이썬")
print(result)

AI Teammate에 연결하기

  1. 스킬 서버를 배포합니다 (예: https://my-skill.example.com)
  2. AI Teammate Studio에서 에이전트 설정 → 스킬 연동
  3. 웹훅 URL과 인증 정보를 입력합니다
  4. 연결 테스트 후 활성화합니다

예제

라이선스

MIT

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

ai_teammate_skill_sdk-0.1.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

ai_teammate_skill_sdk-0.1.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ai_teammate_skill_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b25de2297c09f878c7f666352a6071159b632ab5ce3a431f757c1079df841cf1
MD5 1e4cfef24309554bf195b7a17b2dbc10
BLAKE2b-256 36423a1fe540d5c9ade9dfe0b213f69c5ecfe1f11c524cca0c7f7035131797db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ai_teammate_skill_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 557bfbcd1d63bd104c2b1f7937861bbf038be21eac9219b68d307da59a568739
MD5 9b960d9df9897986cc807ad1769ae357
BLAKE2b-256 01d782550e07f89d6018533c4dcc9421a6e7375c59856f306d28639326067751

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