Skip to content

Commit 1d9be64

Browse files
committed
Remove ensemble_agent - not relocated
1 parent ddb07f5 commit 1d9be64

21 files changed

Lines changed: 12 additions & 1274 deletions

AGENTIC_SETUP.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# Running libEnsemble agentic workflows
22

3+
> **Note:** The agentic directory in this repo is experimental scripts and
4+
has been superceeded by the libEnsemble agent at https://github.com/Libensemble/ensemble_agent
5+
36
For all workflows, you will need a key to access an LLM.
47

5-
For example, you can set an OpenAPI key.
8+
For example, you can set an OpenAPI key.
69
Requires an [OpenAI account](https://platform.openai.com).
710
Make sure to check MODEL at top of agentic script and usage rates.
811

@@ -63,7 +66,7 @@ cd script-creator/agentic/
6366

6467
To run:
6568

66-
Provide path to directory with your libEnsemble scripts. These will be copied
69+
Provide path to directory with your libEnsemble scripts. These will be copied
6770
to a working directory `generated_scripts/`.
6871

6972
```bash
@@ -99,7 +102,7 @@ and update paths to `sim_app` and `input_file` in `tests/scripts_with_errors/run
99102

100103
To run:
101104

102-
Provide path to directory with your libEnsemble scripts. These will be copied
105+
Provide path to directory with your libEnsemble scripts. These will be copied
103106
to a working directory `generated_scripts/`.
104107

105108
```bash
@@ -156,7 +159,7 @@ python libe_agent_with_script_generator.py --prompt-file my_prompt.txt
156159
# Use existing scripts (skip MCP generation/tweaking)
157160
python libe_agent_with_script_generator.py --scripts example_scripts/
158161

159-
# Run from anywhere
162+
# Run from anywhere
160163
python libe_agent_with_script_generator.py --mcp-server <path/to/mcp_server.mjs>
161164
```
162165
Scripts saved to `generated_scripts/` directory.

CLAUDE.md

Lines changed: 5 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Project Overview
66

7-
This is a **libEnsemble Script Creator** — a system for generating, running, and iteratively fixing [libEnsemble](https://libensemble.readthedocs.io/) scripts (used for parallel optimization at HPC centers). It has three deployment modes:
7+
This is a **libEnsemble Script Creator** — a system for generating [libEnsemble](https://libensemble.readthedocs.io/) scripts (used for parallel optimization at HPC centers). It has two deployment modes:
88

99
1. **MCP Server** (`mcp_server.mjs`) — Node.js server exposing script generation as an MCP tool (used from Cursor IDE or AI agents)
10-
2. **Agentic Python scripts** (`agentic/`) — LangChain agents that generate scripts via MCP, run them, and auto-fix errors
11-
3. **Web UI** (`web/`) — Flask backend + HTML/JS frontend for interactive script refinement
10+
2. **Web UI** (`web/`) — Flask backend + HTML/JS frontend for interactive script refinement
1211

1312
## Key Commands
1413

@@ -18,37 +17,6 @@ npm install # Install dependencies
1817
node mcp_server.mjs # Run MCP server
1918
```
2019

21-
### Agentic Agents (Python)
22-
23-
Install dependencies:
24-
```bash
25-
pip install langchain langchain-openai mcp openai libensemble scipy mpmath
26-
```
27-
28-
Run the primary agent (generate → run → fix):
29-
```bash
30-
cd agentic/
31-
python libe_agent_with_script_generator.py # Uses DEFAULT_PROMPT
32-
python libe_agent_with_script_generator.py "Create APOSMM scripts..."
33-
python libe_agent_with_script_generator.py --prompt-file my_prompt.txt
34-
python libe_agent_with_script_generator.py --scripts example_scripts/ # Skip generation
35-
python libe_agent_with_script_generator.py --show-prompts # Debug prompts
36-
```
37-
38-
Run the interactive agent (with user chat loop + RAG doc lookup):
39-
```bash
40-
# Extra deps for RAG:
41-
pip install llama-index llama-index-embeddings-huggingface sentence-transformers
42-
43-
export GENERATOR_MCP_SERVER=/path/to/mcp_server.mjs
44-
export RAG_MCP_SERVER=/path/to/rag/mcp_server.py
45-
export OPENAI_API_KEY=your_key
46-
47-
python libe_agent_interactive_with_rag.py --interactive
48-
python libe_agent_interactive_with_rag.py --generate-only # No execution
49-
python libe_agent_interactive_with_rag.py --scripts dir/ # Review existing
50-
```
51-
5220
### Web Interface
5321
```bash
5422
cd web/
@@ -57,15 +25,6 @@ export OPENAI_API_KEY=your_key
5725
python server.py # Serves on http://localhost:5000
5826
```
5927

60-
### RAG System
61-
```bash
62-
cd rag/
63-
pip install llama-index llama-index-embeddings-huggingface sentence-transformers mcp
64-
python build_index.py # Build vector index from libEnsemble docs (run once)
65-
python rag_query.py "What generators are available?"
66-
python test_mcp_server.py # Test the RAG MCP server
67-
```
68-
6928
## Architecture
7029

7130
### Script Generation Pipeline
@@ -76,41 +35,8 @@ The MCP server (`mcp_server.mjs`) uses **Mustache templates** (`templates/*.j2`
7635

7736
Generator configurations are data-driven via `data/generators.json` and `data/generator_specs.json`.
7837

79-
### Agent Workflow
80-
```
81-
User prompt
82-
→ LangChain agent calls MCP tool CreateLibEnsembleScripts
83-
→ Agent refines scripts (second LLM pass)
84-
→ Agent runs scripts via subprocess
85-
→ On failure: optionally queries RAG for doc context, then fixes and reruns
86-
→ All versions saved to generated_scripts/versions/
87-
```
88-
89-
Key constants in agents:
90-
- `MAX_RETRIES = 2` — retry attempts on script failure
91-
- `LLM_MODEL` env var (default: `gpt-4o-mini`) — overrides model for all agents
92-
93-
### MCP Protocol Usage
94-
Agents connect to MCP servers via `stdio_client` (the MCP Python SDK). There are two MCP servers:
95-
1. `mcp_server.mjs` — exposes `CreateLibEnsembleScripts` tool
96-
2. `rag/mcp_server.py` — exposes `query_libe_docs`, `query_generator_docs`, etc.
97-
98-
### Environment Variables
99-
```
100-
OPENAI_API_KEY # Required for agents
101-
OPENAI_BASE_URL # Optional: alternative LLM endpoint (e.g., ALCF inference)
102-
LLM_MODEL # Optional: model name (default: gpt-4o-mini)
103-
MCP_SERVER # Path to mcp_server.mjs (used by agents)
104-
GENERATOR_MCP_SERVER # Path to generator MCP server
105-
RAG_MCP_SERVER # Path to rag/mcp_server.py
106-
```
38+
### MCP Tool
39+
The MCP server exposes the `CreateLibEnsembleScripts` tool.
10740

10841
### Testing
109-
No automated test suite. Manual testing uses:
110-
- `agentic/tests/` — test scripts with intentional errors (filename errors, wrong paths, missing try/except, etc.)
111-
- The six_hump_camel benchmark problem in `six_hump_camel/` as a reference optimization case
112-
113-
To test an agent against a known-error script:
114-
```bash
115-
python libe_agent_with_script_generator.py --scripts agentic/tests/scripts_with_errors/
116-
```
42+
No automated test suite. The six_hump_camel benchmark problem in `six_hump_camel/` serves as a reference optimization case.

ensemble_agent/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

ensemble_agent/__main__.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

ensemble_agent/agent.py

Lines changed: 0 additions & 188 deletions
This file was deleted.

0 commit comments

Comments
 (0)