# Typewriter animation

We explained in the previous section that you can use either the `send` method (for one-off messages) or the `write` method (for sending streams).

But sometimes, you want to send some one-off messages that look like streams.

Since `v0.0.51` the Node and Python SDKs provide a `typewrite()` method that allows you to simulate a stream with a smooth animation, even if you know the content in advance.

{% embed url="<https://youtu.be/g-by2BSPFAA>" %}
Showcasing typewriter animation using typewrite()
{% endembed %}

{% hint style="info" %}
The full code of this video is [available here](https://github.com/agentlabs-inc/agent-examples/tree/main/nodejs-examples/ts-typewrite-vs-send).
{% endhint %}

### How it works?

{% tabs %}
{% tab title="TypeScript" %}

```typescript
await agent.typewrite({
    conversationId: "conversationId",
    text: "Here's your message",
    intervalMs: 60, // optional
    initialDelayMs: 1500, // optional
});
```

{% endtab %}

{% tab title="Python" %}

```python
agent.typewrite(
    conversationId="conversationId",
    text="Here's your message",
    interval_ms=60, # optional
    initial_delay_ms=1600 # optional
)
```

{% endtab %}
{% endtabs %}

Behind the scenes, AgentLabs will instantiate a new stream and start sending the stream with a nice typewriter effect.


---

# 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://docs.agentlabs.dev/core-concepts/messages/typewriter-animation.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.
