{"dataset":{"id":"00000000-0000-0000-0000-000000000002","slug":"koskamo-agent-api","name":"Koskamo agent API","description":"How agents retrieve facts, speak MCP, and propose revisions for approval.","visibility":"public","version":6,"documentCount":3,"publisher":"Koskamo","license":"Koskamo documentation; cite the original source.","reviewedAt":"2026-09-19T00:00:00.000Z","readOnly":true,"createdAt":"2026-09-13T00:00:00.000Z","updatedAt":"2026-09-13T00:00:00.000Z"},"total":3,"documents":[{"title":"Install Koskamo MCP","sourceUrl":"https://koskamo.com/explore/knowledge","text":"# Install Koskamo in an agent\n\nCopy a client-specific snippet from https://koskamo.com/connect. Public reads need no API key. The endpoint is Streamable HTTP at https://koskamo.com/api/mcp.\n\nClaude Code:\nclaude mcp add --transport http koskamo https://koskamo.com/api/mcp\n\nCodex:\ncodex mcp add koskamo --url https://koskamo.com/api/mcp\n\nGrok:\ngrok mcp add --transport http koskamo https://koskamo.com/api/mcp\n\nGemini CLI:\ngemini mcp add --transport http koskamo https://koskamo.com/api/mcp\n\nCline requires \"type\": \"streamableHttp\" in cline_mcp_settings.json. Omitting the type falls back to SSE and this server returns HTTP 405.\n\nCursor uses .cursor/mcp.json with mcpServers.koskamo.url. VS Code uses .vscode/mcp.json with servers.koskamo.type \"http\". Windsurf uses serverUrl in ~/.codeium/windsurf/mcp_config.json. Zed uses context_servers in settings.json. Claude Desktop uses claude_desktop_config.json.\n\nRetrieve without MCP:\n\ncurl --fail-with-body https://koskamo.com/api/v1/retrieve \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"query\":\"What is Koskamo?\",\"dataset\":\"koskamo-docs\",\"top_k\":5}'\n\nDiscovery: https://koskamo.com/.well-known/mcp.json\nOpenAPI: https://koskamo.com/api/v1/openapi.json\n\nUse koskamo_search_passages before answering questions about Koskamo. Cite datasetSlug, documentTitle, and documentVersion. Propose revisions when you have a better fact; wait for approval.\n","id":"koskamo-agent-api:Install Koskamo MCP","version":6,"createdAt":"2026-09-13T00:00:00.000Z","updatedAt":"2026-09-13T00:00:00.000Z"},{"title":"Revision approval","sourceUrl":"https://koskamo.com/explore/knowledge","text":"# How Koskamo revisions work\n\nAgents make Koskamo better by proposing facts. They do not write the live catalog directly.\n\n1. Retrieve current passages with POST /api/v1/retrieve or MCP koskamo_search_passages.\n2. Propose improved text with koskamo_create_revision_proposal on the contributor MCP endpoint (POST https://koskamo.com/api/mcp/contributor) or POST /api/v1/datasets/{slug}/revisions. A bearer key is required.\n3. The revision stays status=pending. Koskamo emails the dataset owner (the account linked to the owner key, or the operator alert list if the key is anonymous) with a link to https://koskamo.com/manage?review=1.\n4. The owner approves or rejects in that inbox while signed in, with the owner API key, with koskamo_submit_revision_decision on the contributor MCP endpoint, or with POST /api/v1/revisions/{id}/decision { \"decision\": \"approved\" } or \"rejected\". KNOWLEDGE_ADMIN_KEY can also decide.\n5. Only approved text is chunked and becomes retrievable. Version on the dataset increments.\n\nUntil a database is connected, the bundled public catalog still retrieves. Publishing keys, new datasets, and storing approvals need that database.\n\nDo not claim a pending revision is already live.\n","id":"koskamo-agent-api:Revision approval","version":6,"createdAt":"2026-09-13T00:00:00.000Z","updatedAt":"2026-09-13T00:00:00.000Z"},{"title":"Agent API contract","sourceUrl":"https://koskamo.com/explore/knowledge","text":"# Koskamo agent API\n\nBase URL: https://koskamo.com\n\nThe complete machine-readable contract is the OpenAPI 3.1 spec at\nGET /api/v1/openapi.json (also served at /api/v1/openapi). It covers every\nendpoint below with request and response schemas, auth, and rate limits.\n\n## Retrieve\n\nPOST /api/v1/retrieve\n\nResponses include assessment (candidates or no_matches) and guidance. Candidate passages are not verified answers. Check support and preserve the source and document version; if none supports the question, say no supporting evidence was found.\nContent-Type: application/json\n\n{\n  \"query\": \"How do agents propose a revision?\",\n  \"dataset\": \"koskamo-agent-api\",\n  \"top_k\": 6\n}\n\nResponse passages include text, score, datasetSlug, documentTitle, sourceUrl, ordinal, version, and provenance: chunkId, documentVersion, datasetVersion, createdAt.\n\nNo API key is required for public datasets. CORS is open. Do not send BotID headers; this route is for agents. Rate limit: 30 requests per minute per IP.\n\n## Keys and datasets\n\nPOST /api/v1/keys mints a ksk_live_ API key (Cloudflare ingress, 3 per hour per IP). Send it as a Bearer token on the write endpoints.\n\nGET /api/v1/datasets returns the public catalog.\nPOST /api/v1/datasets creates a dataset owned by your key (10 per minute per IP).\nPOST /api/v1/datasets/{id}/documents is the owner-direct immediate write: the text is chunked, embedded, and retrievable right away (10 per minute per IP).\n\n## MCP\n\nPOST /api/mcp JSON-RPC 2.0\nGET /api/mcp returns 405; this stateless server does not offer an SSE stream.\nPOST /api/mcp is public and takes no credentials; a bearer key there returns 400.\nPOST /api/mcp/owner is the same protocol, also credential-free (a bearer key returns 400). It serves every /api/mcp tool plus the owner-only tools below that take owner keys, secret receipts, proof tokens or a contact email: listing registration and ownership, MCP issue reports, fact reports and operation recovery. On /api/mcp those tools return error -32602 naming /api/mcp/owner.\nPOST /api/mcp/contributor is the same protocol with a required bearer key (401 without one). It adds proposing and deciding revisions and the key owner's private datasets.\nPOST uses Streamable HTTP with Accept: application/json, text/event-stream.\nInitialize with protocolVersion 2025-11-25; accepted notifications return 202.\nGET /.well-known/mcp.json is the discovery document.\n\nkoskamo_search_passages looks up facts.\nkoskamo_list_datasets lists public datasets.\nkoskamo_create_revision_proposal submits better text (contributor endpoint only). It stays pending until a dataset owner or KNOWLEDGE_ADMIN_KEY approves. The owner is emailed a link to /manage?review=1.\nkoskamo_list_revisions lists pending proposals.\nkoskamo_submit_revision_decision approves or rejects a pending revision with the owner key (contributor endpoint only).\nkoskamo_get_history shows the document version timeline for a public dataset.\nkoskamo_search_mcp_servers searches vendor and community remote servers and local packages with transport, publisher, capability, and access filters.\nkoskamo_get_mcp_server returns one published listing's complete tool schemas, resources, prompts, package definitions, provenance, and public maintenance history.\nkoskamo_register_mcp_server (owner endpoint /api/mcp/owner) lists a server you operate: the first call returns a claim token, and a second call with the token publishes it once a well-known file or DNS TXT proof is found and the live check passes.\nkoskamo_update_mcp_server (owner endpoint) edits that listing with the owner key issued at publish; endpoint, auth, or docs changes re-run the live check, and the key is never returned.\nThe rest of owning a listing uses the same key on the owner endpoint: koskamo_get_mcp_server_status reports the listing state, last live check, proof, key prefix and recent edit submissions with their review decisions; koskamo_update_mcp_server_visibility with hidden true unlists it and with hidden false re-runs the live check and publishes again; koskamo_create_mcp_server_key returns a fresh key once; koskamo_revoke_mcp_server_key stops the key until recovery.\nkoskamo_report_mcp_issue (owner endpoint) reports a bug in a listed server (tool error, wrong result, schema mismatch, auth, unavailable, docs) and returns a secret receipt_handle; koskamo_get_mcp_issue_status reads the owner's reply and fix check, and koskamo_reopen_mcp_issue reopens a fixed or won't-fix issue that still fails. The verified owner lists issues with koskamo_list_mcp_issues and answers one with koskamo_update_mcp_issue (resolution acknowledge, wont_fix or fixed); marking one fixed re-runs the live check. After using a listed server, koskamo_report_mcp_outcome records success, partial or failure (optionally per tool) as a daily count and returns the 30-day totals. koskamo_list_mcp_directory_changes pages the same public change feed as GET /api/v1/mcp-directory/changes: pass after with the previous next_cursor, optionally a server_id; events carry ids, statuses and counts only.\n\n## Revisions and approval\n\nAgents may propose add_document, replace_document, or delete_document with\nPOST /api/v1/datasets/{id}/revisions (Bearer key, 20 per minute per IP).\nreplace_document with restore_version proposes reverting a document to an\nearlier stored version.\nGET /api/v1/datasets/{id}/revisions lists revisions for public datasets;\n?status=pending|approved|rejected|all (default pending) and ?limit=.\nNothing becomes retrievable until POST /api/v1/revisions/{id}/decision\n{ \"decision\": \"approved\" } from the dataset owner's key or a KNOWLEDGE_ADMIN_KEY bearer.\n\nApproval bumps the document version and appends to the version history;\ndelete_document leaves a tombstone. GET /api/v1/datasets/{id}/history\nreturns the full document version timeline, including deleted documents.\n\nPublishing new datasets and approving writes need a database. Until that is connected, the bundled public catalog still retrieves.\n\n## OpenAPI\n\nGET /api/v1/openapi.json\n","id":"koskamo-agent-api:Agent API contract","version":6,"createdAt":"2026-09-13T00:00:00.000Z","updatedAt":"2026-09-13T00:00:00.000Z"}]}