greptileai/demo-onyx/embedded
Claude Code and agent skill by greptileai/demo-onyx
- community
Checking that the SKILL.md file is still in the repository.
Query the Onyx knowledge base using the onyx-cli command. Use when the user wants to search company documents, ask questions about internal knowledge, query connected data sources, or look up information stored in Onyx.
Install
npx vskill@latest install greptileai/demo-onyx/embeddedSKILL.md
Onyx CLI — Agent Tool
Onyx is an enterprise search and Gen-AI platform that connects to company documents, apps, and people. The onyx-cli CLI provides non-interactive commands to query the Onyx knowledge base and list available agents.
Prerequisites
1. Check if installed
2. Install (if needed)
Primary — pip:
From source (Go):
3. Check if configured
This checks the config file exists, API key is present, and tests the server connection via /api/me. Exit code 0 on success, non-zero with a descriptive error on failure.
If unconfigured, you have two options:
Option A — Interactive setup (requires user input):
This prompts for the Onyx server URL and API key, tests the connection, and saves config.
Option B — Environment variables (non-interactive, preferred for agents):
Environment variables override the config file. If these are set, no config file is needed.
| Variable | Required | Description | |
|---|---|---|---|
ONYX_SERVER_URL | No | Onyx server base URL (default: https://cloud.onyx.app) | |
ONYX_API_KEY | Yes | API key for authentication | |
ONYX_PERSONA_ID | No | Default agent/persona ID |
If neither the config file nor environment variables are set, tell the user that onyx-cli needs to be configured and ask them to either:
- Run
onyx-cli configureinteractively, or - Set
ONYX_SERVER_URLandONYX_API_KEYenvironment variables
Commands
Validate configuration
Checks config file exists, API key is present, and tests the server connection. Use this before ask or agents to confirm the CLI is properly set up.
List available agents
Prints a table of agent IDs, names, and descriptions. Use --json for structured output:
Use agent IDs with ask --agent-id to query a specific agent.
Basic query (plain text output)
Streams the answer as plain text to stdout. Exit code 0 on success, non-zero on error.
JSON output (structured events)
Outputs JSON-encoded parsed stream events (one object per line). Key event objects include message deltas, stop, errors, search-start, and citation payloads.
Each line is a JSON object with this envelope:
| Event Type | Description | |
|---|---|---|
message_delta | Content token — concatenate all content fields for the full answer | |
stop | Stream complete | |
error | Error with error message field | |
search_tool_start | Onyx started searching documents | |
citation_info | Source citation — see shape below |
citation_info event shape:
placement is metadata about where in the conversation the citation appeared and can be ignored for most use cases.
Specify an agent
Uses a specific Onyx agent/persona instead of the default.
All flags
| Flag | Type | Description | |
|---|---|---|---|
--agent-id | int | Agent ID to use (overrides default) | |
--json | bool | Output raw NDJSON events instead of plain text |
Statelessness
Each onyx-cli ask call creates an independent chat session. There is no built-in way to chain context across multiple ask invocations — every call starts fresh. If you need multi-turn conversation with memory, use the interactive TUI (onyx-cli or onyx-cli chat) instead.
When to Use
Use onyx-cli ask when:
- The user asks about company-specific information (policies, docs, processes)
- You need to search internal knowledge bases or connected data sources
- The user references Onyx, asks you to "search Onyx", or wants to query their documents
- You need context from company wikis, Confluence, Google Drive, Slack, or other connected sources
Do NOT use when:
- The question is about general programming knowledge (use your own knowledge)
- The user is asking about code in the current repository (use grep/read tools)
- The user hasn't mentioned Onyx and the question doesn't require internal company data
Examples
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcli/internal/embedded/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/greptileai/demo-onyx/embedded)