Common Issues

Authentication Issues

If you encounter a 401 error or an error message indicating that you are not authenticated, this likely means your login has expired.

To fix this, run magma login again.

If the issue persists, make sure your CLI is up to date by running magma update, then try logging in again.

Tool Issues

If your agent does not seem to be calling your tools as expected, or you’re getting an error, check for the following:

  • Most Common: You’re not returning a string from your tool!
    • Even if your tool works and has no errors, it will not work if you don’t return a string.
  • Each tool takes in the correct arguments - call: MagmaToolCall
  • Ensure the model you’re using is actually capable of calling tools! Some aren’t!! (e.g. llama-3.3-70b-specdec)
  • Tools have to be decorated with @tool and/or @toolparam

Deployment Issues

If you encounter deployment issues, check the following:

  • Ensure you have a valid package.json file in your project root
  • Verify you have set up the required API keys in your .env file:
    • For OpenAI: OPENAI_API_KEY
    • For Anthropic: ANTHROPIC_API_KEY
    • For Google: GOOGLE_API_KEY
    • For Groq: GROQ_API_KEY
  • Update your Magma CLI to the latest version:
    magma update
    
  • Update your agent to use the latest version of Magma
    npm i @pompeii-labs/magma@latest
    
  • Try logging in again with:
    magma login
    

My issue isn’t listed here!

If you’re having an issue that isn’t listed here, please let us know in our #issues channel in the community Slack and we’ll get it sorted out!