# A2A Agent - Grep Developers

Agent2Agent discovery

# Grep is callable as a research agent.

A2A clients can discover the Grep Research Agent, start deep research tasks, stream status, cancel work, and reuse completed research as context through the same public v2 API surface.

json

```
{
  "name": "Grep Research Agent",
  "description": "Runs deep research jobs and returns reports, structured output, timeline events, and artifacts.",
  "supportedInterfaces": [
    {
      "url": "https://api.grep.ai/api/v2/a2a",
      "protocolBinding": "JSONRPC",
      "protocolVersion": "1.0"
    }
  ],
  "capabilities": {
    "streaming": true,
    "pushNotifications": false,
    "extendedAgentCard": false
  },
  "skills": [
    {
      "id": "deep-research",
      "name": "Deep Research",
      "inputModes": ["text/plain", "application/json"],
      "outputModes": ["text/markdown", "application/json", "text/plain"]
    }
  ]
}
```

Discovery

## Where agents should look first.

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.

[Agent Card](/.well-known/agent-card.json)

Machine-readable A2A discovery document on the public site origin.

[Markdown twin](/developers/a2a.md)

Crawler-friendly reference for LLMs that prefer text over rendered HTML.

[API catalog](/.well-known/api-catalog)

Linkset that advertises OpenAPI, A2A, docs, Markdown, and agent skills.

[llms.txt](/llms.txt)

Top-level index for AI crawlers and coding agents discovering Grep.

Capabilities

## A small A2A surface over real v2 research.

### Deep research tasks

Create a research task through SendMessage and receive an A2A Task backed by a Grep research job.

### Live task state

Read queued, running, completed, failed, blocked, or canceled states without using browser session APIs.

### Reports and artifacts

Completed tasks expose markdown reports, structured output, timeline history, and generated files.

### Streaming

Use the streaming method when clients want polling-backed task updates over a long-lived response.

### Cancel

CancelTask maps to the public v2 stop path, not an internal browser-only endpoint.

### Continuations

Continue from completed work and pass reference task ids for context reuse across research jobs.

Discover

## Fetch the Agent Card.

Agent Card discovery is public and cacheable. Auth is only required when a client calls the A2A JSON-RPC endpoint.

bash

```
curl https://grep.ai/.well-known/agent-card.json | jq
```

Auth

## Use a Grep API key.

A2A requests use the same bearer token model as API v2. Keep keys server-side and send Authorization: Bearer $GREP\_API\_KEY.

API-key auth works for task create, read, list, stream, cancel, and continuation.

Use metadata.idempotencyKey when a client may retry SendMessage.

## Start a research task.

SendMessage creates new research. When message.taskId targets completed work, the adapter creates a continuation task instead.

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"
      }
    }
  }' | jq
```

## Read task state.

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": "task-1",
    "method": "GetTask",
    "params": {
      "id": "550e8400-e29b-41d4-a716-446655440000"
    }
  }' | jq
```

## Build against Grep 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.

[Agent Card](/.well-known/agent-card.json)[v2 reference](/developers/api/v2)
