Microsoft Autogen extension of AgentKit. Enables agentic workflows to interact with onchain actions.
pip install coinbase-agentkit coinbase-agentkit-autogenSet the following environment variables:
export OPENAI_API_KEY=<your-openai-api-key>
export CDP_API_KEY_ID=<your-cdp-api-key-id>
export CDP_API_KEY_SECRET=<your-cdp-api-key-secret>
export CDP_WALLET_SECRET=<your-cdp-wallet-secret>from coinbase_agentkit import AgentKit
from coinbase_agentkit_autogen import get_autogen_tools
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.ui import Console
agentKit = AgentKit()
model_client = OpenAIChatCompletionClient(model="gpt-4o-mini")
tools = get_autogen_tools(agentKit)
agent = AssistantAgent(
name="assistant",
model_client=model_client,
tools=tools,
system_message="You are a helpful agent"
)
async def main() -> None:
await Console(agent.run_stream(task="Show me my wallet information."))
await model_client.close()
await main()For AgentKit configuration options, see the Coinbase Agentkit README.
For Autogen configuration options, see the Autogen Documentation
For a full example, see the chatbot example.
See CONTRIBUTING.md for detailed setup instructions and contribution guidelines.