Minimal .NET 10 console app for running a recursive text-agent experiment on top of the OpenAI Responses API.
Project codename: Enlightment Thinking.
The repository contains two layers:
OpenAiProbe/: the runner application.experiments/anima/: a compact public sample workspace with prompt, goal, journal, a few artifacts, and one curated generation snapshot.
The runner is intentionally narrow and file-based:
- each generation reads a persisted workspace from disk;
- the model can update its future prompt and goal;
- the run produces a cumulative journal and text artifacts;
- every generation is snapshotted as request, response, parsed decision, and summary;
- the outer loop can stop only when the model explicitly decides continuation no longer adds signal.
This keeps the experiment reproducible without turning it into a general-purpose self-modifying runtime.
This repository is prepared for public publication:
- secrets are not stored in source control;
- local build output is ignored;
- machine-specific files are ignored;
- the committed experiment workspace is a trimmed sample, not a full private run history.
If you run the experiment locally, configure credentials through user secrets or environment variables.
- .NET 10 SDK
- Windows PowerShell or PowerShell 7
- an OpenAI API key
Preferred for local development:
dotnet user-secrets set "OpenAI:ApiKey" "<your_key>" --project .\OpenAiProbe\OpenAiProbe.csprojOptional settings:
dotnet user-secrets set "OpenAI:Model" "gpt-4.1-mini" --project .\OpenAiProbe\OpenAiProbe.csproj
dotnet user-secrets set "OpenAI:WorkspacePath" ".\experiments\local\anima" --project .\OpenAiProbe\OpenAiProbe.csproj
dotnet user-secrets set "OpenAI:DelaySeconds" "5" --project .\OpenAiProbe\OpenAiProbe.csprojEnvironment variable fallback:
$env:OPENAI_API_KEY = "<your_key>"
$env:OPENAI_MODEL = "gpt-4.1-mini"
$env:OPENAI_WORKSPACE = ".\experiments\local\anima"
$env:OPENAI_DELAY_SECONDS = "5".\scripts\Run-AnimaLoop.ps1Optional parameters:
-Workspace .\experiments\local\anima-Model gpt-4.1-mini-PauseSeconds 5
The default workspace is intentionally outside the committed sample so ordinary local runs do not dirty the repository. The PowerShell loop invokes one generation at a time. The app exits with code 10 when continuation is requested; any other exit code stops the loop.
To inspect the committed public sample, read experiments/anima/. Only point the runner at that path if you intentionally want to mutate the sample.
.\scripts\Run-SampleLoop.ps1This script exists for explicit demo use. It targets experiments/anima/ on purpose and may modify tracked files in the committed sample workspace.
dotnet run --project .\OpenAiProbe -- --workspace .\experiments\local\anima --steps 1Optional arguments:
--model <model>--workspace <path>--steps <number|infinite>--delay-seconds <number>
Each experiment workspace uses this structure:
prompt.md: mutable instruction set for future generationsgoal.md: mutable long-horizon goaljournal.md: cumulative journal across generationsartifacts/: text artifacts created by the modelgenerations/001,generations/002, ...: raw request and response snapshots
Each generation directory stores:
request.jsonresponse.jsonoutput.txtdecision.jsonsummary.txt
The committed sample keeps only a single curated generation so the repository stays readable in public while still showing the full on-disk format.
For actual local experimentation, use a workspace under experiments/local/, which is ignored by git.
- The app reads the current prompt, goal, journal tail, artifact list, and recent summaries.
- It sends that state to the OpenAI Responses API together with a fixed system prompt.
- It expects structured JSON describing the next generation's contribution.
- It writes the resulting snapshots and updates the workspace.
- The agent does not execute shell commands.
- The agent does not modify the runner source code.
- The agent can only write inside the configured experiment workspace.
- Generated artifact names are sanitized to safe text filenames.
Those constraints are intentional. The goal is to study continuity, iteration, and self-revision through persisted text state rather than unrestricted tool use.
MIT. See LICENSE.
See CONTRIBUTING.md for local setup, change scope, and repository hygiene rules.
Do not open public issues with credentials, request payloads that contain secrets, or private experiment data. See SECURITY.md.