API referenceInstance API
GUIDE & REFERENCE

gRPC, Arrow Flight, and MCP

The instance's additional protocol surfaces, exact message definitions, service dependencies, and access boundaries.

The daemon starts multiple listeners when their services are enabled. They do not share one authentication implementation. Use the HTTP capability contract for the customer-facing instance API; the current gRPC and Flight listeners are internal transport surfaces whose source lacks equivalent signed-request verification.

SurfaceDefault listenerStartup dependency
HTTP0.0.0.0:8080Main daemon router
Daemon gRPC0.0.0.0:50053enable_conductor and an initialized cognitive orchestrator
SNN coordination gRPCSame gRPC listenerA federation coordinator is present
Arrow Flight0.0.0.0:50054enable_flight and an initialized database
Router service0.0.0.0:50051enable_router; a separate router crate owns this protocol
Conductor HTTP0.0.0.0:8082Separate conductor router and authentication configuration

The address overrides are AKASHA_HTTP_ADDR, AKASHA_GRPC_ADDR, AKASHA_FLIGHT_ADDR, AKASHA_ROUTER_ADDR, and AKASHA_CONDUCTOR_ADDR. These are listener defaults, not published hosted addresses.

Daemon gRPC

Service name: akasha.daemon.v1.AkashaDaemon.

RPCRequestResponseBehavior
HealthEmptyHealthResponseReturns the daemon service's health state.
SqlQuerySqlQueryRequestSqlQueryResponseExecutes SQL and returns one JSON string per row.
ProcessCognitiveEventCognitiveProcessEventRequestCognitiveProcessEventResponseParses the event payload JSON and passes it to the orchestrator.
GetCognitiveMetricsCognitiveMetricsRequestCognitiveMetricsResponseReturns metrics encoded as a JSON string.
QueryCognitiveContextCognitiveContextQueryRequestCognitiveContextQueryResponseReturns retrieved context encoded as a JSON string.
TrainSupervisedTrainSupervisedRequestTrainSupervisedResponseSubmits numeric feature/label training samples with optional training parameters.
TrainHrmTrainHrmRequestTrainHrmResponseSubmits domain/keyspace-based HRM training configuration. Deprecated inputs/targets fields remain in the schema.

CapabilityContext is a protobuf message containing namespace, actor, action, keyspace, and expiry fields. In this source, scoped_db_from_context converts it directly into a payload and requests a scoped database. If it is absent, the handler can use the default database. The tonic startup path does not install a signature-verifying interceptor or TLS configuration. This is a source implementation gap, not an authenticated public capability credential. Network access must be controlled by the instance operator until that boundary is implemented.

The exact protobuf files are included in the protocol wire definitions. Runtime source: akasha-daemon/src/grpc.rs; listener wiring: serve_grpc in akasha-daemon/src/main.rs.

SNN coordination gRPC

Service name: akasha.snn.SnnCoordination.

RPCRequestResponse
RegisterAgentAgentRegistrationRegistrationResponse
SubmitWeightUpdatesWeightUpdateBatchUpdateResponse
GetGlobalParametersParameterRequestGlobalParameters
PropagateSpikeEventSpikeEventPropagationResponse
QueryCapabilitiesCapabilityQueryCapabilityResponse

These messages carry agent IDs, ensemble/connection identifiers, numeric parameter arrays, capabilities, visibility, and timestamps. They call the shared federation coordinator. The listener has the same interceptor gap described above; a supplied agent ID is not proof of authenticated identity.

Arrow Flight

The Flight implementation is a SQL query transport built on the standard arrow.flight.protocol.FlightService. It is not a complete Flight SQL command implementation.

Create a ticket or a command descriptor whose bytes contain UTF-8 JSON:

{"sql":"SELECT 1"}
Flight methodCurrent behavior
HandshakeReturns protocol version 0 and an empty payload. No credential verification occurs.
ListFlightsEmpty stream.
GetFlightInfoValidates a non-empty UTF-8 JSON command, returns that command as a ticket, unknown record/byte counts (-1), and an empty schema field.
GetSchemaExecutes the SQL using the default database, then returns encoded schema data from the first batch, or an empty schema when no batches exist.
DoGetParses the SQL ticket, executes it against the default database, and streams encoded Arrow record batches.
PollFlightInfoUNIMPLEMENTED.
DoPutUNIMPLEMENTED.
DoExchangeUNIMPLEMENTED.
DoActionUNIMPLEMENTED.
ListActionsEmpty stream.

Missing command/ticket bytes, invalid UTF-8, and malformed JSON return INVALID_ARGUMENT. Missing database state returns UNAVAILABLE; SQL and encoding errors map to INTERNAL in this transport.

Unlike the HTTP request path, Flight calls state.require_db() rather than deriving a database from a signed namespace capability. Its server builder installs no authentication interceptor. Do not infer tenant isolation or public API authorization from a successful Flight handshake.

Source: akasha-daemon/src/flight.rs and serve_flight in akasha-daemon/src/main.rs.

MCP over the instance HTTP API

The daemon exposes the MCP tool registry through ordinary JSON HTTP operations:

POST /v1/mcp/tools/list
Content-Type: application/json
x-akasha-capability: <issued-signed-capability>

{}

The response has a tools array. Each tool description contains name, description, and inputSchema. Fetch that list from the configured instance because enabled profiles and disabled-tool filters alter the registry.

POST /v1/mcp/tools/call
Content-Type: application/json
x-akasha-capability: <issued-signed-capability>

{
  "name": "recall",
  "arguments": {"query": "What did we decide about the launch?"}
}

These endpoints expect the shown REST body, not a JSON-RPC envelope. Their namespace and actor come from authenticated request authority. The optional namespace request field is for Cambium recall augmentation; it is not a substitute for that authority.

The public authority map includes remember, store_episode, store_fact, store_procedure, run_procedure, recall, search_similar, search_temporal, forget, introspect, reflect, link_concepts, namespace_status, tool_profile_status, configure_index, raw_query, batch_import, and export_memories. A registered tool without a public authority mapping is rejected with 403. raw_query and batch_import require an explicit non-empty keyspace; export requires explicit memory_types. Vault export is explicitly rejected by the current HTTP backend.

The connection-information route currently labels its registry embedded/stdio; that value does not create a stdio transport on the HTTP listener. A separate MCP executable under akasha/mcp provides its own stdio/SSE transport. Do not treat the daemon's registry wrapper as a generic remote MCP connection URL.

See MCP HTTP operations for request/response assembly and protocol wire definitions for source tool schemas. Source: akasha-daemon/src/mcp/handlers.rs, akasha-daemon/src/request_authority.rs, and akasha/mcp/src/tools/mod.rs.

On this page