Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
An AI communication bus implementing the Model Context Protocol (MCP), the Agent2Agent (A2A) Protocol, and the Universal Memory Protocol (UMP), built with Hono on Val Town.
Three interoperability layers in one service:
- MCP — tools, resources, and prompts for AI clients like Claude Desktop
- A2A — agent-to-agent task management and messaging
- UMP — portable, bi-temporal agent memory with provenance and consent
Rendering mermaid diagram...
| Endpoint | Method | Protocol | Description |
|---|---|---|---|
/ | GET | — | Service info & endpoint listing |
/health | GET | — | Health check |
/mcp | POST | MCP | Streamable HTTP JSON-RPC endpoint |
/mcp | DELETE | MCP | Session termination |
/a2a | POST | A2A | JSON-RPC endpoint for agent communication |
/ump/capabilities | GET | UMP | Server capabilities & conformance level |
/ump/recall | POST | UMP | Search memory by query + scope |
/ump/remember | POST | UMP | Write a memory record |
/ump/memory/:id | GET | UMP | Get a single record by URN |
/ump/revise | POST | UMP | Non-destructive update (creates successor) |
/ump/forget | POST | UMP | Tombstone or hard-delete a record |
/.well-known/agent.json | GET | A2A | Agent Card for discovery |
/.well-known/ump.json | GET | UMP | UMP manifest for memory discovery |
initialize— Capability negotiation with session IDnotifications/initialized— Client ready notificationping— Health checktools/list— List available toolstools/call— Invoke a toolresources/list— List available resourcesresources/read— Read a resourceprompts/list— List available promptsprompts/get— Get a prompt template
| Tool | Description |
|---|---|
send_agent_message | Send a message to the A2A agent, creating or updating a task |
get_task | Retrieve task status, history, and artifacts |
list_tasks | List tasks with optional context/state filters |
cancel_task | Cancel an active task |
ump.capabilities | Get UMP server capabilities and conformance level |
ump.recall | Search agent memory by query + scope with ranked results |
ump.remember | Write a portable memory record |
ump.get | Retrieve a single memory record by URN |
ump.revise | Non-destructive update — creates a successor record |
ump.forget | Tombstone or hard-delete a memory record |
| URI | Description |
|---|---|
a2a://agent-card | The A2A Agent Card JSON |
a2a://tasks | All tasks in the system |
ump://capabilities | UMP server capabilities JSON |
| Prompt | Description |
|---|---|
delegate_task | Template for delegating a task to the A2A agent |
message/send— Send a message, create or update a taskmessage/stream— Send a message with SSE streaming responsetasks/get— Get task by IDtasks/list— List tasks with filterstasks/cancel— Cancel a taskping— Health check
Discovery via /.well-known/agent.json returns the agent's capabilities, skills, and endpoint URL.
working → completed | failed | canceled | rejected | input-required | auth-required
Implements the Standard (L2) conformance level: all six operations, bi-temporal valid_at queries, provenance, scope + consent enforcement, and both MCP and HTTP bindings.
| Operation | MCP Tool | HTTP Endpoint | Description |
|---|---|---|---|
capabilities | ump.capabilities | GET /ump/capabilities | Negotiation handshake |
recall | ump.recall | POST /ump/recall | Search memory with ranked results |
remember | ump.remember | POST /ump/remember | Write a memory record |
get | ump.get | GET /ump/memory/:id | Get single record by URN |
revise | ump.revise | POST /ump/revise | Non-destructive update (supersedes prior) |
forget | ump.forget | POST /ump/forget | Tombstone (soft) or erase (hard) |
Each record is a typed, scoped, bi-temporal, signed JSON object:
- Kinds:
semantic,episodic,procedural,working,identity - Scope: owner (DID), project, agent, session, visibility (private/shared/public)
- Bi-temporal: valid_from/valid_to (when the fact is true) + created/observed (when the system learned it)
- Provenance: actor, actor_kind, method, source, evidence (W3C PROV-aligned)
- Consent: retention, exportable, redact (JSON-paths stripped on export)
- Lifecycle: confidence, salience, decay, status (active/candidate/tombstoned)
- Supersession: revise creates a successor and links via supersedes/superseded_by
/.well-known/ump.json returns a manifest pointing at the UMP endpoint and advertising conformance level.
main.ts — Hono HTTP handler, routes for MCP, A2A & UMP
mcp.ts — MCP protocol handler (tools, resources, prompts)
a2a.ts — A2A protocol handler (agent card, tasks, messaging, SSE)
ump.ts — UMP protocol handler (memory records, bi-temporal, supersession)
storage.ts — SQLite persistence for tasks and messages
types.ts — Shared TypeScript types for all three protocols
curl -X POST <endpoint>/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"my-client","version":"1.0"}}}'
curl -X POST <endpoint>/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"send_agent_message","arguments":{"text":"Hello from MCP!"}}}'
curl -X POST <endpoint>/a2a \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"message/send","params":{"message":{"role":"user","parts":[{"type":"text","text":"Hello from A2A!"}]}}}'
curl -X POST <endpoint>/ump/remember \ -H "Content-Type: application/json" \ -d '{"record":{"kind":"procedural","body":{"text":"Use pnpm for this repo."},"scope":{"owner":"did:key:z6Mk...","project":"github.com/example/app","visibility":"private"},"provenance":{"actor":"did:key:z6Mk...","actor_kind":"user","method":"user_correction"}}}'
curl -X POST <endpoint>/ump/recall \ -H "Content-Type: application/json" \ -d '{"query":"package manager","scope":{"owner":"did:key:z6Mk...","project":"github.com/example/app"}}'
curl -X POST <endpoint>/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"ump.remember","arguments":{"record":{"kind":"semantic","body":{"text":"User prefers concise release notes."},"scope":{"owner":"did:key:z6Mk...","project":"github.com/example/app","visibility":"private"},"provenance":{"actor":"did:key:z6Mk...","actor_kind":"user","method":"user_correction"}}}}}'
- Model Context Protocol — v2025-06-18
- Agent2Agent Protocol — v1.0
- Universal Memory Protocol — v0.1 (L2)