Skip to content

Repository files navigation

Copilot-SDK / Discovery World Integration

What is this?

This is a toy repo that builds a github copilot agentic integration for Allen AI's Discovery World. In practice, this is a fairly simplified integration that simply adds a really simple interface layer. The integration makes no real attempt at building a stronger scientific agent in its base form. However, using this has the advantage of leveraging copilots inherent multi-model compat., subagents, and already robust thinking / planning arch.

Why GitHub Copilot?

The quick answer is that I know the copilot-sdk well, and I have a copilot pro+ subscription, so it made sense to me!

Interesting Observations

Some notes I found while playing around with this:

  • The model, if left with the base suite of GitHub tools (which include code editing and web-fetch), will often try to cheat by reading the Discovery World scenarios directly (either locally or on github). For example, at one point it tried to read the proteomics scenario's RNG code to determine where to find the animals.
  • The lower level models get lost easily. Even with basic builtin memory tools (notepad etc.). They spend most of the time wandering randomly. The higher tier models (Opus+, and GPT5.4+ seem have an easier time running systematic searches)
  • If subagents are enabled, the model will use those to cheat.

Setup

Prerequisites

1. Install the Copilot Python SDK

pip install github-copilot-sdk

The Copilot CLI is bundled automatically with the Python SDK — no separate install needed. See the Copilot SDK Python README for full API docs.

2. Authenticate

Easiest option — log in via the CLI (this stores OAuth credentials):

copilot auth login

Alternatively, set one of these environment variables: COPILOT_GITHUB_TOKEN, GH_TOKEN, or GITHUB_TOKEN. See the Authentication docs for all supported methods.

3. Install Discovery World

cd discoveryworld
pip install -e .

This installs DiscoveryWorld and its dependencies (pygame, numpy, etc.) from requirements.txt.

4. Install copilot-dw

From the repo root:

pip install -e .

This installs the agent and its dependencies (github-copilot-sdk, pydantic, numpy) from pyproject.toml.

Running

Autonomous mode (default) — the agent loops observe → act → check task progress until all tasks are complete or --max-steps is reached:

python main.py --scenario Tutorial --difficulty Normal

Interactive mode — you type messages and the agent responds using the game tools:

python main.py --interactive

CLI flags

Flag Default Description
--scenario Tutorial Scenario name
--difficulty Normal Easy, Normal, or Challenge
--seed 0 Random seed
--max-steps 100 Maximum game steps before stopping
--model claude-sonnet-4.6 LLM model to use
--interactive off Enable interactive chat mode
--log-level debug Copilot CLI log level
--toolset main main (game tools only) or all (includes analysis tools)

The copilot-dw console script is also available after install:

copilot-dw --scenario Proteomics --difficulty Normal --max-steps 250

Future Considerations

  1. Vision model: get_visual_observation requires vision-capable model; test on spatial navigation tasks. But may cause github to get mad about token usage
  2. Observation caching: DW observations don't change between tick() calls — cache and refresh only after perform_action

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages