galadriel
Python package.
agent.py
with the following Python code.
Add your OpenAI API Key.
gpt-4o
model from OpenAI for agent reasoning.SimpleMessageClient
to send and receive messages.AgentRuntime
to connect the agent to the client and execute tasks.DuckDuckGoSearchTool
for web-based information retrieval.CodeAgent
initialization with Web3-specific tools:
additional_authorized_imports=["json"]
parameter in the CodeAgent
initialization.
It is required because dexscreener.SearchTokenPairTool()
imports json
module and the Python interpreter doesnโt allow imports by default outside of a safe list.