Phase 1: Agent SDK Marketplace Integration - Implement _submit_to_marketplace() with HTTP client to coordinator API - Implement _update_marketplace_offer() with HTTP client - Implement assess_capabilities() with GPU detection using nvidia-smi - Add coordinator_url parameter and AITBCHTTPClient integration Phase 2: Agent SDK Network Registration - Implement register_with_network() with HTTP client to coordinator API - Implement get_reputation() with HTTP client to fetch from API - Implement get_earnings() with HTTP client to fetch from API - Implement signature verification in send_message() and receive_message() - Add coordinator_url parameter and AITBCHTTPClient integration Phase 3: Coordinator API Enterprise Integration - Implement generic ERPIntegration base class methods with mock implementations - Implement generic CRMIntegration base class methods with mock implementations - Add BillingIntegration base class with generic mock implementations - Add ComplianceIntegration base class with generic mock implementations - No third-party integration as requested Phase 4: Coordinator API Key Management - Add MockHSMStorage class with in-memory key storage - Add HSMProviderInterface with mock HSM connection methods - FileKeyStorage already had all abstract methods implemented Phase 5: Blockchain Node Multi-Chain Operations - Implement start_chain() with Ethereum-specific chain startup - Implement stop_chain() with Ethereum-specific chain shutdown - Implement sync_chain() with Ethereum consensus (longest-chain rule) - Add database, RPC server, P2P service, and consensus initialization Phase 6: Settlement Bridge - Implement EthereumBridge class extending BridgeAdapter - Implement _encode_payload() with Ethereum transaction encoding - Implement _get_gas_estimate() with Web3 client integration - Add Web3 client initialization and gas estimation with safety buffer
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 capabilitiesComputeProvider: Extend Agent to offer compute resourcesComputeConsumer: Extend Agent to consume computePlatformBuilder: Helper for constructing platform configurationsSwarmCoordinator: Orchestrate swarms of agents
License
MIT