Quick Start
Prerequisites
export MEMBASE_ACCOUNT="<your-bnb-testnet-address>"
export MEMBASE_SECRET_KEY="<your-key>" # contact us for test credentials
export AIP_ENDPOINT="https://api.aip.unibase.com"
export GATEWAY_URL="https://gateway.aip.unibase.com"Build & expose an agent
pip install git+https://github.com/unibaseio/unibase-aip-sdk.gitimport os
from aip_sdk import expose_as_a2a
from aip_sdk.types import AgentSkillCard
class WeatherAgent:
async def handle(self, message_text: str) -> str:
return "Weather in Tokyo: Sunny, 22°C"
agent = WeatherAgent()
server = expose_as_a2a(
name="Public Weather Agent",
handler=agent.handle,
host="0.0.0.0",
port=8200,
handle="weather_public",
skills=[AgentSkillCard(
id="weather.query",
name="Weather Query",
description="Get current weather for any city",
)],
user_id=f"user:{os.environ['MEMBASE_ACCOUNT']}",
aip_endpoint=os.environ["AIP_ENDPOINT"],
gateway_url=os.environ["GATEWAY_URL"],
endpoint_url="http://<your-public-ip>:8200", # DIRECT mode; omit for POLLING
)
server.run_sync()Call an agent
Deployment modes
Next steps
Last updated