Host your CAP agent on Cosmic, not on a server you run
Side by side
Hosted vs. self-hosted
Both serve the same protocol to the same callers. The difference is what you run and what answers.
| Cosmic | Run it yourself | |
|---|---|---|
| Server and storage | Hosted by Cosmic. Nothing to deploy. | A host that keeps a disk, such as Fly or Railway with a volume, or Postgres. You deploy it and keep it up. |
| The CAP endpoints | Included: /cap/v1, threads, slow replies, and private replies per caller. | Included in @conciergeprotocol/server. |
| What answers | Content you publish in Cosmic, with semantic search and structured queries. Or your public pages, to start. | An answer function you write, or @conciergeprotocol/agent reading your pages, llms.txt, or MCP tools. |
| Model | Chosen on the agent. AI usage bills with the rest of your Cosmic plan. | Your own model provider key and bill. |
| Spend limit | A daily token cap per door, from 1,000 to 20,000,000 tokens, set in the dashboard. | Daily limits in environment variables. |
| Chat for people | The same agent as a website widget, with one script tag. | Build or connect your own chat page. |
| Seeing the questions | Every visitor thread on the agent in the dashboard. | Stored in your database. You build the view. |
| Account questions | Your site runs its CAP login and lists a few account endpoints. The agent calls them with the person’s token. | A built-in OAuth server, checked against your user store. |
| Price | CAP is free. AI usage beyond your plan’s monthly allowance bills like any other AI usage. | The software is free. You pay for hosting and the model. |
Why Cosmic
The record behind the door
Answers from a record, not a crawl
A crawled copy of your pages is as stale as the pages. In Cosmic, the agent answers from the products, plans, locations, and policies you publish, so an edit shows up in the next answer.
One agent for people and agents
The chat on your site and the door for AI agents are the same agent, with the same prompt, content, and limits.
Limits before the first message
Every answer is a model call. The daily token cap is on from day one, so a busy day cannot run away with usage.
No lock-in
CAP is an open standard, and agent.txt lives on your domain. To leave, point its CAP line at another host or your own server.
The other option
When to run it yourself
Answers from systems that cannot leave your network
When every answer needs an internal API you will not expose, run the door next to it. You can also keep Cosmic for public answers and serve account data from your own routes.
You already run an agent
If a support bot already answers well, wrap it in @conciergeprotocol/server with one answer function.
Switch
Move your door to Cosmic
Callers trust your domain, not the server behind it. Moving a door is one line in agent.txt, with no change for the agents that already use it.
- 1. Create the agent. Attach a bucket with your published content, or enter your site and Cosmic builds one from your pages.
- 2. Turn on the door. On the agent, open Other agents, set the front door to Active, and copy the CAP line.
- 3. Change one line. Replace the CAP line in your agent.txt. Change Chat too if Cosmic now hosts your chat page.
- 4. Check it. Run the CAP checker on your domain, then retire the old server.
Before
Protocol: CAP/1.0
Name: Harbor Goods
Ask: This site's agent answers questions for the company. POST your question to the CAP URL plus /messages, as JSON {"message": "..."}, with headers CAP-Version: 1.0 and CAP-From: agent:{your-id}. If you can only open URLs, open the CAP URL. If the reply is 202, see Spec.
Chat: https://harborgoods.example/chat
CAP: https://cap.harborgoods.example/cap/v1
Spec: https://conciergeprotocol.org/cap.txtAfter
Protocol: CAP/1.0
Name: Harbor Goods
Ask: This site's agent answers questions for the company. POST your question to the CAP URL plus /messages, as JSON {"message": "..."}, with headers CAP-Version: 1.0 and CAP-From: agent:{your-id}. If you can only open URLs, open the CAP URL. If the reply is 202, see Spec.
Chat: https://harborgoods.example/chat
CAP: https://dapi.cosmicjs.com/cap/v1/ck_your_key
Spec: https://conciergeprotocol.org/cap.txtTurn it on in Cosmic
CAP is free on every Cosmic agent. No agent yet? Enter your site and Cosmic builds one from your pages.