# Xalora Mesh API

The Xalora Mesh REST API enables interaction with AI agents and tools through HTTP endpoints. Supports both synchronous and asynchronous operations.

This API is part of the [open source Xalora Agent Framework](https://github.com/XaloraAI/Xalora-agent-framework/tree/main/mesh). Contributions are highly encouraged!

### [​](https://docs.heurist.ai/dev-guide/heurist-mesh/introduction#quick-start)Quick Start <a href="#quick-start" id="quick-start"></a>

Copy

```
// Example: Get token info synchronously
const response = await fetch("https://sequencer-v2.xalora.xyz/mesh_request", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    api_key: "YOUR_API_KEY",
    agent_id: "CoinGeckoTokenInfoAgent",
    input: {
      tool: "get_token_info",
      tool_arguments: { coingecko_id: "solana" },
      raw_data_only: true
    }
  })
});
```

### [​](https://docs.heurist.ai/dev-guide/heurist-mesh/introduction#endpoints)Endpoints <a href="#endpoints" id="endpoints"></a>

#### [​](https://docs.heurist.ai/dev-guide/heurist-mesh/introduction#synchronous-request)Synchronous Request <a href="#synchronous-request" id="synchronous-request"></a>

`POST /mesh_request`

Make a request with immediate response.

Copy

```
{
  "api_key": "your_api_key_here",
  "agent_id": "agent_identifier",
  "input": {
    // Use either query OR tool+tool_arguments
    "query": "natural language query",
    // OR
    "tool": "tool_name",
    "tool_arguments": { /* tool-specific args */ },
    "raw_data_only": false  // optional, defaults to false
  }
}

// Response
{
  "result": { /* agent-specific response data */ }
}
```

#### [​](https://docs.heurist.ai/dev-guide/heurist-mesh/introduction#create-asynchronous-task)Create Asynchronous Task <a href="#create-asynchronous-task" id="create-asynchronous-task"></a>

`POST /mesh_task_create`

Create a task and receive a task ID.

Copy

```
{
  "api_key": "your_api_key_here",
  "agent_id": "agent_identifier",
  "agent_type": "AGENT",  // optional
  "task_details": {
    // Use either query OR tool+tool_arguments
    "query": "natural language query",
    // OR
    "tool": "tool_name",
    "tool_arguments": { /* tool-specific args */ },
    "raw_data_only": false  // optional, defaults to false
  }
}

// Response
{
  "task_id": "unique_task_identifier",
  "msg": "status_message"
}
```

#### [​](https://docs.heurist.ai/dev-guide/heurist-mesh/introduction#query-task-status)Query Task Status <a href="#query-task-status" id="query-task-status"></a>

`POST /mesh_task_query`

Check status and get results of an async task.

Copy

```
{
  "api_key": "your_api_key_here",
  "task_id": "task_identifier"
}

// Response
{
  "status": "task_status",
  "reasoning_steps": [  // present when available
    {
      "timestamp": 1234567890,
      "content": "step description",
      "is_sent": true
    }
  ],
  "result": {  // present when task is complete
    "response": "agent response data",
    "success": true  // or false
  }
}
```

### [​](https://docs.heurist.ai/dev-guide/heurist-mesh/introduction#available-agents)Available Agents <a href="#available-agents" id="available-agents"></a>

The Mesh API provides access to a growing collection of specialized agents. For a complete and up-to-date list, see the [Available Mesh Agents](https://github.com/XaloraAI/Xalora-agent-framework/tree/main) section in the main repository README.

#### [​](https://docs.heurist.ai/dev-guide/heurist-mesh/introduction#agent-metadata)Agent Metadata <a href="#agent-metadata" id="agent-metadata"></a>

To discover all available agents, their capabilities, and required parameters, use the metadata endpoint:

Copy

```
// Fetch agent metadata
const metadata = await fetch("https://mesh.xalora.ai/metadata.json")
  .then(response => response.json());

// Example: Get tools for a specific agent
const agentTools = metadata.agents["CoinGeckoTokenInfoAgent"].tools;
```

### [​](https://docs.heurist.ai/dev-guide/heurist-mesh/introduction#use-cases)Use Cases <a href="#use-cases" id="use-cases"></a>

#### [​](https://docs.heurist.ai/dev-guide/heurist-mesh/introduction#natural-language-query)Natural Language Query <a href="#natural-language-query" id="natural-language-query"></a>

Copy

```
// Synchronous
const response = await fetch("https://sequencer-v2.xalora.xyz/mesh_request", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    api_key: "YOUR_API_KEY",
    agent_id: "CoinGeckoTokenInfoAgent",
    input: {
      query: "What is the current price of Bitcoin?",
      raw_data_only: false
    }
  })
});

// Asynchronous
const taskResponse = await fetch("https://sequencer-v2.xalora.xyz/mesh_task_create", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    api_key: "YOUR_API_KEY",
    agent_id: "CoinGeckoTokenInfoAgent",
    task_details: {
      query: "What is the current price of Bitcoin?",
      raw_data_only: false
    }
  })
});
const { task_id } = await taskResponse.json();
```

#### [​](https://docs.heurist.ai/dev-guide/heurist-mesh/introduction#tool-execution)Tool Execution <a href="#tool-execution" id="tool-execution"></a>

Copy

```
// Raw data (synchronous)
const response = await fetch("https://sequencer-v2.xalora.xyz/mesh_request", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    api_key: "YOUR_API_KEY",
    agent_id: "CoinGeckoTokenInfoAgent",
    input: {
      tool: "get_token_info",
      tool_arguments: { coingecko_id: "solana" },
      raw_data_only: true
    }
  })
});
```

### [​](https://docs.heurist.ai/dev-guide/heurist-mesh/introduction#client-libraries)Client Libraries <a href="#client-libraries" id="client-libraries"></a>

* Python: Xalora Mesh Xalora Client
* Coming soon: Official integration in the[ Xalora SDK](https://github.com/XaloraAI/Xalora-sdk)

### [​](https://docs.heurist.ai/dev-guide/heurist-mesh/introduction#reference)Reference <a href="#reference" id="reference"></a>

#### [​](https://docs.heurist.ai/dev-guide/heurist-mesh/introduction#base-url)Base URL <a href="#base-url" id="base-url"></a>

`https://sequencer-v2.xalora.xyz`

#### [​](https://docs.heurist.ai/dev-guide/heurist-mesh/introduction#authentication)Authentication <a href="#authentication" id="authentication"></a>

All requests require an API key in the request payload at the root level.

#### [​](https://docs.heurist.ai/dev-guide/heurist-mesh/introduction#response-models)Response Models <a href="#response-models" id="response-models"></a>

**Task Result**

Copy

```
{
  "response": "any",  // varies by agent
  "success": true     // boolean
}
```

**Reasoning Step**

Copy

```
{
  "timestamp": 1234567890,  // Unix timestamp
  "content": "string",      // step description
  "is_sent": true           // boolean
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xalora-ai.gitbook.io/xalora-ai-docs/rest-api/xalora-mesh-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
