pinecall docs
Push documents into a base and attach it to the agent.
pinecall docs list
pinecall docs drop <base> [--yes]
pinecall docs push [dir] [--base <name>] [--language <code>] [--replace] [--agent <name>] [--file agent.tsx]
pinecall docs pull [dir] [--base <name>] [--agent <name>] [--file agent.tsx]
pinecall docs rm <path> [--base <name>] [--agent <slug>]
pinecall docs eval [docs.json] [--base <name>] [--k <n>] [--agent <name>] [--file agent.tsx]
pinecall docs attach <base> [--k <n>] [--mode retrieved|tool] [--min-score <x>] [--agent <slug>] [--team]
pinecall docs detach <base> [--agent <slug>] [--team]
pinecall docs attached
… and any of them with --prod, in production
attach names a base the env has (pinecall docs list lists them): one it has not is refused with
exit 2, naming the push that would write it. drop takes a base, its files and its chunks out for
good, so on a terminal it asks once, and without one it does nothing until --yes says so.
The documents a turn searches — the RAG, and only that. The folder is a checkout of the
base. push reads every *.md under the directory — the agent's own agents/<name>/docs/ when
none is named, which new and generate agent write with a README and the repository tracks like
the rest of the agent's folder — and writes them into PUT /v1/knowledge/<base> by path: a file
the folder has is written, cut and embedded again only where it changed; a file the base has and the
folder has not is kept, so a document added in the console's Knowledge ▸ Docs survives the next push.
--replace makes the base the folder, as a push did before: what the folder has not is dropped. The
README.md at the folder's root is never sent — it describes the folder, not the business, and the
agent template ships one — and the push's line says so when one stayed behind. pull brings the
base back into the folder, one line per file: written, unchanged, or a file of the folder the
base has not, not in the base (kept) and never deleted — so what a manager wrote in the console
reaches the repository with the next commit. rm <path> takes one file out of the base, by the path
a push sent it under; a path the base has not is the gateway's 404, said as it is. At a project's root
with nothing typed, push and eval act on every agent that has documents or a golden, and name the
rest. The base is the agent's slug unless --base says otherwise. What the agent knows by heart
is not a document and is never pushed: it is pinecall agent knowledge.
The base you push is the environment's the command runs in. A push from a laptop writes the sandbox
base — what your own pinecall start answers from — and never the one the telephone answers from.
Production's is the same push with --prod, made in the release step of a deploy like a migration,
by the server's token or by a person whose switch is on (Production). list
and drop read the same environment.
$ pinecall docs push
clinica-norte · 7 files · 1 kept · 41 chunks · spanish · 812 ms # base · files sent · base's others left as they were · chunks of the files sent · stemmed in · took
$ pinecall docs pull
agents/clinica-norte/docs/horarios.md unchanged
agents/clinica-norte/docs/seguros.md written
agents/clinica-norte/docs/borrador.md not in the base (kept)
$ pinecall docs rm precios-2024.md
precios-2024.md gone from clinica-norte
· 1 kept is the file of the base the push did not touch — the one the console added — and
· README.md skipped closes the line when the folder's README stayed behind. The line counts what the push
sent: its files and the chunks they were cut into, so with a file kept it adds up to less than docs list,
which counts the whole base.
The questions a section answers travel with it. An HTML comment is never a chunk — a note to the
author stays the author's — but one is read: <!-- asks … --> under a heading, the questions that
section answers, one a line, invisible wherever the file is rendered. Each is indexed beside the
section in a caller's own words and counts as a chunk of the quota
(knowledge-bases.md).
The base speaks a language. Its words are stemmed with that language's rules, so a caller's
sábados finds sábado and an English reader's supervise finds supervising. --language says it
(en, es, pt, fr, de, it, nl, or the configuration's name); left out, the gateway counts
it from the files' own function words, and a folder that says none clearly — tables, names — is
indexed with no stemming at all: the push's line says so and how to say one (no language counted from the files, so no stemming: say it with --language <code>). list shows each base's.
attach says an agent reads a base. It is one field of the agent's settings (bases),
written as the next version of the corner — yours, the team's with --team, production's with
--prod — with how a turn reads it: --k chunks, --mode (retrieved: the platform searches
before the turn and hands the model what it found; tool: the model decides when to search),
--min-score. A base attached twice is replaced, not doubled. detach takes it out, and taking
the last one out leaves an empty list rather than no field at all: this corner reads no base, and
the agent does not fall back to the team's. attached prints which agents read which base in the
environment asked. For an app written as code, set by its code, attach and detach are refused naming it.
$ pinecall docs attach clinica-norte --k 4
clinica-norte · clinica-norte attached · your corner v4
$ pinecall docs attached
BASE READ BY
clinica-norte clinica-norte
Several bases are one search, not several. An agent that reads three collections has them
searched together on every turn — one query, one ranking over all of them — so a collection with
nothing to say about the question takes none of the turn's chunks. --k is how many chunks the
turn is handed (the most generous of the attachments), and --min-score is read against the base
that set it. The log's docs.sources names the base each chunk came from.
The class reaches the base from inside a tool, and nowhere else: await this.knowledge.search("horarios", { k: 3 }) asks the gateway for the best chunks of the bases the
environment attached, for these words (Writing an agent). Which base is the
environment's to say, so a class that searches and registers in an environment where nothing is attached is
refused at registration, the agent's process printing the gateway's code before its words: bad_shape: clinica-norte searches its bases, and none is attached to it in sandbox: pinecall docs attach <base> --agent clinica-norte. A base attached and never pushed is refused
the same way, naming pinecall docs push.
eval asks the base every question of a golden — agents/<name>/test/goldens/docs.json, a JSON list of
{asks, expects}, where expects is the heading path the answer should carry, or a list of paths
any of which does — and prints
recall@k and nDCG@10, computed by code with no model in the loop, plus every question it
missed and what came back instead. With no --k it asks with the k this agent reads that base
with — the attachment's, in this corner — because a golden asks what a turn gets: a base
attached with --k 4 measured at the endpoint's default of eight answers a question nobody's calls
are asking. Exits 1 when anything missed, so CI can hold a base to it. A
golden is fixed and the index is the variable: never soften a question so a change can pass.