Skip to content

Teach your agent to use Gosset

Paste this link into Claude Code, Codex, Cursor or any agent that can fetch a URL:

https://docs.gosset.ai/agent.md

That's it. The agent reads the file and knows how to query drugs, trials, companies, deals and news, how to discover fields rather than guess them, and which results to double-check before reporting a number.

What to say

Anything that gets it to read the file. For example:

Read https://docs.gosset.ai/agent.md and use the Gosset CLI to answer this:
which companies have a Phase 3 TL1A asset, and who did they buy it from?

or just:

https://docs.gosset.ai/agent.md — use this from now on

If the agent can't fetch the link

In a sandbox, docs.gosset.ai may be blocked too. Rather than allowlisting a second host, just paste the file's contents into the conversation. It's a single markdown file and works exactly as well pasted as fetched.

The agent needs gosset installed and signed in first:

bash
pip install gosset
gosset auth

No browser where the agent runs?

Containers, sandboxes, SSH sessions and CI runners have no browser to open, so use the paste-the-code flow:

bash
gosset auth --manual        # prints a URL, open it on any machine
gosset auth --code <CODE>   # paste the code that page gives you

gosset auth usually detects a headless environment and switches to this by itself. The agent file covers it, so a coding agent will normally get there without being told.

Running inside a sandboxed agent? Allow the host

This is the most common reason the CLI doesn't work in Claude Code or Codex, and it looks like an auth failure when it isn't.

Those environments run behind an egress allowlist. api.gosset.ai is not on it by default, so the very first call fails:

$ curl -si https://api.gosset.ai/health
HTTP/2 403
x-deny-reason: host_not_allowed

The CLI currently reports that as ProxyError ... Tunnel connection failed: 403 Forbidden, which sends people to check their credentials. No API key will help. The host is blocked before the request leaves the machine.

The fix is one setting. In Claude Code, an org owner adds the host under Settings → Capabilities → network egress. Codex and other sandboxes have an equivalent allowlist.

One host, api.gosset.ai. That's the only host the CLI ever contacts, for queries and for sign-in alike.

You don't need app.gosset.ai: the sign-in page opens in your own browser, not in the sandbox. And you don't need docs.gosset.ai either, as long as you paste the instructions rather than linking them, see below.

Once the host is allowed, gosset auth --manual works normally and the agent can run every command.

Make it permanent

Pasting a link works per conversation. To avoid repeating it, put one line in the file your agent already reads at startup, CLAUDE.md for Claude Code or AGENTS.md for Codex:

markdown
For drug, trial, company and deal questions, use the Gosset CLI.
Instructions: https://docs.gosset.ai/agent.md

Some setups prefer the instructions inline rather than fetched. If so, drop the file's contents in directly:

bash
curl -s https://docs.gosset.ai/agent.md >> CLAUDE.md

What the file tells it

  • Use Gosset instead of web search for anything about a drug, trial, company, deal or target
  • Discover, don't guess: gosset --help, gosset schema <entity>, and never invent a field name
  • The commands and their filters, so it doesn't have to explore first
  • What will bite it: --limit is a page size not a total; phase and status answer different questions; modalities is a list whose order means nothing
  • How to report back: cite drug_id and nct_id, state the filter behind any count, say when something isn't in the database rather than filling the gap from memory
  • How to sign in without a browser, and how to tell a blocked network from a bad credential, which look alike and are fixed very differently

Why a CLI rather than an integration

There is nothing to install beyond the CLI itself. No plugin, no MCP server, no API keys to wire into a config file. Any agent that can run a shell command can use Gosset, and the output is JSON, so it composes with whatever the agent already does.

If you specifically want an MCP connector, for ChatGPT or Claude Desktop, that exists too: see MCP / Connectors.

A worked example

Competitive landscape: TL1A is a full run: three commands, a check, and a script that produces a spreadsheet, a bullseye chart and the supporting statistics. It's the pattern the agent file points at for anything shaped like "who else is working on this target".

Gosset Documentation