@pinecall/skills 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/README.md +65 -0
  2. package/build.mjs +204 -0
  3. package/package.json +29 -0
  4. package/skills/pinecall-concepts/SKILL.md +41 -0
  5. package/skills/pinecall-concepts/references/concepts/agents-and-channels.md +155 -0
  6. package/skills/pinecall-concepts/references/concepts/deployment-topologies.md +120 -0
  7. package/skills/pinecall-concepts/references/concepts/hot-reload.md +119 -0
  8. package/skills/pinecall-concepts/references/concepts/philosophy.md +100 -0
  9. package/skills/pinecall-concepts/references/concepts/server-vs-client-llm.md +119 -0
  10. package/skills/pinecall-examples/SKILL.md +59 -0
  11. package/skills/pinecall-examples/references/examples/browser-widget.md +206 -0
  12. package/skills/pinecall-examples/references/examples/chat-bot.md +184 -0
  13. package/skills/pinecall-examples/references/examples/headless-agent.md +121 -0
  14. package/skills/pinecall-examples/references/examples/index.md +183 -0
  15. package/skills/pinecall-examples/references/examples/multi-channel-bot.md +173 -0
  16. package/skills/pinecall-examples/references/examples/outbound-dispatch.md +109 -0
  17. package/skills/pinecall-examples/references/examples/turn-detection.md +150 -0
  18. package/skills/pinecall-guides/SKILL.md +68 -0
  19. package/skills/pinecall-guides/references/guides/call-ringing.md +149 -0
  20. package/skills/pinecall-guides/references/guides/conversation-history.md +377 -0
  21. package/skills/pinecall-guides/references/guides/dev-mode.md +130 -0
  22. package/skills/pinecall-guides/references/guides/events.md +677 -0
  23. package/skills/pinecall-guides/references/guides/human-takeover.md +184 -0
  24. package/skills/pinecall-guides/references/guides/inbound-voice.md +201 -0
  25. package/skills/pinecall-guides/references/guides/knowledge-bases.md +166 -0
  26. package/skills/pinecall-guides/references/guides/live-listening.md +199 -0
  27. package/skills/pinecall-guides/references/guides/multi-tenant.md +158 -0
  28. package/skills/pinecall-guides/references/guides/outbound-calls.md +279 -0
  29. package/skills/pinecall-guides/references/guides/sse-streaming.md +207 -0
  30. package/skills/pinecall-guides/references/guides/testing-agents.md +272 -0
  31. package/skills/pinecall-guides/references/guides/tools-and-functions.md +254 -0
  32. package/skills/pinecall-guides/references/guides/webrtc-browser.md +200 -0
  33. package/skills/pinecall-guides/references/guides/whatsapp.md +370 -0
  34. package/skills/pinecall-guides/references/guides/ws-streaming.md +235 -0
  35. package/skills/pinecall-quickstart/SKILL.md +54 -0
  36. package/skills/pinecall-quickstart/references/index.md +123 -0
  37. package/skills/pinecall-quickstart/references/quickstart.md +185 -0
  38. package/skills/pinecall-reference/SKILL.md +43 -0
  39. package/skills/pinecall-reference/references/reference/cli.md +578 -0
  40. package/skills/pinecall-reference/references/reference/events.md +366 -0
  41. package/skills/pinecall-reference/references/reference/llm-providers.md +263 -0
  42. package/skills/pinecall-reference/references/reference/rest-api.md +122 -0
  43. package/skills/pinecall-reference/references/reference/session-limits.md +119 -0
  44. package/skills/pinecall-reference/references/reference/stt-providers.md +174 -0
  45. package/skills/pinecall-reference/references/reference/tts-providers.md +149 -0
  46. package/skills/pinecall-sdk-api/SKILL.md +56 -0
  47. package/skills/pinecall-sdk-api/references/api/agent.md +328 -0
  48. package/skills/pinecall-sdk-api/references/api/call.md +324 -0
  49. package/skills/pinecall-sdk-api/references/api/pinecall.md +186 -0
  50. package/skills/pinecall-sdk-api/references/api/reply-stream.md +148 -0
  51. package/skills/pinecall-security/SKILL.md +37 -0
  52. package/skills/pinecall-security/references/security.md +138 -0
  53. package/skills/pinecall-web-chat/SKILL.md +38 -0
  54. package/skills/pinecall-web-chat/references/web/chat/chat-session.md +178 -0
  55. package/skills/pinecall-web-chat/references/web/chat/overview.md +98 -0
  56. package/skills/pinecall-web-components/SKILL.md +37 -0
  57. package/skills/pinecall-web-components/references/web/components/overview.md +128 -0
  58. package/skills/pinecall-web-voice/SKILL.md +40 -0
  59. package/skills/pinecall-web-voice/references/web/core/datachannel-protocol.md +149 -0
  60. package/skills/pinecall-web-voice/references/web/core/overview.md +70 -0
  61. package/skills/pinecall-web-voice/references/web/core/state-and-phases.md +153 -0
  62. package/skills/pinecall-web-voice/references/web/core/voice-session.md +279 -0
  63. package/skills/pinecall-web-widget/SKILL.md +41 -0
  64. package/skills/pinecall-web-widget/references/web/widget/overview.md +67 -0
  65. package/skills/pinecall-web-widget/references/web/widget/props.md +291 -0
  66. package/skills/pinecall-web-widget/references/web/widget/theming.md +131 -0
  67. package/skills/pinecall-web-widget/references/web/widget/tools-api.md +381 -0
  68. package/skills/pinecall-web-widget/references/web/widget/use-voice-session-hook.md +130 -0
