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에 연결하기
- 스킬 서버를 배포합니다 (예:
https://my-skill.example.com) - AI Teammate Studio에서 에이전트 설정 → 스킬 연동
- 웹훅 URL과 인증 정보를 입력합니다
- 연결 테스트 후 활성화합니다
예제
examples/hello_skill/— 최소 예제 (커스텀)examples/openapi_skill/— OpenAPI spec에서 자동 생성
라이선스
MIT
Metadata
Release files for ai-teammate-skill-sdk 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ai_teammate_skill_sdk-0.1.0.tar.gz | 9.5 kB | Without provenance | Details for ai_teammate_skill_sdk-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ai_teammate_skill_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ai_teammate_skill_sdk-0.1.0-py3-none-any.whl |
Total release size: 21.2 kB
Release files / ai_teammate_skill_sdk-0.1.0.tar.gz
| Download URL | ai_teammate_skill_sdk-0.1.0.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b25de2297c09f878c7f666352a6071159b632ab5ce3a431f757c1079df841cf1
|
|
BLAKE2b-256 checksum How to use checksums |
36423a1fe540d5c9ade9dfe0b213f69c5ecfe1f11c524cca0c7f7035131797db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / ai_teammate_skill_sdk-0.1.0-py3-none-any.whl
| Download URL | ai_teammate_skill_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
557bfbcd1d63bd104c2b1f7937861bbf038be21eac9219b68d307da59a568739
|
|
BLAKE2b-256 checksum How to use checksums |
01d782550e07f89d6018533c4dcc9421a6e7375c59856f306d28639326067751
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for ai-teammate-skill-sdk 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.