Skip to content

Commit c931a90

Browse files
Improve agent notebook project ergonomics
1 parent e580feb commit c931a90

9 files changed

Lines changed: 337 additions & 879 deletions

File tree

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ Current provider support:
208208
- OpenAI through `wellplot.agent`
209209
- OpenAI-compatible endpoints through `provider="openai_compat"` plus
210210
`base_url=...`
211+
- local Ollama through `provider="ollama"` with a default
212+
`http://localhost:11434/v1` base URL
211213

212214
Recommended credential setup:
213215
- prefer `OPENAI_API_KEY` in the shell for OpenAI sessions
@@ -218,6 +220,8 @@ Recommended credential setup:
218220
secret that stays out of version control without editing notebook cells
219221
- loopback OpenAI-compatible endpoints such as `http://localhost:11434/v1`
220222
receive an automatic placeholder token when no key is configured
223+
- `provider="ollama"` is a notebook-facing convenience alias over the same
224+
OpenAI-compatible backend and automatically uses the loopback base URL above
221225

222226
The main entry points are:
223227
- `from wellplot.agent import AuthoringSession`
@@ -230,6 +234,8 @@ The main entry points are:
230234
Notebook-facing project helpers:
231235
- `create_project_session(...)` to bootstrap one reusable project-scoped agent session
232236
- `session.add_data_file(...)` to stage LAS or DLIS sources into the project folder
237+
- `session.bootstrap_starter(...)` to stage data, configure default draft/render
238+
paths, and materialize one starter scaffold in one call
233239
- `session.create_starter(...)` to generate one starter template/logfile pair from a shipped preset
234240
- `session.configure_rounds(...)` and `session.configure_paths(...)` to keep later notebook cells short
235241

@@ -368,7 +374,7 @@ Current examples:
368374
- [examples/notebooks/user/agent_las_step_by_step.ipynb](examples/notebooks/user/agent_las_step_by_step.ipynb)
369375
- credentialed end-user walkthrough that bootstraps a project session,
370376
stages a user LAS file, generates a reusable starter scaffold through
371-
`session.create_starter(...)`, and adds header, remarks, tracks, and
377+
`session.bootstrap_starter(...)`, and adds header, remarks, tracks, and
372378
bindings one step at a time through `wellplot.agent`
373379
- working first-pass agent workflow: functional, but intentionally less
374380
curated than the deterministic production notebooks and may still need

docs/site/guides/example-7-agent-las-step-by-step.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ The flow is:
2828
The notebook uses these public APIs directly:
2929

3030
- `create_project_session(...)`
31-
- `session.add_data_file(...)`
32-
- `session.create_starter(...)`
31+
- `session.bootstrap_starter(...)`
3332
- `await session.run(...)`
3433
- `await session.revise(...)`
3534
- `await session.render_logfile_to_file(...)`
@@ -80,14 +79,17 @@ That is why it lives in the `user/` notebook set but remains unexecuted in git.
8079
Start with the default copied LAS file once so the full workflow is known to
8180
work in your environment.
8281

83-
Then point `session.add_data_file(...)` at your own LAS file so the project
84-
folder gets a staged `user_input.las` before rerunning from the top.
82+
Then point `session.bootstrap_starter(...)` at your own LAS file so the project
83+
folder gets a staged `user_input.las`, refreshed starter files, and the same
84+
default draft/render targets before rerunning from the top.
8585

8686
The starter scaffold step is intentionally higher level than the YAML-first
8787
user notebooks. Instead of hand-writing the full template and starter logfile
88-
schema in the notebook, this walkthrough uses `session.create_starter(...)` to
89-
materialize the same files from a shipped preset, then shows the generated YAML
90-
so the user can still inspect what the agent will revise.
88+
schema in the notebook, this walkthrough uses
89+
`session.bootstrap_starter(...)` to stage the data source, configure the
90+
project defaults, materialize the same files from a shipped preset, and then
91+
show the generated YAML so the user can still inspect what the agent will
92+
revise.
9193

9294
The safest iteration pattern is:
9395

docs/site/guides/examples.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ The examples are grouped by workflow rather than by isolated feature.
100100
developer notebook set
101101
- `examples/notebooks/user/agent_las_step_by_step.ipynb`
102102
- detailed user walkthrough that bootstraps a reusable project session with
103-
`create_project_session(...)`, stages a LAS file, generates a starter
104-
scaffold through `session.create_starter(...)`, and adds header, remarks,
105-
tracks, and bindings one step at a time through `wellplot.agent`
103+
`create_project_session(...)`, stages a LAS file and starter scaffold
104+
through `session.bootstrap_starter(...)`, and adds header, remarks, tracks,
105+
and bindings one step at a time through `wellplot.agent`
106106
- manual and credentialed: requires `wellplot[agent,notebook,las]` plus an
107107
OpenAI API key at runtime
108108
- working first-pass notebook: expect to tune prompts, model choice, and

docs/site/installation.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ Current provider support:
9696
- OpenAI
9797
- OpenAI-compatible endpoints through `provider="openai_compat"` plus
9898
`base_url=...`
99+
- local Ollama through `provider="ollama"` with a default
100+
`http://localhost:11434/v1` base URL
99101

100102
Credential guidance:
101103

@@ -108,6 +110,8 @@ Credential guidance:
108110
- for loopback-compatible endpoints such as `http://localhost:11434/v1`,
109111
`wellplot.agent` injects a placeholder token automatically when no key is
110112
configured
113+
- `provider="ollama"` is a notebook-facing convenience alias over the same
114+
OpenAI-compatible backend and automatically uses that loopback base URL
111115

112116
## Verify The Install
113117

docs/site/workflows/mcp-workflow.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Current `wellplot.agent` provider support:
2323
- OpenAI
2424
- OpenAI-compatible endpoints through `provider="openai_compat"` plus
2525
`base_url=...`
26+
- local Ollama through `provider="ollama"` with a default
27+
`http://localhost:11434/v1` base URL
2628

2729
## Agent Credentials
2830

@@ -49,6 +51,8 @@ Guidance:
4951
- for `provider="openai_compat"`, loopback endpoints such as
5052
`http://localhost:11434/v1` receive an automatic placeholder token when no
5153
key is configured
54+
- `provider="ollama"` is a notebook-facing convenience alias over the same
55+
OpenAI-compatible backend and automatically uses that loopback base URL
5256
- non-loopback OpenAI-compatible endpoints still require a real key through
5357
`api_key=...`, `OPENAI_COMPAT_API_KEY`, `OPENAI_API_KEY`, or `.env.local`
5458

0 commit comments

Comments
 (0)