Skip to content

Conversation

@Lawhy
Copy link

@Lawhy Lawhy commented Nov 12, 2025

Add a new environment that supports web search.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 12, 2025
@meta-pytorch meta-pytorch deleted a comment from github-actions bot Nov 12, 2025
@meta-pytorch meta-pytorch deleted a comment from github-actions bot Nov 12, 2025
@burtenshaw
Copy link
Collaborator

Hi @Lawhy, Nice env! It looks like your env does not conform to the standard structure. So we need to add a standard structure.

The easiest way is to use the openenv cli to initialize a new project, and then copy in your cod to that skeleton. You can do this like so:

  • Merge main
  • Reinstall uv sync
  • cd src/envs
  • openenv init websearch_env_new
  • copy your business logic into the new skeleton
  • mv websearch_env_new websearch_env
  • push your changes.

Once you're done this, your env will be compatible with the hub and have project matter to be installed and run. You can get help along the way from openenv --help.

@Lawhy
Copy link
Author

Lawhy commented Nov 12, 2025

Hi @burtenshaw, thanks for quick responses! I have merged mainline and trying to use openenv init. One thing I'm confused is that I can see openenv_core is used through this command e.g.,:

from openenv_core.client_types import StepResult
from openenv_core.env_server.types import State
from openenv_core.http_env_client import HTTPEnvClient

but it is not installed with uv sync

@burtenshaw
Copy link
Collaborator

One thing I'm confused is that I can see openenv_core is used through this command e.g.,: but it is not installed with uv sync

openenv-core should be installed via the env's toml. It's in the template here. The pip package might not be upto dat. So try using this instead "openenv-core @ git+https://github.com/meta-pytorch/OpenEnv.git@main#subdirectory=src/core" .

Feel free to push your updated project and I can try it out.

@Lawhy
Copy link
Author

Lawhy commented Nov 12, 2025

Thanks @burtenshaw, I have pushed a new version

@Lawhy
Copy link
Author

Lawhy commented Nov 12, 2025

Seems that openenv init doesn't create pyproject.toml, requirements.txt and some other files shown in README.md; I have rebased the branch to the latest main.

@burtenshaw
Copy link
Collaborator

Seems that openenv init doesn't create pyproject.toml, requirements.txt and some other files shown in README.md; I have rebased the branch to the latest main.

Strange. Are you doing openenv init <a_new_directory_name> ?

@burtenshaw
Copy link
Collaborator

@Lawhy I took a look and adapted your env to the new skeleton: Lawhy#1 I think you'll just need to resolve dependencies and test.

Sorry about this, it's just challenging because you started before the init command existed.

@Lawhy
Copy link
Author

Lawhy commented Nov 12, 2025

Thanks @burtenshaw, I actually did openenv init and I installed the package by uv pip install -e OpenEnv locally. Not sure why the cli is not up-to-date.

@Lawhy
Copy link
Author

Lawhy commented Nov 13, 2025

Hi @burtenshaw, is there anything I need to check? My local test has no problem.

@burtenshaw
Copy link
Collaborator

Hi @burtenshaw, is there anything I need to check? My local test has no problem.

Yeah, it runs but I just wanted to make sure you've tested it functionally. Could you push it to hugging face hub with openenv push when it's ready? And link here.

@github-actions
Copy link

github-actions bot commented Nov 13, 2025

✅ Validation succeeded for websearch_env

Your env passes the vibe check. However, most environments should go straight to the hub, they will automatically be added to the official Env Hub collection on a nightly basis. Environments in the official specification repo are only meant to demonstrate usage of a specific spec feature for educational purposes. Re-run locally with:

  • openenv validate --verbose src/envs/websearch_env
[OK] websearch: Ready for multi-mode deployment

Supported deployment modes:
  [YES] docker
  [YES] openenv_serve
  [YES] uv_run
  [YES] python_module

Usage examples:
  cd websearch_env && uv run server
  cd websearch_env && openenv build
  cd websearch_env && openenv push

You can deploy the environment to Hugging Face Spaces by running openenv push.

@Lawhy
Copy link
Author

Lawhy commented Nov 13, 2025

Hi @burtenshaw, it's working now: https://huggingface.co/spaces/lawhy/web_search; it will require API key from https://serper.dev/ or set it up in Hugging Face secret.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants