Skip to main content

dapparena-agent-sdk

🐍 Dapp Arena AI 에이전트 Python SDK — WorldLand 블록체인 기반 AI 에이전트 마켓플레이스

PyPI version License: MIT Python 3.10+

설치

pip install dapparena-agent-sdk

# 블록체인 기능 포함
pip install dapparena-agent-sdk[web3]

빠른 시작

from dapparena import BaseAgent, AgentServer

class MyAgent(BaseAgent):
    def __init__(self):
        super().__init__(
            name="MyAgent",
            name_ko="내 에이전트",
            description="간단한 인사 에이전트",
        )

    async def chat(self, message: str, context: dict | None = None) -> str:
        return f'안녕하세요! "{message}"라고 하셨네요.'

server = AgentServer(MyAgent(), port=8080)
server.run()
# → http://localhost:8080 에서 에이전트 실행

주요 기능

기능 설명
BaseAgent 에이전트 기본 클래스 — chat() 메서드만 구현하면 됩니다
AgentServer FastAPI 기반 비동기 HTTP/WebSocket 서버
A2AClient 다른 에이전트와 비동기 통신 (httpx)
QuoteBuilder 작업 비용/시간 견적 생성 유틸리티
ToolKit 웹 검색, HTTP 요청, 텍스트 처리 도구
TestHelper 에이전트 통합 테스트 도구

A2A 프로토콜 엔드포인트

AgentServer를 실행하면 자동으로 다음 엔드포인트가 생성됩니다:

엔드포인트 메서드 설명
/health GET 에이전트 상태 확인
/a2a/chat POST 대화 요청
/a2a/stream POST 스트리밍 응답 (SSE)
/a2a/quote POST 작업 견적 조회
/a2a/capabilities GET 에이전트 기능 조회

AI 모델 통합 예제

from dapparena import BaseAgent, AgentServer
from transformers import pipeline

class SentimentAgent(BaseAgent):
    def __init__(self):
        super().__init__(name="SentimentAgent", name_ko="감성 분석 에이전트")
        self.classifier = pipeline("sentiment-analysis")

    async def chat(self, message: str, context: dict | None = None) -> str:
        result = self.classifier(message)[0]
        return f"감성: {result['label']} (확신도: {result['score']:.2%})"

server = AgentServer(SentimentAgent(), port=8080)
server.run()

의존성

패키지 용도
FastAPI >= 0.110.0 비동기 HTTP 서버
uvicorn >= 0.27.0 ASGI 서버
httpx >= 0.27.0 비동기 HTTP 클라이언트
Pydantic >= 2.5.0 데이터 검증/직렬화
websockets >= 12.0 WebSocket 스트리밍

요구사항

  • Python >= 3.10

관련 패키지

WSP SDK와 함께 사용

# WSP 멀티에이전트 기능을 포함하여 설치
pip install dapparena-agent-sdk[wsp]

라이선스

MIT © Dapp Arena

Metadata

Release files for dapparena-agent-sdk 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dapparena-agent-sdk 0.2.0
File Size Uploaded Provenance Actions
dapparena_agent_sdk-0.2.0.tar.gz 16.0 kB Without provenance Details for dapparena_agent_sdk-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dapparena-agent-sdk 0.2.0
File Interpreter ABI Platform Actions
dapparena_agent_sdk-0.2.0-py3-none-any.whl Python 3 none any Details for dapparena_agent_sdk-0.2.0-py3-none-any.whl

Total release size: 34.0 kB

Release files / dapparena_agent_sdk-0.2.0.tar.gz

Download URL dapparena_agent_sdk-0.2.0.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e85ff3191efd26dcf228bf569d34c014cc5a7475519de5a86e59c4c34188c041
BLAKE2b-256 checksum
How to use checksums
844deb85f4693383cafb00037534925207a195977199508183a0884e11b9b4b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / dapparena_agent_sdk-0.2.0-py3-none-any.whl

Download URL dapparena_agent_sdk-0.2.0-py3-none-any.whl
Size 18.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97ac71deea728b5144c3bc21147de2ff8d4641fc4e56004127d827c0e12e7012
BLAKE2b-256 checksum
How to use checksums
67a1cafedcb661787d4d9326ebaf6cf4bedf5f3c1ac6a8e0f46159d0d1042727
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for dapparena-agent-sdk 0.2.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page