@@ -0,0 +1,578 @@
1
+ ---
2
+ title: "CLI"
3
+ description: "Inspect agents, chat, test with specs, browse voices, and manage billing from the terminal."
4
+ ---
5
+
6
+ The `pinecall` CLI is built into `@pinecall/sdk` — no extra package needed. It lets you inspect your live Pinecall environment and interact with agents from the terminal.
7
+
8
+ ## Installation
9
+
10
+ The CLI ships with the SDK. Install globally:
11
+
12
+ ```bash
13
+ npm install -g @pinecall/sdk
14
+ ```
15
+
16
+ Or if you have the SDK linked locally:
17
+
18
+ ```bash
19
+ cd sdk && npm run build && npm link
20
+ ```
21
+
22
+ ## Authentication
23
+
24
+ The CLI requires a Pinecall API key. Set it via environment variable or flag:
25
+
26
+ ```bash
27
+ # Environment variable (recommended)
28
+ export PINECALL_API_KEY="pk_your_key_here"
29
+
30
+ # Or per-command flag
31
+ pinecall agents --api-key=pk_your_key_here
32
+ ```
33
+
34
+ You can also override the server URL:
35
+
36
+ ```bash
37
+ # Environment variable
38
+ export PINECALL_URL="http://localhost:1337"
39
+
40
+ # Or per-command flag
41
+ pinecall agents --server=http://localhost:1337
42
+ ```
43
+
44
+ ## Commands
45
+
46
+ Every command at a glance (run `pinecall --help` for the same list):
47
+
48
+ | Command | What it does |
49
+ |---------|--------------|
50
+ | `pinecall run <file>` | Run an agent file with a live terminal display |
51
+ | `pinecall agents` | List currently-connected agents |
52
+ | `pinecall kick <agent>` | Force-disconnect an agent by slug |
53
+ | `pinecall chat [agent]` | Interactive text chat with a connected agent |
54
+ | `pinecall test <path>` | Run agent specs (text or real-voice mode) |
55
+ | `pinecall phones` | List phone numbers |
56
+ | `pinecall phone request` / `search` | Provision / search managed numbers |
57
+ | `pinecall voices` | List TTS voices (`voices play` to preview) |
58
+ | `pinecall calls` | Call history (duration, credits, cost) |
59
+ | `pinecall conversations` | List saved conversation transcripts (`conversations get <id>` for one) |
60
+ | `pinecall usage` | Credit usage breakdown (alias of `account usage`) |
61
+ | `pinecall balance` | Current credit balance |
62
+ | `pinecall knowledge …` | Manage knowledge bases (list/create/docs/push/get/query/reindex/rm/delete) |
63
+ | `pinecall account` | Org overview; `account keys`, `account usage` |
64
+ | `pinecall twilio …` | Linked Twilio accounts (link/import/unlink) |
65
+ | `pinecall signup` | Create a new organization |
66
+
67
+ **Global flags:** `--api-key=pk_…`, `--server=URL`, `--playground=URL`, `--json`, `-h/--help`, `-v/--version`.
68
+
69
+ ### `pinecall run <file>`
70
+
71
+ Run an agent file with a polished terminal display. The primary way to develop and test agents.
72
+
73
+ ```bash
74
+ pinecall run agent/index.ts
75
+ pinecall run agent/index.js
76
+ ```
77
+
78
+ ```
79
+ ⚡ booting pines · gpt-5-chat-latest · cartesia/sonic
80
+ ⚙ tools: checkAvailability, makeReservation, cancelReservation
81
+ ☎ listening on +14155550177 …
82
+
83
+ ☎ incoming call — connecting…
84
+ caller › Hey, I'd like to reserve a table for Friday.
85
+ pines › Of course! How many guests?
86
+ ⚡ checkAvailability({ date: "2026-06-13", time: "19:00", partySize: 2 })
87
+ → available · window seat · 1.5 hours
88
+ ```
89
+
90
+ Uses `tsx` for `.ts` files, `node` for `.js`. Sets `PINECALL_CLI_RUN=1` which triggers the SDK's built-in runner display (boot banner, live transcript, tool call formatting). The agent file needs zero changes — `pinecall run` just adds the pretty output.
91
+
92
+ > **Convention:** Agent code lives in `agent/index.ts` (or `.js`), tools in `agent/tools.ts`. Export the agent: `export const agent = pc.agent(...)`.
93
+
94
+ ### `pinecall agents`
95
+
96
+ List all currently connected agents with their phone numbers and channel types.
97
+
98
+ ```bash
99
+ pinecall agents
100
+ ```
101
+
102
+ ```
103
+ Agent Phones Channels
104
+ ──────────── ──────────── ─────────────────────────────
105
+ florencia +13186330963 phone, webrtc, chat, whatsapp
106
+ clara +14258423349 phone, webrtc, chat
107
+ mara +17438373786 webrtc, phone
108
+
109
+ 3 agents connected
110
+ ```
111
+
112
+ > **Note:** This shows **live in-memory state** — only agents that are currently connected to the voice server appear here.
113
+
114
+ ### `pinecall kick <agent>`
115
+
116
+ Force-disconnect an agent by slug. Useful when an agent process crashed or was killed without cleanly disconnecting, leaving a stale registration that blocks new connections.
117
+
118
+ ```bash
119
+ pinecall kick pines
120
+ ```
121
+
122
+ ```
123
+ ⚡ pines disconnected
124
+ ```
125
+
126
+ **Why you need this:** The server protects production agents from accidental displacement — if you try to connect a new agent with the same slug while the old one is still alive, the new connection is **rejected** with an `AGENT_CONFLICT` error. Use `pinecall kick` to remove the old registration first.
127
+
128
+ ```
129
+ ✗ Agent "pines" is already connected.
130
+ Run pinecall kick pines to force disconnect.
131
+ ```
132
+
133
+ > **Note:** `kick` sends a `agent.displaced` event to the old agent's WebSocket before unregistering it. If the process is still running, it will receive the event and can handle cleanup.
134
+
135
+ ### `pinecall phones`
136
+
137
+ List phone numbers from your organization. Merges two sources:
138
+ - **db** — numbers registered in the Pinecall database
139
+ - **live** — numbers claimed by currently connected agents
140
+
141
+ ```bash
142
+ pinecall phones
143
+ ```
144
+
145
+ ```
146
+ Phone Name Agent Source
147
+ ──────────── ────────────── ───────────── ──────
148
+ +13186330963 (318) 633-0963 florencia db
149
+ +14258423349 (425) 842-3349 clara db
150
+ +13049709763 (304) 970-9763 — (available) db
151
+ +17438373786 — mara live
152
+
153
+ 4 phone numbers (3 db, 1 live), 1 available
154
+ ```
155
+
156
+ ### `pinecall voices`
157
+
158
+ Browse available TTS voices. Without flags, shows a discovery overview.
159
+
160
+ ```bash
161
+ pinecall voices
162
+ ```
163
+
164
+ ```
165
+ Voice Catalog
166
+
167
+ Provider Voices Languages
168
+ ────────── ────── ─────────────────────────
169
+ elevenlabs 142 ar, cs, el, en, es, hi, it, pt
170
+ cartesia 100 ar, de, en, es, fr, ko, pt, sv
171
+
172
+ Usage
173
+
174
+ $ pinecall voices --provider=elevenlabs
175
+ $ pinecall voices --provider=elevenlabs --language=es
176
+ $ pinecall voices play elevenlabs/sarah
177
+
178
+ In your agent: voice: "elevenlabs/sarah"
179
+ ```
180
+
181
+ #### Listing voices
182
+
183
+ Use `--provider` and `--language` to filter:
184
+
185
+ ```bash
186
+ pinecall voices --provider=elevenlabs --language=es
187
+ ```
188
+
189
+ ```
190
+ elevenlabs voices (es)
191
+
192
+ Voice Description Lang
193
+ ─ ───── ─────────── ────
194
+ ♂ elevenlabs/agustin Conversational & Relaxed es
195
+ ♂ elevenlabs/antonio Confident Conversational… es
196
+ ♀ elevenlabs/carolina Spanish woman es
197
+ ♀ elevenlabs/daniela Young and Talkative es
198
+ ♀ elevenlabs/fran Fresh & Upbeat es
199
+ ...
200
+
201
+ 41 voices · pinecall voices play <voice>
202
+ ```
203
+
204
+ #### Playing voice previews
205
+
206
+ Preview any voice directly in the terminal:
207
+
208
+ ```bash
209
+ pinecall voices play elevenlabs/sarah
210
+ ```
211
+
212
+ ```
213
+ ▶ elevenlabs/sarah
214
+ Sarah - Mature, Reassuring, Confident
215
+ ♀ female · en · Mature, Reassuring, Confident
216
+
217
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.5s
218
+
219
+ Use in your agent: voice: "elevenlabs/sarah"
220
+ ```
221
+
222
+ The audio plays through your system speakers with a real-time progress bar. Works on macOS (afplay) and Linux (mpv).
223
+
224
+ ### `pinecall chat [agent]`
225
+
226
+ Interactive text chat with a connected agent. Uses the same LLM + tools as a voice call, but over text.
227
+
228
+ ```bash
229
+ # Chat with a specific agent
230
+ pinecall chat mara
231
+
232
+ # If no agent specified, lists available agents to pick from
233
+ pinecall chat
234
+ ```
235
+
236
+ ```
237
+ ⚡ Connected to mara
238
+
239
+ you › Book me a haircut for friday
240
+ mara › Let me check available slots...
241
+ ┌ tool: findSlots({"date":"2026-06-06"})
242
+ └ {"available":["10:00","14:00","16:30"]}
243
+ mara › I found 3 available slots: 10am, 2pm, and 4:30pm. Which works?
244
+
245
+ you › 2pm
246
+ mara › Booked! Haircut for Friday at 2pm.
247
+ ┌ tool: bookAppointment({"date":"2026-06-06","time":"14:00","service":"haircut"})
248
+ └ {"confirmed":true,"bookingId":"bk_abc123"}
249
+ ```
250
+
251
+ #### Slash commands
252
+
253
+ | Command | Action |
254
+ |---------|--------|
255
+ | `/reset` | Start a new conversation (clears history) |
256
+ | `/clear` | Clear the screen |
257
+ | `/quit` | Exit chat |
258
+
259
+ > **Note:** The agent must be connected (shown in `pinecall agents`) for chat to work. The chat uses the same prompt, tools, and model configuration as the deployed agent.
260
+
261
+ ### `pinecall test <path>`
262
+
263
+ Run YAML-based agent specs. A **judge LLM** (Haiku by default) converses with your agent following a workflow you define, then reports pass/fail via tool calls.
264
+
265
+ ```bash
266
+ # Run all specs in a directory
267
+ pinecall test agent/specs/
268
+
269
+ # Run a single spec
270
+ pinecall test agent/specs/date-handling.spec.yaml
271
+
272
+ # Override the judge model
273
+ pinecall test agent/specs/ --judge anthropic/claude-haiku-4-5
274
+
275
+ # List specs without running
276
+ pinecall test agent/specs/ --list
277
+
278
+ # Voice mode — run the spec as a REAL voice call (judge agent ↔ your agent)
279
+ pinecall test agent/specs/greeting.spec.yaml --voice
280
+ ```
281
+
282
+ **Voice mode** (`--voice` or `mode: voice` in the spec) runs the spec as a real bridged voice call instead of text — exercising STT, turn detection, TTS and barge-in. Extra flags: `--voice <p/v>` (judge TTS, default `elevenlabs/professional-male`), `--stt <prov>` (default `flux`), `--record <file>` (WAV out), `--no-listen` (don't open the live player), `--lang <code>`. See [Testing Agents → Voice Mode](/guides/testing-agents#voice-mode).
283
+
284
+ ```
285
+ ⚡ pinecall test
286
+
287
+ Agent: florencia
288
+ Judge: anthropic/claude-haiku-4-5
289
+ Specs: 2 file(s)
290
+ Server: wss://voice.pinecall.io
291
+
292
+ ━━━ date-handling.spec.yaml ━━━
293
+ Verifica que Florencia sabe la fecha correcta
294
+
295
+ Turn 1: "Hola, ¿qué día es hoy?"
296
+ Bot: Hoy es viernes 5 de junio de 2026. ¿Querés reservar algún servicio?
297
+ Turn 2: "Perfecto, quiero reservar para mañana."
298
+ Bot: Mañana es sábado 6 de junio.
299
+ 🔧 checkAvailability({"date":"2026-06-06"})
300
+
301
+ Result: ✓ PASS
302
+ Fechas correctas: hoy 5/6, mañana 6/6, tool arg 2026-06-06
303
+ (4.3s, 2 turns)
304
+
305
+ ═══ Summary ═══
306
+ ✓ date-handling.spec.yaml 2 turns
307
+
308
+ 1 passed, 0 failed
309
+ ```
310
+
311
+ #### Spec format
312
+
313
+ Specs are YAML files ending in `.spec.yaml`. The judge LLM reads the `workflow` and interacts with your agent as a real user would, calling `test_passed` or `test_failed` tools to report the result.
314
+
315
+ ```yaml
316
+ # agent/specs/date-handling.spec.yaml
317
+ agent: florencia
318
+ description: "Date math and calendar awareness"
319
+
320
+ judge:
321
+ provider: anthropic
322
+ model: claude-haiku-4-5
323
+ maxTurns: 10
324
+
325
+ workflow: |
326
+ 1. Ask the agent what day it is today
327
+ 2. Verify it responds with the correct current date
328
+ 3. Ask to book a service for tomorrow
329
+ 4. Verify the checkAvailability tool is called with tomorrow's date
330
+ 5. PASS if all dates are correct, FAIL if any are wrong
331
+ ```
332
+
333
+ #### Judge providers
334
+
335
+ The judge is the LLM that evaluates your agent. Override with `--judge provider/model`:
336
+
337
+ | Provider | Model | Cost (in/out per 1M) | Notes |
338
+ |----------|-------|---------------------|-------|
339
+ | `anthropic` | `claude-haiku-4-5-20251001` | $0.80 / $4.00 | Default. Reliable. |
340
+ | `openai` | `gpt-5-chat-mini` | $0.10 / $0.40 | **10x cheaper**, recommended. |
341
+ | `deepseek` | `deepseek-v4-flash` | $0.14 / $0.28 | Cheapest cloud option. |
342
+ | `ollama` | `gemma3:4b` | Free (local) | Requires Ollama running. |
343
+
344
+ > **Tip:** `claude-haiku-4-5` is the best balance of cost and reliability for automated testing.
345
+
346
+ #### Options
347
+
348
+ | Option | Description |
349
+ |--------|-------------|
350
+ | `--judge provider/model` | Override judge LLM (e.g. `anthropic/claude-haiku-4-5`) |
351
+ | `--agent <id>` | Override agent name from spec |
352
+ | `--grep <pattern>` | Run only specs matching pattern |
353
+ | `--verbose` | Show full agent responses |
354
+ | `--json` | JSON output for CI pipelines |
355
+ | `--list` | List discovered specs without running |
356
+
357
+ ### `pinecall calls`
358
+
359
+ Call history — recent calls with duration, credits, and cost. Reads from the
360
+ Playground usage API.
361
+
362
+ ```bash
363
+ pinecall calls # recent calls
364
+ pinecall calls --limit=50
365
+ pinecall calls --json
366
+ ```
367
+
368
+ ### `pinecall conversations`
369
+
370
+ Browse saved **conversation transcripts** (chat + voice) for your org. Each
371
+ conversation is one chat/call session; transcripts are persisted server-side
372
+ (with the client IP for chat/WebRTC). Aliases: `convos`.
373
+
374
+ ```bash
375
+ pinecall conversations # list recent conversations
376
+ pinecall conversations --type=chat # filter by type (chat|phone|webrtc)
377
+ pinecall conversations --agent=docs # filter by agent
378
+ pinecall conversations --limit=50 --json
379
+ pinecall conversations get <id> # print one full transcript
380
+ ```
381
+
382
+ The list prints the full conversation id; `conversations get` also accepts a
383
+ short id prefix and resolves it against the recent list. Same data powers the
384
+ super-admin "Support chats" view in the dashboard.
385
+
386
+ ### `pinecall usage`
387
+
388
+ Credit usage breakdown by service (STT/TTS/LLM/telephony/platform). Top-level
389
+ alias of [`pinecall account usage`](#pinecall-account).
390
+
391
+ ```bash
392
+ pinecall usage
393
+ ```
394
+
395
+ ### `pinecall balance`
396
+
397
+ Show your Pinecall credit balance and plan info.
398
+
399
+ ```bash
400
+ pinecall balance
401
+ ```
402
+
403
+ > **Warning:** Credits are displayed in red when below 10% of your limit, and yellow below 25%, as a low-balance warning.
404
+
405
+ ### `pinecall signup`
406
+
407
+ Open the Pinecall signup page in your browser to create a new organization.
408
+
409
+ ```bash
410
+ pinecall signup
411
+ ```
412
+
413
+ - Opens `https://playground.pinecall.io/signup` in your default browser
414
+ - Sign up there to create your org and get your first API key
415
+ - No authentication needed — this is the first step
416
+
417
+ ### `pinecall account`
418
+
419
+ View your organization overview with plan, credits, keys, Twilio accounts, and phones.
420
+
421
+ ```bash
422
+ pinecall account
423
+ ```
424
+
425
+ ```
426
+ ⚡ My Company — my-company
427
+ Plan Starter · Credits 38,450/40,000 · Email admin@company.com
428
+ ○ Not verified — outbound calls restricted
429
+ Limits: phones 1/2 · concurrent 3 · agents 3
430
+
431
+ ▸ API Keys (2)
432
+ ▸ Twilio (1)
433
+ ▸ Phones (1)
434
+ ```
435
+
436
+ #### Subcommands
437
+
438
+ | Subcommand | Description |
439
+ |------------|-------------|
440
+ | `pinecall account` | Full overview |
441
+ | `pinecall account keys` | List API keys |
442
+ | `pinecall account keys create "Name"` | Create new key |
443
+ | `pinecall account usage` | Credit usage breakdown by service |
444
+ | `pinecall account session` | Debug session resolution |
445
+
446
+ ### `pinecall account usage`
447
+
448
+ View credit consumption by service with a visual breakdown.
449
+
450
+ ```bash
451
+ pinecall account usage
452
+ ```
453
+
454
+ ```
455
+ ▸ Credits & Usage
456
+ Plan Starter
457
+ Credits ████████████████████████░░░░░░ 38,450/40,000 (96%)
458
+ Resets in 25 days
459
+
460
+ Usage by Service (last 30 days)
461
+ Service Credits Cost Events
462
+ STT 560 $0.0539 70 ████████████████ 36%
463
+ TTS 900 $0.0450 20 ██████████████████████████ 58%
464
+ LLM 12 $0.0002 6 █ 1%
465
+ PLATFORM 78 $0.0780 78 █████ 5%
466
+
467
+ Total consumed 1,550 credits · $0.1771
468
+ ```
469
+
470
+ ### `pinecall phone`
471
+
472
+ Manage phone numbers — request managed numbers from Pinecall.
473
+
474
+ ```bash
475
+ pinecall phone request # Provision a managed number
476
+ pinecall phone request --country=US # Specify country
477
+ pinecall phone search # Search available numbers
478
+ pinecall phone search --area-code=415 # Filter by area code
479
+ ```
480
+
481
+ Plan limits are enforced:
482
+ - **Free Trial**: managed numbers not available (use BYOC)
483
+ - **Starter**: up to 2 managed numbers
484
+ - **Pro**: up to 10
485
+ - **Enterprise**: unlimited
486
+
487
+ ### `pinecall twilio`
488
+
489
+ Manage your own Twilio accounts (BYOC).
490
+
491
+ ```bash
492
+ pinecall twilio # List accounts + phones
493
+ pinecall twilio link <SID> <Token> # Link a Twilio account
494
+ pinecall twilio import +1234567890 # Import a phone number
495
+ pinecall twilio unlink <SID> # Remove a Twilio account
496
+ ```
497
+
498
+ > **BYOC phones are inbound only.** Outbound calls require a managed number from a verified account.
499
+
500
+ ### `pinecall knowledge`
501
+
502
+ Manage knowledge bases (RAG) — the documents an agent grounds its answers on.
503
+ Attach a knowledge base to an agent with [`knowledgeBase`](/guides/knowledge-bases),
504
+ then upload, query, and re-train it from the terminal.
505
+
506
+ > **Paid feature.** Knowledge bases require a paid plan (Starter or higher). On a
507
+ > free trial the CLI prints an upgrade prompt.
508
+
509
+ ```bash
510
+ pinecall knowledge # List knowledge bases
511
+ pinecall knowledge create "Product docs" # Create one (prints its id)
512
+ pinecall knowledge docs <kbId> # List documents in a KB
513
+ pinecall knowledge push <kbId> ./docs/*.md # Upload local .md / .txt files
514
+ pinecall knowledge get <kbId> <docId> # Print a document's text
515
+ pinecall knowledge query [kbId] "how do I dial" # Semantic search — no LLM (kbId optional if you have one KB)
516
+ pinecall knowledge reindex <kbId> # Re-train (rebuild) the index
517
+ pinecall knowledge rm <kbId> <docId> # Delete a document
518
+ pinecall knowledge delete <kbId> # Delete the knowledge base
519
+ ```
520
+
521
+ Listing knowledge bases:
522
+
523
+ ```
524
+ ▸ Knowledge bases (1)
525
+ ID NAME DOCS STATUS
526
+ ──────────────────────── ───────────── ──── ──────
527
+ 6a342d8665460d8af75d5757 Product docs 42 ready
528
+ ```
529
+
530
+ `knowledge query` runs **retrieval only** (embeddings, no LLM) — it returns the
531
+ top matching chunks with a relevance score, useful for debugging what an agent
532
+ will retrieve:
533
+
534
+ ```bash
535
+ pinecall knowledge query 6a342d8665460d8af75d5757 "how do I add a tool"
536
+ ```
537
+
538
+ ```
539
+ ▸ Matches for "how do I add a tool" (6)
540
+ 0.476 Tools and Functions › Adding a tool
541
+ To add a tool to an agent, call pc.tool and pass it in the tools array…
542
+ 0.459 Events › Tools
543
+ The server-side LLM is requesting one or more tool calls…
544
+ ```
545
+
546
+ Uploading reads each file's text locally and stores it in the knowledge base,
547
+ then the index re-trains automatically. Documents can also be managed in the
548
+ dashboard under **Knowledge**.
549
+
550
+ ## Global Options
551
+
552
+ | Option | Description |
553
+ |--------|-------------|
554
+ | `--api-key=pk_...` | Override `PINECALL_API_KEY` env var |
555
+ | `--server=URL` | Override server URL (default: `https://voice.pinecall.io`) |
556
+ | `--json` | Output raw JSON instead of formatted tables |
557
+ | `-h, --help` | Show help |
558
+ | `-v, --version` | Show version |
559
+
560
+ ## JSON Output
561
+
562
+ All commands support `--json` for machine-readable output:
563
+
564
+ ```bash
565
+ pinecall agents --json | jq '.agents[].slug'
566
+ ```
567
+
568
+ ## Environment Variables
569
+
570
+ | Variable | Description | Default |
571
+ |----------|-------------|---------|
572
+ | `PINECALL_API_KEY` | Your Pinecall API key | — (required) |
573
+ | `PINECALL_URL` | Voice server URL | `https://voice.pinecall.io` |
574
+ | `ANTHROPIC_API_KEY` | For Anthropic judge (default) | — |
575
+ | `OPENAI_API_KEY` | For OpenAI judge | — |
576
+ | `DEEPSEEK_API_KEY` | For DeepSeek judge | — |
577
+ | `OLLAMA_HOST` | Ollama server URL | `http://localhost:11434` |
578
+ | `NO_COLOR` | Disable ANSI colors | — |