Skip to main content

Build autonomous agents that pay for their own compute and inference — powered by AgentKit, Aleph Cloud, and LibertAI

Project description

libertai-agentkit-plugin

Build autonomous agents that pay for their own compute and inference — powered by Coinbase AgentKit, Aleph Cloud, and LibertAI.

Includes an OpenAI-compatible LLM client (paid via x402), Aleph credit management tools, and AgentKit-to-OpenAI tool-calling helpers.

Install

pip install libertai-agentkit-plugin

Quick start

import asyncio
from coinbase_agentkit import AgentKit, AgentKitConfig
from coinbase_agentkit.wallet_providers import EthAccountWalletProvider

from libertai_agentkit_plugin import (
    create_llm_client,
    create_agent_wallet,
    actions_to_tools,
)
from libertai_agentkit_plugin.actions.aleph import AlephActionProvider

PRIVATE_KEY = "0x..."

async def main():
    # 1. Create wallet
    wallet_provider = create_agent_wallet(PRIVATE_KEY)

    # 2. Set up AgentKit with action providers
    agentkit = AgentKit(AgentKitConfig(
        wallet_provider=wallet_provider,
        action_providers=[AlephActionProvider(PRIVATE_KEY)],
    ))

    # 3. Convert actions to OpenAI tools
    tools, execute_tool = actions_to_tools(agentkit.get_actions())

    # 4. Create x402-enabled LLM client
    client = create_llm_client(PRIVATE_KEY)

    # 5. Use in a chat completions loop
    response = await client.chat.completions.create(
        model="qwen3.5-35b-a3b",
        messages=[{"role": "user", "content": "Check my balances"}],
        tools=tools,
    )
    print(response.choices[0].message.content)

asyncio.run(main())

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libertai_agentkit_plugin-0.1.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

libertai_agentkit_plugin-0.1.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file libertai_agentkit_plugin-0.1.1.tar.gz.

File metadata

  • Download URL: libertai_agentkit_plugin-0.1.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for libertai_agentkit_plugin-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c157d4a2f1f1a4b695b86ee3550cc8027eca2a6a8bf8f62e1ce0112ac9b2ba02
MD5 a9475e7f0475b4fef302c801ab5f7eb4
BLAKE2b-256 9b9491c2310656308793970feb1f48cf530c46ec1782e724b7b423365b0a9e3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for libertai_agentkit_plugin-0.1.1.tar.gz:

Publisher: agentkit-plugin-pypi.yml on Libertai/libertai-agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libertai_agentkit_plugin-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for libertai_agentkit_plugin-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5cc6dc35d0a4739556e2998e4c70e3d32feb0c5b6a9b7fc4fcad24b625e5173f
MD5 819837acae7db8966eba0fdf2b60b978
BLAKE2b-256 805192e13bcf2953b020adc75c8832ea8a7769f0973fa426e5131d999e6924c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for libertai_agentkit_plugin-0.1.1-py3-none-any.whl:

Publisher: agentkit-plugin-pypi.yml on Libertai/libertai-agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page