## Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://dev.writer.com/llms.txt)

Use this file to discover all available pages before exploring further.

---

### 2026-06-02

**Python and Node SDK v3.0.0**

## Released version 3.0.0 of the Python and Node SDKs

Version 3.0.0 of the [Python](https://github.com/writer/writer-python) and [Node](https://github.com/writer/writer-node) SDKs includes the following changes:

- Removes AI detection, Medical Comprehend, and Context-Aware Text Splitting from the Python and Node SDKs
- Removes deprecated MCP tool schemes from the Node SDK MCP server

See below for more details about each of these changes.

### Removed API methods

Version 3.0.0 removes the following methods from the Python and Node SDKs. You cannot call these methods in 3.0.0:

- AI detection
- [Medical Comprehend](https://dev.writer.com/api-reference/migration-guides/comprehend-medical)
- Context-Aware Text Splitting

If your application uses any of these methods, update your code before upgrading to 3.0.0.

### Node SDK

The Node SDK MCP server now only supports **code mode**. Removed tool schemes:

- **All tools** (`--tools=all`): exposed one MCP tool per API endpoint
- **Dynamic tools** (`--tools=dynamic`): exposed tools to discover and invoke API endpoints dynamically

Removed flags also include `--resources`, `--tags`, `--client`, and related filtering and compatibility options. Before upgrading to 3.0.0, remove those flags from your startup command and invoke the server with `npx -y writer-sdk-mcp@latest` or `node /path/to/mcp/server`. Supported flags are `--port`, `--transport`, `--socket`, and `--tools=docs`.

---

### 2026-02-06

**Python SDK v2.4.0**

## Released version 2.4.0 of the Python SDK

Version 2.4.0 of the [Python SDK](https://github.com/writer/writer-python) includes updated default retry behavior and Knowledge Graph file upload support.

### Default retry behavior

Retry defaults are now:

- **Maximum retries**: 7 attempts
- **Initial delay**: 1 second
- **Maximum delay**: 60 seconds

Override these defaults by passing `max_retries` when instantiating the client. See the [Python SDK documentation](https://github.com/writer/writer-python) for details.

### Knowledge Graph file upload support

You can now pass the `graphId` parameter when [uploading files](https://dev.writer.com/home/files#upload-a-file) to associate files with a Knowledge Graph during upload. When you provide a `graphId`, the uploaded file is automatically attached to the specified Knowledge Graph.

**Python Example**
```python
from pathlib import Path
from writerai import Writer

# Initialize the Writer client. If you don't pass the `api_key` parameter,
# the client looks for the `WRITER_API_KEY` environment variable.
client = Writer()

file_path = Path("<FILE_PATH>")  # Replace with your file path, for example: /path/to/document.pdf
file_name = file_path.name  # Get the filename from the path
file_ = client.files.upload(
  content=file_path.read_bytes(),
  content_disposition=f"attachment; filename={file_name}",  # Replace with your file name, for example: document.pdf
  content_type="application/pdf",
  graph_id="<GRAPH_ID>"  # Replace with your Knowledge Graph ID, for example: 6029b226-1ee0-4239-a1b0-cdeebfa3ad5a
)

print(file_.id)
```

**JavaScript Example**
```javascript
import fs from 'fs';
import { Writer } from "writer-sdk";

// Initialize the Writer client. If you don't pass the `api_key` parameter,
// the client looks for the `WRITER_API_KEY` environment variable.
const client = new Writer();

const file = await client.files.upload({
  content: fs.createReadStream("<FILE_PATH>"),  // Replace with your file path, for example: /path/to/document.pdf
  "Content-Disposition": "attachment; filename=<FILE_NAME>",  // Replace with your file name, for example: document.pdf
  "Content-Type": "application/pdf", // Replace with your file type, for example: application/pdf
  graphId: "<GRAPH_ID>"  // Replace with your Knowledge Graph ID, for example: 6029b226-1ee0-4239-a1b0-cdeebfa3ad5a
});

console.log(file.id);
```

For more information, see the [file management guide](https://dev.writer.com/home/files#upload-a-file).

---

### 2025-12-02

**External models and guardrails**

## External models and guardrails now available

You can now add external models from providers like AWS Bedrock to use alongside Palmyra models in AI Studio. You can also configure guardrails from third-party providers such as AWS Bedrock to monitor and filter agent inputs and outputs, helping enforce content safety and compliance.

### External models

Add models from AWS Bedrock directly in the AI Studio UI. Once configured, external models appear in the [list models endpoint](https://dev.writer.com/api-reference/completion-api/list-models) and can be used in chat completions by specifying the model ID. To use an external model, pass its model ID to the `model` parameter in your API requests:

```bash
curl -X POST https://api.writer.com/v1/chat \
  -H "Authorization: Bearer $WRITER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-external-model-id",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
```

For setup instructions, see the [external models guide](https://dev.writer.com/home/external-models).

### Guardrails

Configure AWS Bedrock Guardrails to enforce content safety, PII protection, and compliance policies across your AI agents. Guardrails can evaluate requests before, during, or after model calls. For setup instructions, see the [guardrails guide](https://dev.writer.com/home/guardrails).

---

### 2025-10-03

**Python and Node SDK v2.3.2**

## Released version 2.3.2 of the Python and Node SDKs

Version 2.3.2 of the [Python](https://github.com/writer/writer-python) and [Node](https://github.com/writer/writer-node) SDKs adds support for the following new features:

### Knowledge Graph query configuration

Added support for the `query_config` parameter in both chat completions with Knowledge Graph tools and direct Knowledge Graph queries. This parameter allows you to fine-tune search behavior and control response generation. Key configuration options:

- **`inline_citations`**: Enable inline citations within response text
- **`search_weight`**: Control the balance between keyword and semantic search
- **`grounding_level`**: Control how closely responses match source material
- **`max_snippets`**: Set the number of text snippets to retrieve
- **`keyword_threshold`**: Set keyword matching strictness
- **`semantic_threshold`**: Set semantic similarity requirements

### Inline citations

SDK support for inline citations in Knowledge Graph responses, allowing you to programmatically extract and correlate citations with their source material. Citations appear in the format `[filename](cite_id)` within response text and you can match them with source data from the `references` object.

### Upload types for no-code applications

Added support for the `upload_types` parameter in no-code applications, allowing you to see which file types you can upload through file input fields. For more details on these features:

- Knowledge Graph query configuration: [Knowledge Graph query configuration guide](https://dev.writer.com/home/knowledge-graph-query-config)
- Inline citations: [Work with inline citations](https://dev.writer.com/home/inline-citations)
- Upload types: [No-code applications API reference](https://dev.writer.com/api-reference/application-api/application-details).

---

### 2025-09-11

**Knowledge Graph query configuration and inline citations**

## Knowledge Graph query configuration and inline citations

Added comprehensive query configuration options for Knowledge Graph operations, allowing you to fine-tune search behavior and enable inline citations in responses from the [Knowledge Graph chat completions tool](https://dev.writer.com/home/kg-chat) and [direct Knowledge Graph queries](https://dev.writer.com/home/kg-query).

### New query configuration parameters

The `query_config` parameter is now available for both chat completions with Knowledge Graph tools and direct Knowledge Graph queries. This parameter includes:

- **`inline_citations`**: Enable inline citations within response text, showing which sources support each part of the response
- **`search_weight`**: Control the balance between keyword and semantic search (0-100, default: 50)
- **`max_subquestions`**: Set the maximum number of sub-questions for complex queries (1-10, default: 6)
- **`grounding_level`**: Control how closely responses match source material (0.0-1.0, default: 0.0)
- **`max_snippets`**: Set the number of text snippets to retrieve (5-25 recommended, default: 30)
- **`max_tokens`**: Control the maximum response length (100-8000, default: 4000)
- **`keyword_threshold`**: Set keyword matching strictness (0.0-1.0, default: 0.7)
- **`semantic_threshold`**: Set semantic similarity requirements (0.0-1.0, default: 0.7)

For detailed information about all configuration options and their effects, see the [Knowledge Graph query configuration guide](https://dev.writer.com/home/knowledge-graph-query-config). For more information about inline citations, see the [Work with inline citations in Knowledge Graph responses](https://dev.writer.com/home/inline-citations) guide.

---

### 2025-08-20

**Python and Node SDK v2.3.1**

## Released version 2.3.1 of the Python and Node SDKs

This patch release fixes a bug introduced in version 2.3.0 where the `Graph` class wasn’t accessible. The `Graph` class is now available in the Python and Node SDKs as it was previously. For more information on working with Knowledge Graphs with the Python and Node SDKs, see the [Knowledge Graphs usage guide](https://dev.writer.com/home/knowledge-graph).

---

### 2025-08-19

**langchain-writer v0.3.3**

## langchain-writer v0.3.3

The [langchain-writer](https://github.com/writer/langchain-writer) package now includes the [web search tool](https://dev.writer.com/home/web-search-tool) for chat completions. This tool allows you to search the web for current information during a conversation with a Palmyra model. For more details, see the [langchain-writer changelog](https://github.com/writer/langchain-writer/releases/tag/v0.3.3).

---

### 2025-08-14

**Python and Node SDK v2.3.0**

## Released version 2.3.0 of the Python and Node SDKs

Version 2.3.0 of the [Python](https://github.com/writer/writer-python) and [Node](https://github.com/writer/writer-node) SDKs adds support for the following new features:

- [Web search API](https://dev.writer.com/home/changelog#web-search-api)
- [Web search tool for chat completions](https://dev.writer.com/home/changelog#web-search-tool-for-chat-completions)
- [Web connector URLs for Knowledge Graphs](https://dev.writer.com/home/changelog#web-connector-urls-for-knowledge-graphs)
- [Image support in chat completions](https://dev.writer.com/home/changelog#image-support-in-chat-completions)

See below for more details about each of these features.

### Web search and web connector URLs

Three new features are now available to enhance your AI applications with web content and search capabilities:

### Web search API

The new [web search tool API](https://dev.writer.com/home/web-search) allows you to search the web for current information and get real-time results. This tool is useful for finding factual information, news, and data that may not be available in your model’s training data. Key features:

- Search for current information and news
- Filter results by domain, time range, and geographic location
- Control search depth and result comprehensiveness
- Support for both general and news-specific searches

### Web search tool for chat completions

The [web search prebuilt tool](https://dev.writer.com/home/web-search-tool) for chat completions enables your AI assistant to search the web during conversations with Palmyra models. This allows your AI to provide up-to-date information and answer questions about current events.

### Web connector URLs for Knowledge Graphs

[Web connector URLs](https://dev.writer.com/home/web-connector-url) allow you to automatically extract and index content from websites into your Knowledge Graphs. This enables you to:

- Process single pages or entire sub-pages
- Monitor the status of URL processing
- Exclude specific URLs from processing
- Query web content through your Knowledge Graph

### Image support in chat completions

Added support for [mixed content in chat completions](https://dev.writer.com/home/chat-with-images) with Palmyra X5, allowing you to include images directly in your chat messages. This feature enables rich visual conversations without needing to use the separate Vision tool.

---

### 2025-08-12

**Vision chat support for Palmyra X5**

### Vision chat support for Palmyra X5

Added support for [mixed content in chat completions](https://dev.writer.com/home/chat-with-images) with Palmyra X5, allowing you to include images directly in your chat messages. This feature enables rich visual conversations without needing to use the separate Vision tool. Key capabilities:

- Send messages containing both text and images
- Support for multiple images in a single message
- Use of data URLs for local images
- Natural conversation flow with visual context

Below is an example of a chat completion request that includes a message with both text and an image.

**cURL Example**
```bash
curl --location 'https://api.writer.com/v1/chat' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $WRITER_API_KEY" \
--data '{
  "model": "palmyra-x5",
  "messages": [\
    {\
      "role": "user",\
      "content": [\
        {\
          "type": "text",\
          "text": "What do you see in this image?"\
        },\
        {\
          "type": "image_url",\
          "image_url": {\
            "url": "https://example.com/image.jpg"\
          }\
        }\
      ]\
    }\
  ]
}'
```

**Python Example**
```python
from writerai import Writer

# Initialize the client. If you don't pass the `apiKey` parameter,
# the client looks for the `WRITER_API_KEY` environment variable.
client = Writer()

response = client.chat.chat(
  model="palmyra-x5",
  messages=[\
    {\
      "role": "user",\
      "content": [\
        {\
          "type": "text",\
          "text": "What do you see in this image?"\
        },\
        {\
          "type": "image_url",\
          "image_url": {\
            "url": "https://example.com/image.jpg"\
          }\
        }\
      ]\
    }\
  ]
)

print(response.choices[0].message.content)
```

**JavaScript Example**
```javascript
import { Writer } from "writer-sdk";

// Initialize the client. If you don't pass the `api_key` parameter,
// the client looks for the `WRITER_API_KEY` environment variable.
const client = new Writer();

const response = await client.chat.chat({
  model: "palmyra-x5",
  messages: [\
    {\
      role: "user",\
      content: [\
        {\
          type: "text",\
          text: "What do you see in this image?"\
        },\
        {\
          type: "image_url",\
          image_url: {\
            url: "https://example.com/image.jpg"\
          }\
        }\
      ]\
    }\
  ]
});

console.log(response.choices[0].message.content);
```

---

### 2025-01-27

**Web search and web connector URLs released**

## Web search and web connector URLs released
Three new features are now available to enhance your AI applications with web content and search capabilities:

### Web search tool API
The new [web search tool API](https://dev.writer.com/home/web-search) allows you to search the web for current information and get real-time results. This tool is useful for finding factual information, news, and data that may not be available in your model’s training data. Key features:

### Web search tool for chat completions
The [web search prebuilt tool](https://dev.writer.com/home/web-search-tool) for chat completions enables your AI assistant to search the web during conversations with Palmyra models. This allows your AI to provide up-to-date information and answer questions about current events.

### Web connector URLs for Knowledge Graphs
[Web connector URLs](https://dev.writer.com/home/web-connector-url) allow you to automatically extract and index content from websites into your Knowledge Graphs. This enables you to:

For more information, see the following guides:

- [Web search tool API documentation](https://dev.writer.com/api-reference/tool-api/web-search)
- [Web search tool for chat completions](https://dev.writer.com/home/web-search-tool)
- [Web connector URLs for Knowledge Graphs](https://dev.writer.com/home/web-connector-url)
