Where agents should look first.
Discovery The protocol entrypoint is the Agent Card. Grep also advertises the same surface through llms.txt, the API catalog, Markdown alternates, and public Link headers so crawlers do not need to execute JavaScript. Machine-readable A2A discovery document on the public site origin. Crawler-friendly reference for LLMs that prefer text over rendered HTML. Linkset that advertises OpenAPI, A2A, docs, Markdown, and agent skills. Top-level index for AI crawlers and coding agents discovering Grep.
A small A2A surface over real v2 research.
Capabilities Create a research task through SendMessage and receive an A2A Task backed by a Grep research job. Read queued, running, completed, failed, blocked, or canceled states without using browser session APIs. Completed tasks expose markdown reports, structured output, timeline history, and generated files. Use the streaming method when clients want polling-backed task updates over a long-lived response. CancelTask maps to the public v2 stop path, not an internal browser-only endpoint. Continue from completed work and pass reference task ids for context reuse across research jobs.
Fetch the Agent Card.
Agent Card discovery is public and cacheable. Auth is only required when a client calls the A2A JSON-RPC endpoint. A2A requests use the same bearer token model as API v2. Keep keys server-side and send Authorization: Bearer $GREP_API_KEY.
bash
curl https://grep.ai/.well-known/agent-card.json | jqStart a research task.
SendMessage creates new research. When message.taskId targets completed work, the adapter creates a continuation task instead. GetTask returns the current task projection, including terminal report artifacts once research is complete.
bash
curl -sS https://api.grep.ai/api/v2/a2a \
-H "Authorization: Bearer $GREP_API_KEY" \
-H "Content-Type: application/json" \
-H "A2A-Version: 1.0" \
-d '{
"jsonrpc": "2.0",
"id": "research-1",
"method": "SendMessage",
"params": {
"message": {
"role": "ROLE_USER",
"messageId": "msg-1",
"parts": [
{
"text": "Research the competitive landscape for AI due diligence platforms."
}
]
},
"metadata": {
"idempotencyKey": "ai-dd-landscape-2026"
}
}
}' | jqbash
curl -sS https://api.grep.ai/api/v2/a2a \
-H "Authorization: Bearer $GREP_API_KEY" \
-H "Content-Type: application/json" \
-H "A2A-Version: 1.0" \
-d '{
"jsonrpc": "2.0",
"id": "task-1",
"method": "GetTask",
"params": {
"id": "550e8400-e29b-41d4-a716-446655440000"
}
}' | jqBuild against GREP AI as an agent.
Use OpenAPI when you want REST. Use A2A when your client wants a task-based research agent with discovery, state, streaming, cancellation, and reusable context.