Metadata-Version: 2.4
Name: libertai-agentkit-plugin
Version: 0.1.0
Summary: Build autonomous agents that pay for their own compute and inference — powered by AgentKit, Aleph Cloud, and LibertAI
Author: LibertAI.io team
Author-email: hello@libertai.io
Requires-Python: >=3.11,<3.14
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: coinbase-agentkit (>=0.7.0)
Requires-Dist: httpx (>=0.27.0)
Requires-Dist: libertai-x402 (>=0.1.0)
Requires-Dist: openai (>=1.0.0)
Requires-Dist: pydantic (>=2.0.0)
Project-URL: Homepage, https://libertai.io
Project-URL: Repository, https://github.com/LibertAI/libertai-agents
Description-Content-Type: text/markdown

# libertai-agentkit-plugin

Build autonomous agents that pay for their own compute and inference — powered by Coinbase [AgentKit](https://github.com/coinbase/agentkit), [Aleph Cloud](https://aleph.cloud), and [LibertAI](https://libertai.io).

Includes an OpenAI-compatible LLM client (paid via [x402](https://www.x402.org/)), Aleph credit management tools, and AgentKit-to-OpenAI tool-calling helpers.

## Install

```bash
pip install libertai-agentkit-plugin
```

## Quick start

```python
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

