Skip to content

API types ​

The capabilities-api module has the types that Wanaku components exchange, and the exceptions that they throw. The base package is ai.wanaku.capabilities.sdk.api.

Responses ​

TypePurpose
types.WanakuResponse<T>A record with error() (a WanakuError) or data() (the result). Most ServicesHttpClient operations return it.
types.WanakuErrorAn error message from a Wanaku API.
types.management.ServerInfoServer information, such as the version.

Entities ​

TypePurpose
types.WanakuEntityBase interface for all entity types.
types.LabelsAwareEntityAbstract base class for entities with labels.
types.NameNamespacePairA name and a namespace that identify an entity.
types.NamespaceA Wanaku namespace.
types.ToolReferenceA tool, with name, description, URI, type, and input schema.
types.RemoteToolReferenceA tool on a remote MCP server.
types.CallableReferenceAn entity that can be called with arguments.
types.InputSchemaThe input schema of a tool: type, properties, and required fields.
types.PropertyOne property of an input schema.
types.ResourceReferenceA resource, with location, type, and parameters.
types.ForwardReferenceA forward to a downstream MCP server.
types.PromptReferenceAn MCP prompt.
types.PromptMessageA message in an MCP prompt.
types.PromptContentBase interface for prompt content.
types.TextContent, types.ImageContent, types.AudioContent, types.EmbeddedResourceThe content kinds of a prompt message.
types.DataStoreA Barn data store entry: id, name, and data (Base64 text). Barn also returns service catalogs as DataStore.

Service templates ​

TypePurpose
types.ServiceTemplateSummaryOne template in the template list.
types.ServiceTemplateDetailThe details of one template.
types.ServiceTemplateSystemThe files of one system in a template.
types.io.TemplateInstantiationRequestThe request to make a service catalog from a template.

Code execution ​

The types.execution package has the request and event types of the code execution API: CodeExecutionRequest, CodeExecutionResponse, CodeExecutionTask, CodeExecutionStatus, CodeExecutionEvent, CodeExecutionEventType, and CodeExecutionError.

WARNING

Wanaku and Wanaku Barn on main do not serve the code execution API (/api/v2/code-execution-engine).

Service discovery ​

The discovery and types.discovery packages (RegistrationManager, DiscoveryCallback, ServiceState, HealthStatus, ActivityRecord, StandardMessages) and the types.providers package (ServiceTarget, ServiceType) describe service registration. The SDK has no implementation of RegistrationManager on main.

Utilities ​

TypePurpose
util.ReservedArgumentNamesArgument names that the Wanaku tool call protocol reserves.

Exceptions ​

All exceptions extend exceptions.WanakuException.

ExceptionThrown when
ConfigurationNotFoundExceptionAn expected configuration is not found.
DataStoreResourceNotFoundExceptionA data store entry does not exist.
EntityAlreadyExistsExceptionAn entity with the same identity already exists.
InvalidResponseTypeExceptionA response has a type other than the expected type.
NamespaceNotFoundExceptionA namespace does not exist.
NonConvertableResponseExceptionA response cannot be converted to the required type.
PromptNotFoundExceptionA prompt does not exist.
ResourceNotFoundExceptionA resource does not exist.
ServiceNotFoundExceptionA service does not exist.
ServiceUnavailableExceptionA service is not available.
ToolNotFoundExceptionA tool does not exist.

Next steps ​