Files
aitbc/packages/py/aitbc-agent-sdk
aitbc 119d0f42c0 Migrate CLI and Python packages to centralized aitbc package utilities
CLI migration:
- Migrate 11 CLI files from old import pattern to centralized aitbc imports
- wallet.py, exchange.py, gpu_marketplace.py, exchange_island.py, monitor.py, cross_chain.py
- aitbc_cli.py, handlers (account.py, bridge.py, pool_hub.py), utils (wallet_daemon_client.py)
- Replace 'from aitbc.aitbc_logging import' with 'from aitbc import get_logger'
- Replace 'from aitbc.http_client import' with 'from aitbc import AITBCHTTPClient'
- Replace 'from aitbc.exceptions import' with 'from aitbc import NetworkError'

Packages migration:
- aitbc-sdk: receipts.py - migrate from httpx to AITBCHTTPClient
- aitbc-agent-sdk: 5 files - migrate logging to get_logger
  - agent.py, compute_provider.py, compute_consumer.py, swarm_coordinator.py, platform_builder.py
2026-04-25 07:04:57 +02:00
..

AITBC Agent SDK

The AITBC Agent SDK enables developers to create AI agents that can participate in the AITBC decentralized compute marketplace. Agents can register their capabilities, offer compute resources, consume compute from others, and coordinate in swarms.

Installation

pip install -e .[dev]

Quick Start

Here's a simple example to create and register an agent:

import asyncio
from aitbc_agent import Agent, AgentCapabilities

# Define agent capabilities
capabilities = {
    "compute_type": "inference",
    "gpu_memory": 8,  # GB
    "supported_models": ["llama2", "mistral"],
    "performance_score": 0.95,
    "max_concurrent_jobs": 2,
    "specialization": "NLP"
}

# Create an agent (identity is generated automatically)
agent = Agent.create(
    name="MyInferenceAgent",
    agent_type="provider",
    capabilities=capabilities
)

# Register the agent on the AITBC network
async def main():
    success = await agent.register()
    if success:
        print(f"Agent {agent.identity.id} registered with address {agent.identity.address}")

asyncio.run(main())

Agent Types

  • ComputeProvider: Offers GPU/CPU resources for AI tasks
  • ComputeConsumer: Requests compute resources for training/inference
  • SwarmCoordinator: Manages multi-agent collaborations

Modules

  • Agent: Base agent with identity and capabilities
  • ComputeProvider: Extend Agent to offer compute resources
  • ComputeConsumer: Extend Agent to consume compute
  • PlatformBuilder: Helper for constructing platform configurations
  • SwarmCoordinator: Orchestrate swarms of agents

License

MIT