getctx.sh

Read the page. Skip the rest.

Any URL, PDF or GitHub file, returned as clean Markdown. When a page is longer than your agent's budget, it arrives as a table of contents with section markers. The agent opens the section it needs, and every turn after that is free.

agent sessionbudget 8k tokens
you
Why is my loaf so dense? The guide I follow is at fieldnotes.example/sourdough.
readfieldnotes.example/sourdoughcharged
getctx
The page is 61,400 tokens, past your 8,000 budget. Here is its table of contents with section markers instead.
agent
Dense crumb is usually fermentation. Reading §4.
turn§4 Bulk fermentationfree
turn§7 Troubleshootingfree
agent
Your kitchen is cool, so a four-hour bulk ferment is too short. Give it six, until the dough has risen by half.
fieldnotes.example/sourdough
The Long Guide to Sourdough
page 61.4k
budget 8k

§7 Troubleshooting

Dense and gummy: under-fermented, or cut while hot. Flat and sour: over-fermented. Pale crust: not enough heat or steam.

page read 1turns 2 · cost 0
§ sources three doors

Whatever the link points at.

Hand read a link. It works out what's behind it and returns the same thing every time: Markdown, with headings intact and the clutter gone.

web page

Articles, docs, product pages

Scripts, styles and page furniture stripped; a page that needs a browser gets one. Headings, lists, tables, code and links kept.

pdf

Papers, reports, manuals

A link to a PDF, Word or spreadsheet file reads like any page: converted to Markdown, a long one folded at its headings.

github

READMEs, source, issues

Point at a file or a repository on GitHub and get it back clean; an issue or pull request reads as one conversation.

§ anatomy of a fold

How a long page becomes a short one.

The agent states a budget, or uses the default of 8k tokens. getctx does the measuring so the agent never swallows a page it can't hold.

  1. Fetch and cleanThe page is fetched and reduced to its content as Markdown.
  2. MeasureThe Markdown is counted against the agent’s budget. If it fits, it’s returned whole.
  3. FoldIf it doesn’t fit, the agent receives the table of contents: each section with a marker and its size.
  4. TurnThe agent asks for a section by its marker. Then another, if it needs to. Turning is free.
§ why it matters

Context is the scarce thing. Spend it on answers.

01

Smaller windows stay sharp

An agent holding one relevant section reasons better than one holding a whole site’s worth of markup.

02

Pay once per page

The read is charged once. Reading three more sections of the same page costs nothing at all.

03

The price is on the label

A fresh read costs 1–2 credits, and your agent can see that before making it, from the free status call.

Give your agent a table of contents.

Create a key, check the price list for free, then top up from $5.