Skip to content

Commit a159374

Browse files
committed
Update the README
1 parent 82e8094 commit a159374

File tree

1 file changed

+40
-50
lines changed

1 file changed

+40
-50
lines changed

README.md

Lines changed: 40 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,88 @@
11
<a href="https://blink.so#gh-dark-mode-only">
2-
<img src="./scripts/logo-white.svg" style="height: 50px;">
2+
<img src="./scripts/logo-white.svg" style="height: 40px;">
33
</a>
44
<a href="https://blink.so#gh-light-mode-only">
5-
<img src="./scripts/logo-black.svg" style="height: 50px;">
5+
<img src="./scripts/logo-black.svg" style="height: 40px;">
66
</a>
77

88
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
99
[![discord](https://img.shields.io/discord/747933592273027093?label=discord)](https://discord.gg/coder)
1010
![NPM Version](https://img.shields.io/npm/v/blink)
1111

12-
## Blink Overview
12+
Blink is a way to build and deploy chat agents with the AI SDK.
1313

14-
Blink is an MIT-licensed agent development engine that provides a complete foundation for building, deploying, and scaling AI agents as code. We believe language models are the core of the experience, and Blink gives you the freedom to use them to their full potential.
14+
```ts
15+
import { Agent } from "blink";
16+
import { sendMessages } from "ai";
1517

16-
Bring your own LLM keys to build and run Blink agents locally. Deployment to Blink Cloud will never be required. You can develop, test, and run agents entirely on your own machine without even creating a Blink Cloud account.
18+
const agent = new Agent();
1719

18-
- **Blink agents are Node.js servers** written in TypeScript that handle chat messages, webhooks, and API requests over HTTP.
19-
- **Blink comes with comprehensive SDKs** that give you the ability to deploy agents to Slack and GitHub with ease
20-
- **The platform handles all the infrastructure** complexity with serverless deployment, logging, and scaling, so you can focus on building
21-
- **Full portability between local development and production** with identical behavior across environments
22-
- **Use the popular Vercel AI SDK** with support for multiple LLM providers and streaming responses
20+
agent.on("chat", ({ messages }) => {
21+
return sendMessages({
22+
model: "anthropic/claude-sonnet-4.5",
23+
messages: convertToModelMessages(messages),
24+
});
25+
});
2326

24-
## Getting Started
27+
agent.serve();
28+
```
2529

26-
Creating your first agent or Slackbot is quick with the Blink CLI. You can build, test, and start chatting with your agent in Slack in just a few minutes, right from your terminal.
30+
To chat with the agent, run `blink dev` to enter a terminal interface.
2731

28-
https://github.com/user-attachments/assets/6bb73e58-b4ae-4543-b2c0-0e1195113ba6
32+
- Leverages the familiar [AI SDK](https://github.com/vercel/ai) at it's core.
33+
- SDKs for making Slack and GitHub bots.
34+
- Run your agent locally without ever deploying to the cloud.
2935

30-
### Use your favorite package manager to globally install `blink`:
36+
## Get Started
37+
38+
Install Blink:
3139

32-
```sh
33-
bun i -g blink
34-
```
3540
```sh
3641
npm i -g blink
3742
```
38-
```sh
39-
pnpm add -g blink
40-
```
41-
```sh
42-
yarn global add blink
43-
```
4443

45-
### Create an agent:
44+
Create your first agent:
4645

4746
```sh
48-
mkdir my-agent
49-
cd my-agent
47+
# creates the agent source code in your current directory
5048
blink init
49+
50+
# starts a hot-reloading terminal interface to chat with your agent
51+
blink dev
5152
```
5253

53-
> [!NOTE]
54-
> You'll need to provide your own LLM API keys. Add them during `blink init` or add them later to `.env.local` and the dev server will automatically load them.
54+
Create a Slack bot in under a minute:
5555

56-
### Start development mode:
56+
https://github.com/user-attachments/assets/6bb73e58-b4ae-4543-b2c0-0e1195113ba6
5757

58-
```sh
59-
blink dev
60-
```
58+
> [!NOTE]
59+
> You provide LLM API keys. `blink init` guides you through this, or add them to `.env.local` later.
6160
62-
You can now edit `agent.ts` in your editor or by using [Edit Mode](https://docs.blink.so/get-started/building-with-blink) in your terminal and the dev server will hot-reload your agent.
61+
## Deploy
6362

64-
### Deploy your agent to [Blink Cloud](https://blink.so):
63+
If you wish to deploy your agent to the [cloud](https://blink.so), run:
6564

6665
```sh
6766
blink deploy
6867
```
68+
6969
> [!IMPORTANT]
70-
> [Blink Cloud](https://blink.so) is not required to build Blink agents.
70+
> [Cloud](https://blink.so) is not required to build Blink agents.
7171
> We guarantee that Blink agents will always be local-first.
7272
73-
## Building with Edit and Run Modes
74-
75-
After running `bun i -g blink` to globally install Blink, run `blink init` to scaffold your new agent.
73+
## User Guide
7674

77-
https://github.com/user-attachments/assets/683e4554-55fd-4240-916d-a496da7e63d2
75+
### Developing an Agent
7876

79-
Giving your new agents tools and personality is as easy as switching to [Edit Mode](https://docs.blink.so/get-started/building-with-blink) `(CTRL+T)` and describing what you want your agent to do.
77+
Blink has two modes: run and edit (toggle with `ctrl+t`, or `/run` and `/edit`). Run mode is blue, edit mode is orange. Run mode allows you to chat with your agent. Edit mode allows you to take context from run mode, and edit the agent.
8078

81-
Edit Mode is specifically trained to build your agent and understand the full context of both Edit Mode and Run Mode chats. This is a key capability that makes Edit Mode the essential building and debugging partner.
79+
Chat in run mode, switch to edit mode and provide feedback, then go back to run mode and continue chatting. Agents hot-reload as you develop, so changes are reflected instantly.
8280

8381
> [!NOTE]
84-
> Run Mode can only read its own context to preserve a real-world user experience while testing in your terminal.
82+
> Run mode cannot see edit mode messages.
8583
8684
https://github.com/user-attachments/assets/4abd47ad-4b59-41d5-abda-27ed902ae69b
8785

88-
89-
## How Blink Agents Work
90-
91-
Building agents in Run Mode lifts most of the burden of coding new agents. However, here's a breakdown of how Blink agents work under the hood.
92-
93-
Blink has built-in APIs for managing chats, storage, and tools.
94-
9586
### Chats
9687

9788
Blink allows you to start new chats from web requests:
@@ -373,7 +364,6 @@ By default, Blink uses [esbuild](https://esbuild.github.io/) to bundle your agen
373364

374365
The `build` function can be customized to use a different bundler if you wish.
375366

376-
377367
## Blink Documentation
378368

379369
For a closer look at Blink, visit [docs.blink.so](https://docs.blink.so/).

0 commit comments

Comments
 (0)