Local-first research notes with an agent-assisted project workspace.
This project was developed with substantial AI assistance and prioritizes functionality over software engineering rigor. The code may contain errors, insecure assumptions, or unexpected behavior. Review and test it carefully before using it with important data or in a production environment.
This tool is expected to be run locally in environments with no access to highly sensitive data. While it uses Web technologies for maximum portability, it should never be exposed over the Internet.
It is the user's responsibility to ensure that their agent set-up is adequately sandboxed. The developers of the tool are not responsible for any unwanted or undesirable behaviour of the tool or of the AI agent.
python -m pip install -r requirements.txt
python -m streamlit run app.pyUse a custom notebook folder:
python -m streamlit run app.py -- --notebook ./my-notebookUse a custom automatic commit inactivity period:
python -m streamlit run app.py -- --autocommit-seconds 600Use a custom researcher tools folder:
python -m streamlit run app.py -- --tools ./my-toolsThe tools folder can contain SKILL.md describing available researcher-specific commands, such as cluster, cloud, or wandb helpers.
Each project can also contain its own SKILL.md for project-specific guidance on how to use those tools.
The active note can define reusable agent actions. Actions are parsed locally with
markdown-it-py and appear in the selector beside the agent prompt.
```action
name: Compare validation accuracy
Retrieve the relevant results.
Plot the comparison.
Add the results to this note.
```The action body can be run by itself or combined with an additional prompt. In the preview, a bolt button above each action block selects that action in the pinned agent controls without running it immediately.
Generated images belong in the selected project's assets/ directory and can be
embedded in notes with project-relative Markdown:
The preview resolves supported local image links only within that project's
assets/ directory.
The app uses an agent abstraction in lightacademia/agents.py.
The agent instructions are stored in AGENT_PROMPT.md. Review this file before
using the app and adjust its rules for your environment and risk tolerance. Keep
the {{project_name}}, {{project_dir}}, {{tools_dir}}, {{tools_root}},
{{current_note}}, and {{user_prompt}} placeholders where their runtime values
should be inserted.
Select the agent implementation at startup:
python -m streamlit run app.py -- --agent codex
python -m streamlit run app.py -- --agent claudeThe default implementation uses the Codex CLI:
- Runs
codex exec - Uses
codex exec --jsonto stream detailed progress into the pinned agent section - Displays Codex events directly without a separate summarization model call
- Uses the selected project as the working root
- Adds a temporary copy of the configured tools folder as an auxiliary workspace
- Uses
workspace-writesandboxing - Enables outbound network access for commands inside the Codex workspace-write sandbox
- Tells Codex to write derived outputs under
data/and scratch scripts undercode/ - Tells Codex to read project-level
SKILL.mdwhen present - Tells Codex to read and run tools from the configured tools folder
- Prevents Codex from editing the configured tools folder by exposing only a temporary copy
- Tells Codex not to access folders outside the selected project and tools folder
- Tells Codex not to download or install software from the Internet
- Tells Codex to interact with compute clusters only through configured tools
- Tells Codex not to run git commands
- Leaves git checkpoints and commits to the application
- Uses
[agent]-prefixed commit messages for commits created after agent actions
Claude Code CLI support is also available with --agent claude:
- Runs
claude --print --output-format stream-json --verbose - Uses the selected project as the working root
- Adds a temporary copy of the configured tools folder with
--add-dir - Uses
acceptEditspermission mode and allows common file/shell tools - Streams Claude JSON events into the same pinned agent progress section