Agent Repository + Automation test run fails with No token found on CrewAI AMP (Free plan, pre-deploy)

Hello CrewAI team and community,

I’m using CrewAI AMP (Free plan) and trying to run an Automation test execution (before deployment) that loads an agent from the Agent Repository.

However, the test execution fails with the following error:

Subprocess execution failed: Subprocess failed with return code 1.
STDERR: warning: `VIRTUAL_ENV=/data/internal/venv` does not match the project environment path `/shared_venv` and will be ignored; use `--active` to target the active environment instead
   Building lpmake @ file:///tmp/crewai_dsr296h5
      Built lpmake @ file:///tmp/crewai_dsr296h5
Installed 1 package in 1ms
Error during execution: No token found, make sure you are logged in
Traceback (most recent call last):
  File "/automation/src/crewai_studio_runner/subprocess/launcher.py", line 324, in main
    execute_crew(args.module_name, args.class_name, inputs)
  File "/automation/src/crewai_studio_runner/subprocess/launcher.py", line 236, in execute_crew
    crew = crew_class().crew()
           ^^^^^^^^^^^^
  File "/shared_venv/lib/python3.12/site-packages/crewai/project/crew_base.py", line 252, in __call__
    CrewBaseMeta._initialize_crew_instance(instance, cls)
  File "/shared_venv/lib/python3.12/site-packages/crewai/project/crew_base.py", line 267, in _initialize_crew_instance
    instance.map_all_task_variables()
  File "/shared_venv/lib/python3.12/site-packages/crewai/project/crew_base.py", line 663, in map_all_task_variables
    self._map_task_variables(
  File "/shared_venv/lib/python3.12/site-packages/crewai/project/crew_base.py", line 711, in _map_task_variables
    self.tasks_config[task_name]["agent"] = agents[agent_name]()
                                            ^^^^^^^^^^^^^^^^^^^^
  File "/shared_venv/lib/python3.12/site-packages/crewai/project/wrappers.py", line 186, in _bound
    result: R = _resolve_result(inner(*args, **kwargs))  # type: ignore[call-arg]
                                ^^^^^^^^^^^^^^^^^^^^^^
  File "/shared_venv/lib/python3.12/site-packages/crewai/project/utils.py", line 70, in wrapper
    result = meth(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/crewai_dsr296h5/src/lpmake/crew.py", line 44, in landing_page_leader
    return Agent(
           ^^^^^^
  File "/shared_venv/lib/python3.12/site-packages/pydantic/main.py", line 253, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/shared_venv/lib/python3.12/site-packages/crewai/agent/core.py", line 228, in validate_from_repository
    return load_agent_from_repository(from_repository) | v
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/shared_venv/lib/python3.12/site-packages/crewai/utilities/agent_utils.py", line 689, in load_agent_from_repository
    client = PlusAPI(api_key=get_auth_token())
                             ^^^^^^^^^^^^^^^^
  File "/shared_venv/lib/python3.12/site-packages/crewai/cli/authentication/token.py", line 12, in get_auth_token
    raise AuthError("No token found, make sure you are logged in")
crewai.cli.authentication.token.AuthError: No token found, make sure you are logged in

I would appreciate it if you could advise on the correct way to handle this or any recommended workaround.
Thank you very much.

For AMP there is support online to help you

1 Like