Skip to content

Support execution for simple agents#3

Closed
rickycambrian wants to merge 1 commit intoagent0lab:mainfrom
rickycambrian:agent-execution
Closed

Support execution for simple agents#3
rickycambrian wants to merge 1 commit intoagent0lab:mainfrom
rickycambrian:agent-execution

Conversation

@rickycambrian
Copy link
Contributor

I'm finding the library to work fantastic, but got to the point where I also wanted to call on agents, so I made some changes to support calling on agents. This is confirmed to work on my agent using GET and params passed in the url. I think some further adjustments will be needed to make sure different types of agents and edge cases are well supported, but I thought I would share what is working well from my end within the context I am working in.

Here is an example of how a paid request is made:

from agent0_sdk.core.x402_client import X402Client
from agent0_sdk.core.agent_client import AgentClient

x402 = X402Client(
    rpc_url=os.getenv("RPC_URL"),
    private_key=os.getenv("PRIVATE_KEY"),
    chain_id=11155111
)

agent = AgentClient(
    agent_card_url="https://agent.example.com/.well-known/ai-plugin.json",
    x402_client=x402
)

result = agent.call("What is Ethereum?")

@rickycambrian rickycambrian marked this pull request as draft November 25, 2025 12:25
@rickycambrian
Copy link
Contributor Author

This one should have been a draft for continued development, sorry about that. This PR on the typescript library side seems promising: agent0lab/agent0-ts#13 once this or similar PR is merged elsewhere, I will adapt the python side accordingly if we don't get a similar PR for parity on the python side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant