Skip to main content

dapparena-basic

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

PyPI version License: MIT Python 3.10+

설치

pip install dapparena-basic

# 블록체인 기능 포함
pip install dapparena-basic[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-basic[wsp]

라이선스

MIT © Dapp Arena

Metadata

Release files for dapparena-basic 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-basic 0.2.0
File Size Uploaded Provenance Actions
dapparena_basic-0.2.0.tar.gz 16.1 kB Without provenance Details for dapparena_basic-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 34.2 kB

Release files / dapparena_basic-0.2.0.tar.gz

Download URL dapparena_basic-0.2.0.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6faa90ca8b284b73158569664a839dbc46f46d0c1aeefa70ae5b7fbb0a9b0362
BLAKE2b-256 checksum
How to use checksums
0a5dd85cc05dc91131b4b88420ae38997988a0934977b42c492a059c7229c644
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

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

Download URL dapparena_basic-0.2.0-py3-none-any.whl
Size 18.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb96205a275fc4c8fbfe47f556ad72fa289569543e40adddb7fee657596dab0e
BLAKE2b-256 checksum
How to use checksums
35498b3570a76f61c9c7fe4a796b4c599714d7859f8dbb089dd8e407cf07d8df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for dapparena-basic 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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

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