Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation to explain how to use the Agentkit with a local / self-hosted / decentralized LLM #51

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The Coinbase Developer Platform (CDP) Agentkit simplifies bringing your AI Agent

## Examples
Check out `cdp-langchain/examples` for inspiration and help getting started!
- [Chatbot](./cdp-langchain/examples/chatbot/README.md): Simple example of a Chatbot that can perform complex onchain interactions, using OpenAI.
- [Chatbot](./cdp-langchain/examples/chatbot/README.md): Simple example of a Chatbot that can perform complex onchain interactions, using OpenAI or the decentralized [Gaia network](https://www.gaianet.ai/).

## Repository Structure
CDP Agentkit is organized as a [monorepo](https://en.wikipedia.org/wiki/Monorepo) that contains multiple packages.
Expand Down
16 changes: 16 additions & 0 deletions cdp-langchain/examples/chatbot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,19 @@ pip install cdp-langchain
```bash
python chatbot.py
```

## Run it on a Gaia node

You can run an LLM on your own machine using the [Gaia network node software](https://github.com/GaiaNet-AI/gaianet-node). With open-source LLMs fine-tined for tool calls, such as the [Llama-3-Groq model on Gaia](https://github.com/GaiaNet-AI/node-configs/tree/main/llama-3-groq-8b-tool), you can use your own Gaia node as a free and decentrailized alternative to OpenAI.

To configure the agentic chatbot to use decentrailized AI, you just need to change one line of code to point the `base_url` to your Gaia node.
In this example, the `https://llamatool.us.gaianet.network/v1` is a [public Gaia node](https://docs.gaianet.ai/user-guide/nodes#tool-use-llama) running a [tool call LLM](https://docs.gaianet.ai/tutorial/tool-call).

```
llm = ChatOpenAI(model="llama", api_key="GAIA", base_url="https://llamatool.us.gaianet.network/v1")
```

That's it. Now you can chat with the agent to perform on-chain actions through your COinbase MPC wallet!