Run the agent

UI - Palliora Explorer

  1. Go to the Agents tab on Palliora Explorer.

  2. Select the agent you want to run.

  3. Pay the Palliora tokens required for running that agent.

  4. You will be redirected to a chat UI where you can start interacting with the agent.

CLI

  1. Use the Palliora indexer to fetch the agentRef ciphertext's using the API call:

    Implement an API to do the following:
    Fetch the blockHt & extrinsic from agentConfigRef:
    
    ```
    statescan-polkadot-agent -> registry collection -> Agent doc.agentConfigRef -> blockHt
    ```
    
    Use the blockHt & extrinsic to get the agent ciphertext data
    ```
    statescan-polkadot-data -> blob collection -> "indexer.blockHeight": blockHt -> data
    ```
  2. Once you have the agentConfig ciphertext, run the following cmd from Palliora CLI

    node mindcrypt-cli/dist run-agent --agentRef ${agentRefCipherText}
  3. This will emit a daccRunAgent event to notify the guardian network's calculator nodes to run the agent.

  4. The guardian network will perform threshold decryption on the agent's ciphertext which will expose the agent container reference and .env variables to the node.

  5. The calculator node will then be able to pull the agent container image, serve the model required by the agent through ollama and execute docker run for the agent to start running.

  6. The node will also expose an access url for your client to establish a connection with the agent, which will be encrypted against the client's public key.

  7. You can fetch the result of the run agent call from the daccComputeResult event, decrypt the data to get the accessURL . This should be a websocket URL.

  8. Use the accessURL to establish a direct connection with your agent and start interacting!

Last updated