Skip to content

Mesh Agent

The mesh agent routes queries to Svantic mesh agents and knowledge bases. It sends the phase prompt to the configured mesh endpoint, receives a conversational response, and writes the transcript to the workspace.

Unlike most agents, role files are optional for mesh phases — the query can be derived entirely from upstream context. Use the mesh agent when you need to incorporate enterprise knowledge, consult specialized AI assistants, or tap into pre-built mesh conversational workflows.


- name: research
agent: mesh
role: researcher
depends_on: [fetch-context]

FieldTypeRequiredDescription
namestringYesUnique phase name within the workflow
typestringNoDefaults to "standard"
agentstringYesMust be "mesh"
rolestringNoOptional role file — mesh can derive context from upstream handoffs alone
depends_onstring[]NoUpstream phases that must complete before this phase runs
sourcesSourceEntry[]NoOptional context sources to augment the mesh query
FieldTypeRequiredDescription
namestringYesIdentifier for the source
filestringNoWorkspace file to include as context

Sources provide additional context to the mesh query beyond what the role file and upstream handoffs supply. They’re useful for grounding the conversation in specific documents or data.


Configure under agents.mesh in settings.json (via cliq setup or cliq settings):

KeyRequiredDefaultDescription
agents.mesh.urlYesMesh endpoint URL
agents.mesh.client_idYesOAuth2 client ID for mesh authentication
agents.mesh.client_secretYesOAuth2 client secret for mesh authentication

{
"data": {
"session_id": "mesh-sess-a1b2c3d4",
"messages": 6
},
"text": "Mesh conversation transcript written to workspace"
}
FieldLocationDescription
session_iddata.session_idUnique identifier for the mesh conversation session
messagesdata.messagesTotal number of messages exchanged in the conversation

The mesh agent writes the full conversation transcript to .cliq/files/{phase}/transcript.md. This file contains the complete question-and-answer exchange and is available to downstream phases.

commands:
- name: check-session
run: 'echo "Mesh session $(handoff.consult.data.session_id) had $(handoff.consult.data.messages) messages"'

Example: Consult a knowledge base before implementation

Section titled “Example: Consult a knowledge base before implementation”

Query an enterprise knowledge base for architectural guidance, then pass the response to an implementation phase.

phases:
- name: consult-architecture
agent: mesh
role: architecture-advisor
sources:
- name: requirements
file: requirements.md
- name: implement
agent: cursor
depends_on: [consult-architecture]

Example: Context-only mesh query (no role file)

Section titled “Example: Context-only mesh query (no role file)”

Derive the query entirely from upstream context — no role file needed.

phases:
- name: fetch-ticket
agent: jira
action: get_issue
sources:
- name: ticket.json
ref: PROJ-789
- name: consult-docs
agent: mesh
depends_on: [fetch-ticket]
- name: implement
agent: cursor
depends_on: [consult-docs]

Example: Specialized mesh agent for compliance review

Section titled “Example: Specialized mesh agent for compliance review”

Route a compliance question to a domain-specific mesh agent with supporting documents.

phases:
- name: implement
agent: cursor
- name: compliance-check
agent: mesh
role: compliance-reviewer
depends_on: [implement]
sources:
- name: policy
file: docs/data-policy.md
- name: regulations
file: docs/gdpr-summary.md
- name: review
type: gate
agent: hug
depends_on: [compliance-check]
review:
reviewer: legal-team

  1. Obtain your Svantic mesh credentials (client ID and client secret) from your mesh administrator
  2. Identify the mesh endpoint URL for your organization
Terminal window
cliq settings agents.mesh.url "https://mesh.example.com/api/v1" --global
cliq settings agents.mesh.client_id "your-client-id" --global
echo $MESH_SECRET | cliq settings agents.mesh.client_secret --stdin --global
cliq doctor agent mesh

cliq doctor agent mesh checks:

  • agents.mesh.url, agents.mesh.client_id, and agents.mesh.client_secret are configured
  • Mesh endpoint is reachable
  • Credentials can authenticate successfully