Documentation

Source-of-truth docs, references, plans, and product material across Harbor surfaces.

Connector References

Cohere Port

This is the reference integration for Harbor `http_api` Action Model authoring for Cohere.

Cohereconnectorreference
Source: PortsReference/COHERE_PORT.md

Cohere Port

Purpose

This is the reference integration for Harbor http_api Action Model authoring for Cohere.

Use it when:

  • building Cohere actions in Harbor
  • extending the Dock / Hub Cohere entry
  • teaching Codex or OpenClaw how to map a model API into Harbor Ports and Harbor Actions

Harbor Port worksheet

Product

  • Product: Cohere API
  • Publisher slug: cohere
  • Publisher name: Cohere
  • Category: AI
  • Tags: cohere, ai, llm, chat, embeddings, rerank, tokenize, embed-jobs

Safe Harbor Port metadata

  • Kind: http_api
  • Label: Cohere API
  • Description: Cohere API connection managed locally through Harbor.
  • Base URL: https://api.cohere.com/
  • Auth mode: header_token
  • Auth header name: Authorization
  • Auth token prefix: Bearer

Hidden local config

  • authToken

Harbor stores the token locally only. Dock / Hub manifests must never contain it.

Harbor action design notes

Cohere is a good Harbor fit when we stay on fixed /v1 and /v2 routes, keep variable identifiers in typed input.path values, and keep prompts or embedding inputs inside input.body.

Good Harbor Cohere actions:

  • stable GET routes like /v1/models and /v1/embed-jobs/{id}
  • fixed POST routes like /v2/chat, /v2/rerank, /v2/embed, and /v1/embed-jobs
  • requestBodyMode: "none" for reads and bodyless cancellations
  • requestBodyMode: "json" for model calls and helper operations
  • resultMode: "json_summary" for all imported actions

Keep approval on by default for model execution and state changes. Chat, rerank, embeddings, batches, connectors, fine-tuning, and legacy text endpoints can all contain sensitive text, state changes, or cost-bearing inputs.

Still avoid for now:

  • vendor features that require non-JSON or non-fixed-route request handling
  • audio transcription surfaces until Harbor has a clean multipart story
  • dataset creation until Harbor has a clean multipart story
  • optional vendor-specific headers such as X-Client-Name as required Harbor config

Imported Cohere actions

Automatic read actions

  • list-models -> GET /v1/models
  • get-model -> GET /v1/models/{model}
  • check-api-key -> POST /v1/check-api-key
  • list-embed-jobs -> GET /v1/embed-jobs
  • get-embed-job -> GET /v1/embed-jobs/{id}
  • list-batches -> GET /v2/batches
  • get-batch -> GET /v2/batches/{id}
  • list-datasets -> GET /v1/datasets
  • get-dataset-usage -> GET /v1/datasets/usage
  • get-dataset -> GET /v1/datasets/{id}
  • list-connectors -> GET /v1/connectors
  • get-connector -> GET /v1/connectors/{id}
  • list-finetuned-models -> GET /v1/finetuning/finetuned-models
  • get-finetuned-model -> GET /v1/finetuning/finetuned-models/{id}
  • list-finetuned-model-events -> GET /v1/finetuning/finetuned-models/{finetuned_model_id}/events
  • list-finetuned-model-training-step-metrics -> GET /v1/finetuning/finetuned-models/{finetuned_model_id}/training-step-metrics

Approval-friendly write actions

  • chat -> POST /v2/chat
  • rerank -> POST /v2/rerank
  • embed-text -> POST /v2/embed
  • create-embed-job -> POST /v1/embed-jobs
  • cancel-embed-job -> POST /v1/embed-jobs/{id}/cancel
  • create-batch -> POST /v2/batches
  • cancel-batch -> POST /v2/batches/{id}:cancel
  • delete-dataset -> DELETE /v1/datasets/{id}
  • tokenize -> POST /v1/tokenize
  • detokenize -> POST /v1/detokenize
  • rerank-v1 -> POST /v1/rerank
  • embed-v1 -> POST /v1/embed
  • classify-text -> POST /v1/classify
  • summarize-text -> POST /v1/summarize
  • create-connector -> POST /v1/connectors
  • update-connector -> PATCH /v1/connectors/{id}
  • delete-connector -> DELETE /v1/connectors/{id}
  • authorize-connector-oauth -> POST /v1/connectors/{id}/oauth/authorize
  • create-finetuned-model -> POST /v1/finetuning/finetuned-models
  • update-finetuned-model -> PATCH /v1/finetuning/finetuned-models/{id}
  • delete-finetuned-model -> DELETE /v1/finetuning/finetuned-models/{id}

Why these actions

These routes fit Harbor's Action Model well because they:

  • stay under one fixed Cohere API origin
  • use stable, documented routes with typed identifiers
  • keep prompt-bearing inputs inside explicit JSON request bodies
  • can be reviewed as named capabilities
  • keep hidden auth entirely local to Harbor Node

Suggested operator workflow

  1. Import the Cohere Dock entry from Dock / Hub.
  2. Configure the local Cohere API key in Harbor Node.
  3. Validate list-models first to confirm local auth.
  4. Keep prompt-bearing, connector, batch, fine-tuning, and legacy text actions on require_approval unless there is a deliberate local policy reason not to.
  5. Use check-api-key, list-models, and the other read actions as the first validation path before enabling writes.

Suggested agent workflow

  1. Inspect the existing Cohere Harbor Port.
  2. Inspect live actions and drafts.
  3. Propose only fixed-route, Harbor-safe additions that match the current auth and body model, and leave multipart or SSE-only routes in TechnicalLimitations.
  4. Validate and test drafts.
  5. Request publish instead of self-publishing unless Harbor explicitly allows it.

Agents should never:

  • ask Harbor for the stored API key
  • widen Cohere into a generic arbitrary HTTP proxy
  • bypass approval for prompt-bearing or state-changing actions without operator intent

Current update strategy

For now, Cohere updates are manual:

  • update the Dock / Hub integration document in apps/hub/catalog/integrations/cohere/cohere-api.json
  • update apps/hub/catalog/integrations/cohere/ActionMap.md when the action set changes materially
  • update apps/hub/catalog/integrations/cohere/TechnicalLimitations.md when Harbor platform limits block a Cohere route
  • bump the manifest version when the action set changes materially
  • re-import into Harbor or create new drafts from the updated Dock entry

Official reference starting points

  • Cohere API overview: https://docs.cohere.com/reference/about
  • Cohere models list: https://docs.cohere.com/reference/list-models
  • Cohere get model: https://docs.cohere.com/reference/get-model
  • Cohere chat: https://docs.cohere.com/reference/chat
  • Cohere rerank: https://docs.cohere.com/reference/rerank
  • Cohere embed: https://docs.cohere.com/reference/embed
  • Cohere embed jobs: https://docs.cohere.com/reference/create-embed-job
  • Cohere batches: https://docs.cohere.com/reference/create-a-batch
  • Cohere datasets: https://docs.cohere.com/reference/list-datasets
  • Cohere connectors: https://docs.cohere.com/reference/list-connectors
  • Cohere fine-tuning: https://docs.cohere.com/reference/list-finetuned-models
  • Cohere tokenize: https://docs.cohere.com/reference/tokenize
  • Cohere detokenize: https://docs.cohere.com/reference/detokenize