A small, protocol-neutral Clojure kernel for agent interoperability over
A2A 1.0 (Agent2Agent), ACP v1 (Agent Client Protocol) and MCP
(Model Context Protocol, revisions 2024-11-05 to 2026-07-28). It is pure
.cljc, depends only on org.clojure/clojure and metosin/malli, and is
licensed MIT.
What it holds:
defprotocols from std01 §3.4. The package
ships no implementations.It works on decoded maps: there is no transport, no JSON codec and no SDK.
Wire correctness at the JVM boundary belongs to the official SDKs. Codecs to
and from those SDKs (propolis.a2a.sdk, propolis.acp.sdk) come later, once
spikes sp1 and sp2 of plan-interop-03 decide whether to adopt them.
The cljc core (clojure + malli only):
io.github.hive-agi/propolis {:mvn/version "0.1.0"}
The JVM SDK layer propolis.a2a.sdk.* ships in the same jar, but its SDK
jars are NOT in the pom: a consumer that requires those namespaces opts in by
adding them itself.
org.a2aproject.sdk/a2a-java-sdk-spec {:mvn/version "1.5.1.Final"}
org.a2aproject.sdk/a2a-java-sdk-server-common {:mvn/version "1.5.1.Final"}
org.a2aproject.sdk/a2a-java-sdk-transport-jsonrpc {:mvn/version "1.5.1.Final"}
(require '[propolis.core.content :as content]
'[propolis.core.lifecycle :as lifecycle])
(content/->a2a-part (content/text "hello")) ;=> {:text "hello"}
(content/->acp-block (content/text "hello")) ;=> {:type "text", :text "hello"}
(lifecycle/run-state->task-state :succeeded) ;=> "TASK_STATE_COMPLETED"
(lifecycle/run-state->stop-reason :cancelled) ;=> "cancelled"
(lifecycle/stop-reason->run-state "max_tokens") ;=> :failed
An MCP revision is a value, so one server can speak the legacy era
(initialize, up to 2025-11-25) and the modern one (2026-07-28, version in
every request's _meta) from the same code:
(require '[propolis.mcp.revisions :as rev]
'[propolis.mcp.results :as results]
'[propolis.mcp.schema :as schema]
'[malli.core :as m])
(rev/negotiate ["2025-06-18" "2025-03-26"] :initialize "2024-11-05") ;=> "2025-06-18"
(:code (rev/negotiate ["2026-07-28"] :meta "2025-06-18")) ;=> -32022
(results/call-tool-result "2026-07-28" [(content/->mcp-content (content/text "22.5 C"))]
{:structured {:temp 22.5}})
;=> {:content [{:type "text" :text "22.5 C"}] :resultType "complete" :structuredContent {:temp 22.5}}
(m/validate (schema/schema-for :call-tool-result "2025-06-18")
{:content [] :structuredContent [1]}) ;=> false, an object before 2026-07-28
Runnable examples, each with a test that runs it:
| example | run |
|---|---|
| (a) content on both wires | clojure -M:examples -m propolis.examples.a2a-data |
| (c) one run outcome, both protocols | clojure -M:examples -m propolis.examples.run-outcome |
| (b) codec round trip over a2a-java | clojure -M:sdk:examples-sdk -m propolis.examples.codec-round-trip |
(d) in-process DefaultRequestHandler over port values | clojure -M:sdk:examples-sdk -m propolis.examples.sdk-handler |
Additive only. Between releases a published namespace, var, schema, protocol
or table row may be added but never removed, renamed or narrowed.
freeze-policy.edn states this and clojure -T:build freeze-check enforces
it before every release. A deliberate break needs a BREAKING-CHANGE: marker
and a new minor line.
Releases are cut by CI (.github/workflows/release.yml) on a push to main
that changes src/, src-sdk/, resources/, deps.edn, version.edn or
VERSION. The release is patch+1 of max(VERSION, newest v* tag). VERSION
is 0.0.9, so the first release is 0.1.0. Nobody tags or deploys by hand.
| ns | what |
|---|---|
propolis.core.jsonrpc | Request / Notification / Response malli schemas, constructors, classify |
propolis.core.errors | JSON-RPC, A2A (-32001..-32009 with HTTP/gRPC/ErrorInfo reason) and ACP code tables; error builds the plain-data error value ports return |
propolis.core.lifecycle | WorkState hub; task-state<->work-state, stop-reason<->work-state, run-state<->work-state, composed projections; terminal/interrupted predicates |
propolis.core.content | neutral ContentBlock (:content/kind), multimethod projections ->a2a-part / a2a-part->block, ->acp-block / acp-block->block |
propolis.core.ports | IAgentDescriptor, IContentCodec |
propolis.a2a.v1.ports | IA2AMessageSender IA2AStreamer IA2ATaskReader IA2ATaskCanceller IA2APushConfigs IA2AExtendedCard; client side IA2ARemote IA2APushReceiver |
propolis.acp.v1.ports | agent side IAcpInitializer IAcpSessions IAcpSessionRestore IAcpSessionCatalog IAcpPrompter IAcpConfigurable IAcpAuthenticator; client side IAcpPermissionGate IAcpFileSystem IAcpTerminals IAcpElicitor |
propolis.mcp.revisions | MCP revisions as data (2024-11-05 .. 2026-07-28): era (legacy initialize or modern per-request _meta), features, content types; negotiate |
propolis.mcp.methods | MCP method names per revision: side, request or notification, and which 2026-07-28 moved into InputRequiredResult |
propolis.mcp.schema | malli schemas for Tool, CallToolRequestParams/Result, Resource, ReadResourceResult, ContentBlock, initialize, server/discover, InputRequiredResult, capabilities; schema-for narrows a contract to one revision |
propolis.mcp.results | pure builders of CallToolResult, ReadResourceResult, ListToolsResult, InitializeResult, DiscoverResult and the resource-not-found error, shaped per revision |
propolis.mcp.ports | server side IMcpToolCatalog IMcpToolCaller IMcpResourceCatalog IMcpResourceReader IMcpPromptCatalog IMcpCompleter; client side IMcpSampler IMcpRootsProvider IMcpElicitor |
propolis.capability | A2A card flags, ACP agentCapabilities and MCP server/client capabilities derived from satisfies? on the ports, plus honesty checks |
propolis.conformance.catalog | the 133 a2a-tck and 134 acp-tck v1 requirement rows and the 104 MCP conformance kit scenarios (from resources/propolis/conformance/tck-requirements.edn), plus gating? and mcp-required? |
propolis.conformance.cases | core-level cases as data. Each one :pins an official id (CORE-SEND-002, ACP-CANCEL-001 and so on); the checks are pure |
Strata. core names no protocol and changes rarely. The per-protocol
ports sit above it. capability reads both protocol contexts, and
conformance sits on top. Nothing depends on conformance.
Port contract. A port takes a decoded request map with the wire's
camelCase keyword keys. It returns either the response map or an
propolis.core.errors/error value. No exceptions and no Result type cross the
seam; hive adapters lift these values into their own Result types at the edge.
:sdk alias)src-sdk/ holds propolis.a2a.sdk.*, which builds on a2a-java 1.5.1.Final
(spec, server-common, transport-jsonrpc). It is reachable only through the
:sdk alias, so a consumer of the cljc core never pulls the SDK:
clojure -Spath lists no org.a2aproject jar.
| ns | what |
|---|---|
propolis.a2a.sdk.codec | pure codecs between A2A 1.0 wire maps and org.a2aproject.sdk.spec records (Message, Text/File/Data Part, Task, TaskStatus, Artifact, AgentCard, TaskStatusUpdateEvent, TaskArtifactUpdateEvent), built only through the SDK's builders; the ns doc lists the normalisations |
propolis.a2a.sdk.adapter | agent-executor: IA2AExecutor (+ IA2ATaskCanceller) -> AgentExecutor; task-store: IA2ATaskReader + IA2ATaskWriter -> TaskStore + TaskStateProvider; ->a2a-error: error value -> SDK A2AError |
clojure -M:test # core only, no SDK on the classpath
clojure -M:sdk:sdk-test:test # core + SDK codec/adapter tests
The SDK tests use the real SDK as the oracle. Their property tests send
malli-generated maps through the SDK builders and the SDK's JSON-RPC
ProtoJSON (JSONRPCUtils, ProtoUtils, JsonUtil) and back again. The
adapter tests drive a real DefaultRequestHandler.
The suite finds every *-test ns under test/. Three test namespaces cover:
tck-requirements.edn is a snapshot. On a TCK bump, re-extract the rows:
tck/requirements/*.py, from the RequirementSpec fields id,
section, level and title;src/tck/v1/requirements.py, from the Requirement fields id,
tier, capability and text.Then update the pinned commits in propolis.conformance.catalog and NOTICE,
and run the tests. cases-pin-official-ids fails if a case pins an id the new
TCK no longer has.
The branch wip/codegen-paused holds the earlier slice:
a2a.proto;propolis.a2a.v1.schema;That work is paused by plan-interop-03. It resumes only if a spike shows an SDK cannot run inside hive, or a cljc/bb consumer needs map schemas.
MIT, see LICENSE. Third-party attributions are in NOTICE.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |