feat: scaffold full atlas config from env init#75
Merged
jbarnes850 merged 2 commits intomainfrom Oct 23, 2025
Merged
Conversation
Contributor
Author
|
✅ Ready-to-run scaffolding overhaul is in. Highlights:
CI / smoke: pytest
ATLAS_MOCK_AUTH0=1 ATLAS_FAKE_LLM=1 atlas env init --path external/auth0-assistant0/py-langchain/backend --env-fn examples.langgraph_adapter:create_environment --agent-fn examples.langgraph_adapter:create_langgraph_agent --env-arg graph=app.agents.assistant0:agent --agent-arg graph=app.agents.assistant0:agent --scaffold-config-full --force --no-run
ATLAS_FAKE_LLM=1 atlas run --path external/auth0-assistant0/py-langchain/backend --config external/auth0-assistant0/py-langchain/backend/.atlas/generated_config.yaml --task "Smoke task"Let me know if you want additional coverage or docs tweaks. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a --scaffold-config-full flag for atlas env init that generates a complete, runnable Atlas configuration by merging template defaults with discovered factory metadata and inferred LLM provider/model information.
Key Changes:
- Auto-detection of LLM provider/model from LangChain-based agents during discovery
- Full YAML config scaffolding with discovery metadata, LLM parameters, and template defaults
.envfile auto-loading and intelligentPYTHONPATHinference during discovery- Mock LLM mode (
ATLAS_FAKE_LLM=1) for offline testing
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/test_env_scaffold.py | Unit tests for LLM metadata detection and full config composition logic |
| tests/integration/test_env_ready_config.py | Integration test verifying end-to-end scaffolding and config execution |
| atlas/sdk/discovery_worker.py | LLM metadata detection, LangChain workarounds, and environment/PYTHONPATH handling |
| atlas/cli/env.py | Full config scaffolding, auto-candidate selection, and .env loading logic |
| atlas/utils/llm_client.py | Mock LLM response implementation for offline testing |
| atlas/utils/env.py | Extended dotenv loader to accept optional path parameter |
| atlas/cli/run.py | Updated to load .env and configure sys.path |
| tests/unit/test_cli_run.py | Updated mock to accept variable arguments |
| README.md | Documentation for new scaffolding flag and features |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements to Atlas's environment discovery, configuration scaffolding, and LLM mocking capabilities. The main focus is on making the CLI more robust and user-friendly, especially for complex agent stacks and offline validation workflows. Key changes include enhanced
.envloading, automatic Python path adjustments, provider/model autodiscovery, and the ability to run smoke tests with a fake LLM.Environment and Configuration Discovery Improvements:
.envfiles from the project root and automatically adjustsPYTHONPATHto include both the project root andsrcdirectory, reducing manual setup for most stacks. (atlas/cli/run.py,atlas/utils/env.py,README.md) [1] [2] [3].envbefore spinning up factories and derives additional import hints from passed factories, streamlining agent/environment initialization. (README.md)LLM Provider and Model Autodiscovery:
atlas/sdk/discovery_worker.py) [1] [2] [3] [4]LangChain Compatibility and Workarounds:
atlas/sdk/discovery_worker.py) [1] [2]Offline Validation and LLM Mocking:
ATLAS_FAKE_LLM=1environment variable, which enables mock LLM responses for offline validation and smoke testing without calling live providers. (atlas/utils/llm_client.py,README.md) [1] [2] [3] [4] [5]Testing and Reliability:
.envvariables, and works with the mock LLM for smoke tests. (tests/integration/test_env_ready_config.py)These changes collectively improve Atlas's developer experience, reliability, and support for advanced agent stacks and offline workflows.