pinecall docs
Push documents into a base and attach it to the agent.
pinecall docs push [dir] [--base <name>] [--agent <name>] [--file agent.tsx]
pinecall docs list
pinecall docs drop <base>
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
The documents a turn searches — the RAG, and only that. push reads every *.md under the
directory — a local docs/<name>/ of the agent when none is named, never tracked by the
repository — and sends the folder whole to
PUT /v1/knowledge/<base>: the base is replaced, never merged, so a push after documents were
added in the console's Knowledge ▸ Docs takes them out. It starts a base; the console keeps it. 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 replaces 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 · 41 chunks · 812 ms # base · sent · became · took
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.
$ pinecall docs attach clinica-norte --k 4
clinica-norte · clinica-norte attached · your corner v4
$ pinecall docs attached
clinica-norte · read by 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: 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 — test/<name>/goldens/docs.json, a JSON list of
{asks, expects}, where expects is the heading path the answer should carry — 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.