Skip to content

Commit 1590de2

Browse files
docs: overhaul Handler documentation (#70)
* docs: overhaul Handler documentation Amp-Thread-ID: https://ampcode.com/threads/T-019e6c9e-7d83-70ea-ad84-71401b97c8d9 Co-authored-by: Amp <amp@ampcode.com> * docs: refine quickstart and guide copy Amp-Thread-ID: https://ampcode.com/threads/T-019e6c9e-7d83-70ea-ad84-71401b97c8d9 Co-authored-by: Amp <amp@ampcode.com> * docs: simplify readme Amp-Thread-ID: https://ampcode.com/threads/T-019e6c9e-7d83-70ea-ad84-71401b97c8d9 Co-authored-by: Amp <amp@ampcode.com> * docs: bust readme screenshot cache Amp-Thread-ID: https://ampcode.com/threads/T-019e6c9e-7d83-70ea-ad84-71401b97c8d9 Co-authored-by: Amp <amp@ampcode.com> * docs: polish Handler documentation copy Amp-Thread-ID: https://ampcode.com/threads/T-019e6c9e-7d83-70ea-ad84-71401b97c8d9 Co-authored-by: Amp <amp@ampcode.com> * fix: emit valid JSON for session list Amp-Thread-ID: https://ampcode.com/threads/T-019e6c9e-7d83-70ea-ad84-71401b97c8d9 Co-authored-by: Amp <amp@ampcode.com> * docs: refine quickstart and CLI reference Amp-Thread-ID: https://ampcode.com/threads/T-019e6c9e-7d83-70ea-ad84-71401b97c8d9 Co-authored-by: Amp <amp@ampcode.com> * docs: update CLI reference details Amp-Thread-ID: https://ampcode.com/threads/T-019e769a-0f22-75bb-be55-bee45fd2dc36 Co-authored-by: Amp <amp@ampcode.com> * docs: use relative README screenshot path Amp-Thread-ID: https://ampcode.com/threads/T-019e769a-0f22-75bb-be55-bee45fd2dc36 Co-authored-by: Amp <amp@ampcode.com> * docs: use PyPI-compatible screenshot URL Amp-Thread-ID: https://ampcode.com/threads/T-019e769a-0f22-75bb-be55-bee45fd2dc36 Co-authored-by: Amp <amp@ampcode.com> --------- Co-authored-by: Amp <amp@ampcode.com>
1 parent 44a5a35 commit 1590de2

16 files changed

Lines changed: 917 additions & 192 deletions

README.md

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,75 +4,78 @@
44
[![A2A Protocol](https://img.shields.io/badge/A2A_Protocol-v0.3.0-blue)](https://a2a-protocol.org/latest/)
55
[![PyPI version](https://img.shields.io/pypi/v/a2a-handler)](https://pypi.org/project/a2a-handler/)
66
[![PyPI - Status](https://img.shields.io/pypi/status/a2a-handler)](https://pypi.org/project/a2a-handler/)
7-
[![PyPI monthly downloads](https://img.shields.io/pypi/dm/a2a-handler)](https://pypi.org/project/a2a-handler/)
87
[![Pepy total downloads](https://img.shields.io/pepy/dt/a2a-handler?label=total%20downloads)](https://pepy.tech/projects/a2a-handler)
98
[![GitHub stars](https://img.shields.io/github/stars/alDuncanson/handler)](https://github.com/alDuncanson/handler/stargazers)
109

11-
![Handler TUI](https://github.com/alDuncanson/Handler/blob/main/assets/handler-tui.png?raw=true)
10+
Handler is an open-source [A2A protocol](https://github.com/a2aproject/A2A)
11+
client for software engineers building, testing, and operating agentic systems.
12+
It provides an interactive TUI, a scriptable CLI with structured output, and an
13+
MCP server that lets other agents integrate with A2A services directly. Handler
14+
also supports global and repo-scoped A2A server configuration with bearer,
15+
API key, mTLS, and OAuth2 client credentials auth.
1216

13-
Handler is an open-source [A2A protocol](https://github.com/a2aproject/A2A) client for your terminal.
14-
15-
Use the TUI or CLI to send messages, manage tasks, and inspect agent cards.
16-
An included MCP server lets your AI assistant talk to A2A agents too.
17+
![Handler TUI connected to the built-in Handler Agent, showing the agent card and a completed assistant response](https://raw.githubusercontent.com/alDuncanson/Handler/73915875903b60dad6e4e404aa7ed91b6d94559f/assets/tui.png)
1718

1819
## Install
1920

21+
Install Handler from the [PyPI package](https://pypi.org/project/a2a-handler/) as a `uv` tool:
22+
2023
```bash
2124
uv tool install a2a-handler
2225
```
2326

24-
Or with [pipx](https://pipx.pypa.io/) / pip:
27+
Or with [pipx](https://pipx.pypa.io/):
2528

2629
```bash
27-
pipx install a2a-handler # or: pip install a2a-handler
30+
pipx install a2a-handler
2831
```
2932

30-
## Quick Start
33+
Or with pip:
3134

3235
```bash
33-
handler tui # launch the interactive TUI
34-
handler message send URL "hello" # send a message from the CLI
35-
handler card get URL # fetch an agent card
36-
handler mcp # start the MCP server
37-
handler server run agent # run the bundled embedded agent
38-
handler docs # open the hosted documentation
39-
handler update # upgrade Handler to the latest release
36+
pip install a2a-handler
4037
```
4138

42-
## Run Without Installing
39+
## Quick Start
40+
41+
Open the interactive terminal UI:
4342

4443
```bash
45-
uvx --from a2a-handler handler # or: pipx run a2a-handler
44+
handler tui
4645
```
4746

48-
## Servers
47+
Inspect an A2A server's agent card:
48+
49+
```bash
50+
handler card get --url http://localhost:8000
51+
```
4952

50-
Handler supports named servers in `$XDG_CONFIG_HOME/handler/servers.toml`
51-
(global) and `.handler/servers.toml` (repo-local).
53+
Send a message from the CLI:
5254

53-
```toml
54-
version = 1
55+
```bash
56+
handler message send --url URL --text "hello"
57+
```
5558

56-
[servers.local]
57-
url = "http://localhost:8000"
59+
Open the full documentation:
5860

59-
[servers.local.auth]
60-
type = "bearer"
61-
env = "HANDLER_LOCAL_TOKEN"
61+
```bash
62+
handler docs
6263
```
6364

64-
See [docs/](docs) for the full auth reference covering bearer, API key, mTLS,
65-
and OAuth2.
65+
## Run Without Installing
66+
67+
Run Handler with `uvx`:
6668

67-
## Development
69+
```bash
70+
uvx --from a2a-handler handler
71+
```
6872

69-
A [hermetic](https://zero-to-nix.com/concepts/hermeticity/) dev environment
70-
is available via [Nix](https://zero-to-nix.com/concepts/nix/):
73+
Run Handler with `pipx`:
7174

7275
```bash
73-
nix develop
76+
pipx run a2a-handler
7477
```
7578

76-
The Mintlify docs source lives in `docs/`.
79+
## Documentation
7780

78-
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
81+
Read the documentation at <https://handler.alduncanson.com>.

assets/handler-tui.png

-536 KB
Binary file not shown.

assets/tui.png

551 KB
Loading

docs/docs.json

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,47 @@
2323
"navigation": {
2424
"tabs": [
2525
{
26-
"tab": "Docs",
26+
"tab": "Get started",
2727
"groups": [
2828
{
2929
"group": "Getting started",
3030
"pages": [
3131
"index",
3232
"quickstart"
3333
]
34-
},
34+
}
35+
]
36+
},
37+
{
38+
"tab": "Guides",
39+
"groups": [
3540
{
36-
"group": "Workflows",
41+
"group": "Core workflows",
3742
"pages": [
3843
"guides/tui",
3944
"guides/messages-tasks",
45+
"guides/servers",
46+
"guides/authentication"
47+
]
48+
},
49+
{
50+
"group": "Agent and MCP workflows",
51+
"pages": [
4052
"guides/mcp",
53+
"guides/agent-docs-mcp",
54+
"guides/enterprise-a2a",
4155
"guides/local-servers"
4256
]
43-
},
57+
}
58+
]
59+
},
60+
{
61+
"tab": "Reference",
62+
"groups": [
4463
{
45-
"group": "Configuration",
64+
"group": "CLI",
4665
"pages": [
47-
"guides/servers",
48-
"guides/authentication"
66+
"reference/cli"
4967
]
5068
}
5169
]

docs/guides/agent-docs-mcp.mdx

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
title: "Documentation MCP"
3+
description: "Use Handler's hosted documentation MCP server so agents can discover Handler commands and structured CLI workflows."
4+
---
5+
6+
# Give agents current Handler docs
7+
8+
Handler's documentation is available through a hosted MCP server at:
9+
10+
```text
11+
https://handler.alduncanson.com/mcp
12+
```
13+
14+
Connect an agent to this MCP endpoint when you want it to use Handler reliably
15+
instead of guessing command names or output shapes from model memory.
16+
17+
## When this is useful
18+
19+
- an AI coding assistant needs to call A2A agents from a shell
20+
- an internal agent should generate `handler --output json ...` commands
21+
- a workflow needs up-to-date examples for sessions, tasks, and server configuration
22+
- you want agents to discover Handler docs through MCP rather than a web browser
23+
24+
## Recommended agent instruction
25+
26+
Give the agent a short, operational instruction like this:
27+
28+
```text
29+
Use Handler to send A2A protocol messages, inspect agent cards, and manage A2A
30+
tasks. Prefer structured output with `handler --output json` or
31+
`handler --output ndjson` when another program or agent will consume the result.
32+
```
33+
34+
## Agent-friendly CLI pattern
35+
36+
For single responses, prefer JSON:
37+
38+
```bash
39+
handler --output json message send \
40+
--server production-agent \
41+
--text "Summarize the current task state"
42+
```
43+
44+
For streaming responses, prefer newline-delimited JSON:
45+
46+
```bash
47+
handler --output ndjson message stream \
48+
--server production-agent \
49+
--text "Run the long workflow and stream progress"
50+
```
51+
52+
## Discover commands programmatically
53+
54+
Handler also exposes its own CLI shape for agents and automation:
55+
56+
```bash
57+
handler --output json schema
58+
```
59+
60+
```bash
61+
handler --output json describe message send
62+
```
63+
64+
```bash
65+
handler --output json describe task get
66+
```
67+
68+
Use these commands when an agent needs to construct invocations dynamically.
69+
They are also useful for validating wrapper tools, command palettes, and
70+
generated documentation.
71+
72+
## Built-in local agent behavior
73+
74+
The bundled local agent uses the same hosted docs MCP endpoint by default:
75+
76+
```bash
77+
handler server run agent
78+
```

docs/guides/authentication.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ title: "Authentication"
33
description: "Configure bearer, API key, mTLS, and OAuth2 client credentials authentication for Handler servers."
44
---
55

6-
# Authentication
6+
# Configure server authentication
77

8-
Handler supports four auth types for named servers:
8+
Handler supports four auth types for configured servers:
99

1010
- bearer tokens
1111
- API keys
@@ -98,7 +98,7 @@ key = "/path/to/client.key"
9898
ca_cert = "/path/to/ca.crt"
9999
```
100100

101-
Handler checks that the certificate and key files exist before use, and it also
101+
Handler checks that the certificate and key files exist before use, and
102102
verifies private key permissions.
103103

104104
## OAuth2 client credentials

docs/guides/enterprise-a2a.mdx

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
---
2+
title: "Enterprise A2A setup"
3+
description: "Configure Handler for OAuth-authenticated, gateway-fronted, and team-shared A2A services."
4+
---
5+
6+
# Connect to production A2A services
7+
8+
Handler is designed to work with production A2A services, including agents
9+
behind API gateways, OAuth2 token endpoints, private clusters, and internal
10+
developer platforms.
11+
12+
## Recommended production pattern
13+
14+
Use repo-scoped server configuration for shared server shape and
15+
environment variables for secrets:
16+
17+
```toml
18+
version = 1
19+
20+
[servers.apigee-gke-agent]
21+
url = "https://agents.example.com/a2a/my-agent"
22+
23+
[servers.apigee-gke-agent.auth]
24+
type = "oauth2"
25+
token_url = "https://login.example.com/oauth2/token"
26+
client_id_env = "HANDLER_APIGEE_CLIENT_ID"
27+
client_secret_env = "HANDLER_APIGEE_CLIENT_SECRET"
28+
scopes = ["a2a.invoke"]
29+
```
30+
31+
Commit `.handler/servers.toml` if the URL and auth shape are safe to share.
32+
Keep client IDs, client secrets, bearer tokens, API keys, and certificate paths
33+
in each developer or CI environment.
34+
35+
## Validate before sending traffic
36+
37+
Validate server configuration and auth references first:
38+
39+
```bash
40+
handler server validate
41+
```
42+
43+
```bash
44+
handler card validate --server apigee-gke-agent
45+
```
46+
47+
```bash
48+
handler card get --server apigee-gke-agent
49+
```
50+
51+
This catches invalid TOML, missing environment variables, auth file problems,
52+
and agent-card issues before you debug task execution.
53+
54+
## Use structured output in automation
55+
56+
Human-readable text is best in a terminal. JSON is better for CI, scripts, and
57+
other agents:
58+
59+
```bash
60+
handler --output json message send \
61+
--server apigee-gke-agent \
62+
--text "Run the readiness check"
63+
```
64+
65+
For long-running tasks, stream newline-delimited JSON:
66+
67+
```bash
68+
handler --output ndjson message stream \
69+
--server apigee-gke-agent \
70+
--text "Execute the deployment analysis"
71+
```
72+
73+
## Tune network timeouts for gateway-fronted services
74+
75+
Long-running A2A tasks may sit behind proxies, service meshes, or load
76+
balancers. Handler exposes timeout controls as global flags and environment
77+
variables:
78+
79+
```bash
80+
handler \
81+
--connect-timeout 120 \
82+
--read-timeout 120 \
83+
--write-timeout 120 \
84+
--pool-timeout 120 \
85+
--stream-read-timeout none \
86+
message stream --server apigee-gke-agent --text "Run the workflow"
87+
```
88+
89+
The streaming read timeout defaults to `none` so idle gaps between server-sent
90+
events do not abort long tasks.
91+
92+
## Production-readiness checklist
93+
94+
- Use configured servers instead of hard-coded URLs in scripts.
95+
- Store secrets in environment variables, not TOML files.
96+
- Prefer OAuth2 client credentials, bearer tokens, API keys, or mTLS according
97+
to your gateway policy.
98+
- Validate agent cards and server configuration during onboarding and CI checks.
99+
- Use `--output json` or `--output ndjson` when another system consumes results.
100+
- Use `handler task resubscribe` for recoverable streaming interruptions.
101+
- Run the local webhook receiver before integrating push notifications with a
102+
real webhook consumer.
103+
104+
## Current gaps to plan around
105+
106+
Handler is production-ready as a terminal and MCP client, but it intentionally
107+
does not replace enterprise platform controls. Plan to provide external secret
108+
management, audit logging, network policy, and centralized distribution through
109+
your existing infrastructure.

0 commit comments

Comments
 (0)