Skip to content

How to test the ai agent on the testnet ? #20

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

Open
beeehappyandfree opened this issue Feb 22, 2025 · 7 comments
Open

How to test the ai agent on the testnet ? #20

beeehappyandfree opened this issue Feb 22, 2025 · 7 comments

Comments

@beeehappyandfree
Copy link

Hello @microchipgnu , @nategeier , @rubenmarcus , @sainthiago and @Markeljan

Is there a way to deploy the ai agent to the testnet environment https://testnet.wallet.bitte.ai/smart-actions ?

I have deployed this ai agent to the mainnet playground environment.
https://wallet.bitte.ai/smart-actions?mode=debug&agentId=market-sentiment-agent.vercel.app

I would like to perform some swaps and exchange using the testnet before deploying it to the mainnet.

Thanks

@beeehappyandfree beeehappyandfree changed the title How to test the agent on the testnet ? How to test the ai agent on the testnet ? Feb 22, 2025
@bh2smith
Copy link
Member

bh2smith commented Mar 17, 2025

Hey @beeehappyandfree - thanks for your question.

make-agent has a --testnet (-t) runtime argument. Here is a package file from a agent that uses it. This was added to the "dev" command here: BitteProtocol/make-agent#18.

Let me know if this all works out for you, sorry it took so long for us to respond.

Also, if this was sufficiently helpful, please close the issue.

@calsaviour
Copy link

Hello @bh2smith ,
Thanks for the reply.

I still facing some issues to get it to work. I checkout the near-cow-agent repo.

Here are my configurations

  1. in the .env file, set the testnet account id and bitte api key.
BITTE_API_KEY-"xxxxxxyyyyy"
ACCOUNT_ID=xxxxx.testnet
  1. Logs from " npm run dev-testnet". It states "accountId: undefined"
> bitte-cowswap-agent@0.1.0 dev-testnet
> concurrently "next dev --turbopack" "make-agent dev --testnet"

[1] }
[0]    ▲ Next.js 15.2.3 (Turbopack)
[0]    - Local:        http://localhost:3000
[0]    - Network:      http://192.168.50.41:3000
[0]    - Environments: .env
[0] 
[0]  ✓ Starting...
[0]  ✓ Ready in 594ms
[1] [Dev] Fetching and validating OpenAPI spec from: http://localhost:3000
[1] [Dev] Getting plugin ID and spec URL
[1] [Dev] Plugin ID: localhost
[1] [Dev] Spec URL: URL {
[1]   href: 'http://localhost:3000/.well-known/ai-plugin.json',
[1]   origin: 'http://localhost:3000',
[1]   protocol: 'http:',
[1]   username: '',
[1]   password: '',
[1]   host: 'localhost:3000',
[1]   hostname: 'localhost',
[1]   port: '3000',
[1]   pathname: '/.well-known/ai-plugin.json',
[1]   search: '',
[1]   searchParams: URLSearchParams {},
[1]   hash: ''
[1] }
[1] [Dev] Validating OpenAPI spec...
[0]  ✓ Compiled /api/ai-plugin in 329ms
[0] no account
[0]  GET /.well-known/ai-plugin.json 200 in 413ms
[1] OpenAPI specification is valid.
[1] [Dev] Validation result: { isValid: true, accountId: undefined }
[1] [Dev] Fetching spec content...
[0]  GET /.well-known/ai-plugin.json 200 in 14ms
[1] [Dev] Successfully parsed spec content
[1] [Dev] Spec validation status: true
[1] [Dev] Updating spec with server URL and account ID
[1] [Dev] Updated spec servers URL: http://localhost:3000
[1] [Dev] OpenAPI spec validation successful
[1] [Server] UI server listening http://localhost:3001
[1] [Server] Ready to handle requests
  1. The UI shows the url wallet.bitte.ai and connected to the mainnet

Image

@bh2smith
Copy link
Member

Right. At step three we need to change that redirect to testnet.wallet.bitte.ai

It's under a different domain. I'll try to have to look into it tomorrow but maybe it will help on your mission.

@calsaviour
Copy link

calsaviour commented Mar 20, 2025

Added another screenshot.

The issue is from local machine it is not connected to the testnet.

When i choose mainnet, the url redirects to https://localhost:3001/?account_id=xxxx.near&public_key=nnnnn
Selecting testnet, the url redirects https://testnet.wallet.bitte.ai.

The expectation for testnet would be a redirect to https://localhost:3001/?account_id=xxxx.testnet&public_key=nnnnn

Image

@bh2smith
Copy link
Member

So we have been in the process of disconnecting the wallet from the AI platform. There is an open PR in make-agent CLI tool that related to testnet. I've asked internally about the status of this but it seems that

Yes but we cant merge that until some changes are made to the runtime.

I will give it a try on my own agents.

@bh2smith
Copy link
Member

bh2smith commented Mar 20, 2025

Ok - ya so I tried this out locally and it appears, since the separation of wallet from the standalone chat/playground we lost testnet capability. Might be a little before testnet is built into the latest system.

Perhaps @SurgeCode can shed some light on the expected time frame for this.

@SurgeCode
Copy link
Member

Testnet is not currently working in production, if you want you can use this test release to try it out 0.2.10-near-testnet-4a335a1

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

No branches or pull requests

4 participants