> For the complete documentation index, see [llms.txt](https://docs.agentlabs.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.agentlabs.dev/core-concepts/messages/typewriter-animation.md).

# 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.
