Homeโ†’Basic module creation

๐Ÿงช Testing the Agent Module

Let's test our vision agent to make sure it works as expected. With Naptha, we can test our agent in a few different ways.

  1. Test the module locally without the Naptha Node
  2. Test the module on a local Naptha Node (with a local Hub)
  3. Test the module on a hosted Naptha Node (with the hosted Naptha Hub)

1. Local Development - Testing without a Naptha Node

You can test your agent directly by running the CLI command below:

This will run the module locally and output the results to the console.

Sample CLI output:

In the final course for this track, Publishing Your Agent to Naptha Hub, we'll cover:

  • How to test the module on a local Naptha Node
  • How to test the module on a hosted Naptha Node

Before moving on:

  • Try testing with different images and questions
Debugging Strategies
  1. Enable debug logging in your module:
  1. Add debug statements in key areas:
Common Pitfalls To Avoid
  • Missing dependencies
  • Incorrect file paths
  • API key issues
  • Model availability
  • Incorrect configuration
Security Best Practices
  1. API Key Management
  • Never commit .env
  • Use environment variables
  • Rotate keys regularly
  1. Validation
  • Check file existence
  • Validate URLs
  • Sanitize inputs