Expand description
What the model is told before the conversation: who it is working for, where, and with
which tools, followed by the folder’s own AGENTS.md when it has one.
Constants§
- AGENTS_
FILE - The name of the file a folder keeps its instructions for coding agents in.
- REQUEST_
CAP - The most a request may be, in bytes: the conversation, the system prompt and the tools together. Four bytes to a token is a good rough count of plain text, so this is about sixty five thousand tokens of input, which fits a hundred and twenty eight thousand token context with this crate’s reply still allowed. A real conversation is far below it, so a normal day is sent byte for byte as it always was; a morning of work in a real folder is not, and without a limit that size is paid for again on every single turn, and a provider that refuses a request too long says so only in an error in the corner.
Functions§
- agents
- The folder’s
AGENTS.md, when it has one that can be read as text. - body
- The body of the next request: the conversation as far back as
REQUEST_CAPallows, the system prompt and the tools. - body_
within - The body of a request that is at most
capbytes: the conversation trimmed to what is left ofcaponce the rest of the body is counted in, that rest, and nothing else.bodyis this withREQUEST_CAP; a cap ofusize::MAXsends the conversation as it is kept, which is what the trimmed request is measured against. - system
- The system prompt for work in
root.