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.0.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.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: libertai_agentkit_plugin-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 35941307691aa3c1ff2669c58eab137237f666dd4f42ba5238747d3d4f416f07
MD5 4521cfc907e3d8f61db3fd102f687764
BLAKE2b-256 3940291d9940885c9503fc25366dff2287987f01efcbf13aaeed3262771385b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for libertai_agentkit_plugin-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for libertai_agentkit_plugin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df7df5942570aac733462da94e9fc6b4b02567b495934783c16f89807e190e80
MD5 af29302fa2ad4053001d6fa0f0ccbf76
BLAKE2b-256 b478ae9dc32c9e7416be56896e476ebd7150eb5f2ed0d4f368b20794989a6ef7

See more details on using hashes here.

Provenance

The following attestation bundles were made for libertai_agentkit_plugin-0.1.0-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