# ojigi > Customer-facing chat agents with NO admin UI. The owner's personal AI agent (PA) manages everything through one MCP server: create agents, add knowledge (text/markdown/PDF), read conversations, give feedback, run evals, and get metrics (FCR) and voice-of-customer data. ## Getting started (for owners and their personal agents) 1. Sign in with Google at /account. A workspace and an MCP token are created for you automatically (the token is shown once; you can regenerate it any time). 2. Copy the setup prompt from /account (it already contains your MCP URL and token) and paste it into your personal agent (Grok Bot, Claude, Cursor, ChatGPT via API, …). 3. Your agent connects the MCP server, asks you a few questions about your business, creates and tests the customer-service agent, and sends you the public chat link /a/. 4. From then on, just talk to your agent: review chats that need you, correct answers, run evals, check metrics (FCR) and voice of customer. Sign-up / sign-in (Google): https://pa-desk-chi.vercel.app/account ### Setup prompt (paste into any personal agent; the signed-in /account page shows it with the real token) ```text You are my personal agent. Please set up a customer-service chat agent for my business using ojigi, and manage it for me from now on. ojigi has no admin UI: you are the admin, through its MCP server. STEP 1 — Connect the ojigi MCP server (remote, Streamable HTTP) - Name: ojigi - URL: https://pa-desk-chi.vercel.app/api/mcp - Header: Authorization: Bearer If you can add MCP servers / custom connectors yourself, do it now. If you can't, show me exactly what to paste into your settings (config JSON or command for the app I'm using), wait until I confirm, then continue. Treat the token like a password: never post it publicly or put it into the agent's knowledge. (I'll replace with my token from https://pa-desk-chi.vercel.app/account.) STEP 2 — Check the connection Call get_overview and tell me in one line that you're connected. STEP 3 — Interview me (one short message, max 6 questions, in my language) 1. Business name, what we sell / do, website. 2. Who the customers are and the questions they ask most. 3. Tone and language(s) for replies (e.g. polite Japanese + English). 4. Facts it must know: opening hours, prices, shipping/delivery, returns/refunds, payment methods, contact info. 5. When to hand over to a human (topics or keywords, e.g. "refund", "complaint", "lawyer"). 6. Documents I can share: FAQ text, PDFs (attach them) or URLs. If I'm unsure about something, propose a sensible default and move on. STEP 4 — Build it - create_agent with a clear name, instructions that reflect my answers (role, tone, language, what NOT to promise), handoff rules / escalation keywords, publish: true. - add_knowledge with everything I told you plus my files/URLs (one item per topic; PDFs as base64 or URL). - test_ask with 3–5 realistic customer questions (include one that should be handed off). Fix gaps with update_agent / add_knowledge. - add_eval_cases for those questions (with expected answers) and run_evals. Show me the pass rate. STEP 5 — Deliver Give me the public chat link (https://pa-desk-chi.vercel.app/a/) and a short message I can send customers. Then offer the website chat bubble: ask which platform my site uses (plain HTML, WordPress, Shopify, Next.js/React, Google Tag Manager…), call get_widget_snippet and give me the one-line snippet with only the matching install steps. Ask for my site's domain and lock the widget to it with update_widget_settings allowedDomains. Escalation emails go to my login email by default. Ask if anyone else should get them, or only at certain times / one person at a time, and set that up with upsert_notification_rule (check with test_notification). The email has a private link to reply to that customer right away; if email isn't set up yet, get_escalation_link gives me the link directly. STEP 6 — Tell me what you can do next (briefly), and offer to do it regularly: - get_review_queue: handoffs and low-confidence answers that need me; mark_handled when done. - give_feedback: turn my corrections into fixes + eval cases; run_evals after every change. - get_metrics: conversations, resolution rate, escalation rate, FCR. - analyze_topics: what customers ask most and which knowledge is missing. - get_voc: complaints, sentiment and trends (with chart data). - update_widget_settings: change the website bubble's color, greeting, position or allowed domains. Docs for you: https://pa-desk-chi.vercel.app/llms.txt ``` ### Client configs - Grok Bot: Easiest: paste the setup prompt above into Grok Bot and it connects itself. Manual: add a custom MCP connector with these values. ``` Name: ojigi URL: https://pa-desk-chi.vercel.app/api/mcp Header: Authorization: Bearer ``` - Cursor: Settings → MCP → Add custom MCP, or put this in ~/.cursor/mcp.json (or .cursor/mcp.json in a project). ``` { "mcpServers": { "ojigi": { "url": "https://pa-desk-chi.vercel.app/api/mcp", "headers": { "Authorization": "Bearer " } } } } ``` - Claude Code: Run once in your terminal (add --scope user to use it in every project). ``` claude mcp add --transport http ojigi https://pa-desk-chi.vercel.app/api/mcp \ --header "Authorization: Bearer " ``` - Claude Desktop: Settings → Developer → Edit Config (claude_desktop_config.json), then restart Claude. Uses the mcp-remote bridge (needs Node.js). ``` { "mcpServers": { "ojigi": { "command": "npx", "args": [ "-y", "mcp-remote", "https://pa-desk-chi.vercel.app/api/mcp", "--header", "Authorization:${PA_DESK_AUTH}" ], "env": { "PA_DESK_AUTH": "Bearer " } } } } ``` - ChatGPT / OpenAI: OpenAI Responses API (Agents SDK works the same way). ChatGPT's in-app connectors currently expect OAuth, so use the API or another PA that supports a Bearer header. ``` { "model": "gpt-5", "tools": [ { "type": "mcp", "server_label": "ojigi", "server_url": "https://pa-desk-chi.vercel.app/api/mcp", "headers": { "Authorization": "Bearer " }, "require_approval": "never" } ], "input": "Use ojigi to set up a customer-service agent for my business." } ``` - Any MCP client (HTTP): Streamable HTTP, stateless, JSON responses. Send JSON-RPC to the endpoint with these headers. ``` curl -s https://pa-desk-chi.vercel.app/api/mcp \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' ``` ## Connect - MCP endpoint (Streamable HTTP, stateless, JSON responses): https://pa-desk-chi.vercel.app/api/mcp - Auth header: `Authorization: Bearer ` (owners get a token at https://pa-desk-chi.vercel.app/account) - Human docs: https://pa-desk-chi.vercel.app/docs - Public chat page per agent: https://pa-desk-chi.vercel.app/a/ ## Website widget Every published agent can also live on the owner's own website as a floating chat bubble (bottom-right). One script tag, no framework; the chat runs in an isolated iframe so the site's CSS can't break it, it goes full-screen on phones, and conversations survive page reloads. ```html ``` - data-agent: required — the agent slug - data-position: "right" (default) or "left" - data-color: accent color, e.g. "#e11d48" - data-greeting: first message in the panel - data-lang: "ja" | "en" | "auto" - data-open: "true" = open on page load (desktop) - data-label: text next to the bubble, e.g. "Chat with us" 1. Ask your personal agent: “Put the support bot on my website” — it calls get_widget_snippet and gives you the snippet plus install steps for your platform (HTML, WordPress, Shopify, Next.js/React, Google Tag Manager). 2. Paste the snippet before on your site. 3. Lock it to your domain: “Only allow the widget on myshop.com” → update_widget_settings allowedDomains. Other sites then can't frame the chat (CSP frame-ancestors) or call it. 4. Unpublished agents and disabled widgets render nothing. JavaScript API: window.ojigi.open() / close() / toggle() (window.PADesk also works). ## How to use (server instructions) ojigi: customer-facing chat agents with no admin UI — you (the owner's personal agent) are the admin UI. Typical loops: - Build: create_agent -> add_knowledge -> test_ask -> add_eval_cases -> run_evals -> share the URL -> offer the website widget (get_widget_snippet; restrict with update_widget_settings allowedDomains). - Improve: get_review_queue / analyze_topics -> get_conversation -> fix (add_knowledge / update_agent) -> add_eval_cases -> run_evals. Ask the owner only for facts you cannot know; record their answer with give_feedback. - Human handoff: by default every escalation is emailed to the workspace owner's login email — nothing to set up. Routing is data you compose, not features to ask for: upsert_notification_rule (recipients emails/"owner"/"members"; conditions agents/reasonContains/messageContains/channels; schedule windows in a timezone; mode all = broadcast, one = round-robin; stop; recipients [] = mute) -> verify with test_notification (dry run; send=true only if the owner wants a test email) -> get_notification_settings shows the effective chain (rules -> agent emails via set_notification_emails -> owner). Translate the owner's wishes ("weekdays to the team, one at a time; nights only me; never for the test bot") into a few rules. Each email carries a private link to reply live in that one conversation (AI pauses; hand back or close there). If email isn't configured (get_notification_settings) or the owner asks, call get_escalation_link and give them the link directly; regenerate with revokeExisting=true. - Report: get_metrics (FCR), get_voc (chart-ready), analyze_topics. - Knowledge curation is YOUR job (ojigi spends tokens only on answering customers): fetch the owner's sources yourself (Notion, Drive, websites, files), clean them to text/markdown, and add_knowledge in batches. Pin (pinned=true / set_pinned) only short, always-relevant core facts (prices, hours, contact, key policies, current campaigns; capped per agent); everything else stays normal and is retrieved per question. Facts every agent needs go to scope=shared; agent-specific docs to scope=agent. When a fact changes: search_knowledge (no agent = whole workspace) to find every occurrence incl. paraphrases -> replace_in_knowledge preview -> apply (or update_knowledge for whole docs) -> add an eval case for the new fact -> run_evals. Use search_knowledge with the customer's wording to see exactly what the agent retrieves. All ids are UUIDs; agents can also be referenced by slug. ## Knowledge playbook (for the PA) Principle: ingestion and curation are the PA's job. ojigi never crawls or summarizes your sources and spends model tokens only on answering customers; you fetch, clean, decide and verify. 1. Ingest: pull the owner's sources yourself (Notion pages, Google Drive docs/PDFs, website pages, pasted text). Convert to clean text or markdown with headings, one topic per document where possible, a descriptive title, and no navigation/boilerplate. Send up to 50 items per add_knowledge call (url/pdfBase64 also work for public PDFs/pages). 2. Scope: facts every agent of the business needs (company profile, hours, contact, shipping, policies) -> scope=shared once; agent-specific material (one product line, one store) -> scope=agent. Agents that must ignore shared docs: update_agent useSharedKnowledge=false. Move docs later with set_knowledge_scope. 3. Pinned vs normal: pin short, always-relevant, high-stakes facts (price list, opening hours, contact, refund policy, current campaign). Pinned text is injected into every prompt, so it is never missed by search, but it costs prompt space: total pinned text per agent is capped (list_knowledge shows usage and truncation). Everything else stays normal and is retrieved per question (hybrid keyword + semantic embeddings + rerank; works for casual Japanese/English/Chinese wording). 4. Check retrieval: search_knowledge with the agent and real customer wording shows the exact chunks, scores and sources the agent will see. If the right chunk is missing or weak, add a clearer FAQ-style doc in the customer's words, or split a long doc. 5. Fix outdated facts in bulk: search_knowledge without agent (whole workspace, incl. pinned) to find every occurrence and paraphrase -> replace_in_knowledge (preview first, then apply=true) or update_knowledge to replace a whole doc -> delete_knowledge for obsolete docs. Changed chunks are re-embedded automatically; reindex_knowledge finishes any that were rate-limited. 6. Verify: add_eval_cases for every corrected or important fact, then run_evals (small batches on the free tier) and test_ask for spot checks. Repeat after every bulk edit. ## Tools ### get_overview (read-only) Start here. Returns the workspace, every agent (id, slug, public URL, published, version), knowledge/conversation counts for the last 7 days, and which LLM provider is active ("mock" means no real model key is configured, answers are deterministic placeholders). Owner might say: "What agents do I have? Is everything working?" ### create_agent Create a new customer-facing chat agent and (by default) publish it. Returns the public chat URL to share. Write a complete systemPrompt yourself from the owner's intent — the owner should not have to. For knowledge-based support bots use knowledgeMode=strict and then add_knowledge; for role-play/coaching agents use knowledgeMode=off. Owner might say: "Make me an interview-practice agent and send me the public URL." Parameters: - name: string — Display name shown on the chat page - description?: string — One-line purpose, shown under the name on the chat page - systemPrompt?: string — Role and behavior instructions for the agent (the main prompt) - tone?: string — e.g. "friendly, concise" or "polite keigo" - language?: string — "auto" (reply in the customer's language), "ja", "en", ... - greeting?: string — First message shown on the chat page - knowledgeMode?: "strict" | "assist" | "off" — strict = answer only from knowledge, hand off otherwise (support bots). assist = prefer knowledge, general chat allowed. off = no knowledge retrieval (role-play agents like interview practice). - escalationRules?: string — Natural-language rules for when to hand off to a human (e.g. 'refund requests over ¥10,000', 'legal threats') - escalationKeywords?: string[] — Customer phrases that trigger an immediate handoff, no LLM involved - handoffMessage?: string — Text shown when handing off. Empty = built-in bilingual default - useSharedKnowledge?: boolean — Also answer from the workspace's shared knowledge (docs added with scope=shared). Default true; set false for agents that must only use their own docs. - slug?: string — URL slug (a-z, 0-9, -). Omit to auto-generate. - publish?: boolean — Make the chat page public immediately (default true) ### update_agent Change any agent setting (prompt, tone, escalation rules, published flag...). Every change creates a new version with your changeNote, so it can be rolled back with restoreVersion. Only pass fields you want to change. After changing behavior, verify with run_evals. Owner might say: "Make it more polite. / Unpublish it. / Undo your last change." Parameters: - agent: string — Agent id or slug (see get_overview) - name?: string — Display name shown on the chat page - description?: string — One-line purpose, shown under the name on the chat page - systemPrompt?: string — Role and behavior instructions for the agent (the main prompt) - tone?: string — e.g. "friendly, concise" or "polite keigo" - language?: string — "auto" (reply in the customer's language), "ja", "en", ... - greeting?: string — First message shown on the chat page - knowledgeMode?: "strict" | "assist" | "off" — strict = answer only from knowledge, hand off otherwise (support bots). assist = prefer knowledge, general chat allowed. off = no knowledge retrieval (role-play agents like interview practice). - escalationRules?: string — Natural-language rules for when to hand off to a human (e.g. 'refund requests over ¥10,000', 'legal threats') - escalationKeywords?: string[] — Customer phrases that trigger an immediate handoff, no LLM involved - handoffMessage?: string — Text shown when handing off. Empty = built-in bilingual default - useSharedKnowledge?: boolean — Also answer from the workspace's shared knowledge (docs added with scope=shared). Default true; set false for agents that must only use their own docs. - published?: boolean — true = public chat page live, false = hidden (404) - restoreVersion?: number — Restore all settings from this earlier version (see get_agent revisions) - changeNote?: string — Why you changed it (shown in revision history) ### get_widget_snippet (read-only) Returns the copy-paste