Skip to content

Commit 919db2c

Browse files
committed
update tutorials, add contribution guide
1 parent 11c789a commit 919db2c

File tree

4 files changed

+50
-18
lines changed

4 files changed

+50
-18
lines changed

docs/development/contributing.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,15 @@ title: Contributing
33
description: How to participate in Agent User Interaction Protocol development
44
---
55

6+
# Naming conventions
7+
8+
Add your package under `typescript-sdk/integrations/` with docs and tests.
9+
10+
If your integration is work in progress, you can still add it to main branch.
11+
You can prefix it with `wip-`, i.e.
12+
(`typescript-sdk/integrations/wip-your-integration`) or if you're a third party
13+
contributor use the `community` prefix, i.e.
14+
(`typescript-sdk/integrations/community-your-integration`).
15+
616
For questions and discussions, please use
717
[GitHub Discussions](https://github.com/orgs/ag-ui-protocol/discussions).

docs/docs.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
"quickstart/applications",
2424
{
2525
"group": "Build integrations",
26-
"pages": ["quickstart/introduction", "quickstart/server", "quickstart/middleware"]
26+
"pages": [
27+
"quickstart/introduction",
28+
"quickstart/server",
29+
"quickstart/middleware"
30+
]
2731
}
2832
]
2933
},
@@ -115,8 +119,7 @@
115119
"label": "Discord",
116120
"href": "https://discord.gg/Jd3FzfdJa8",
117121
"icon": "server"
118-
},
119-
122+
}
120123
],
121124
"primary": {
122125
"type": "github",

docs/quickstart/middleware.mdx

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,40 @@
11
---
22
title: "Middleware"
33
description:
4-
"Connect to existing protocols, in process agents or custom solutions via AG-UI"
4+
"Connect to existing protocols, in process agents or custom solutions via
5+
AG-UI"
56
---
67

78
# Introduction
89

9-
A middleware implementation allows you to **translate existing protocols and applications to AG-UI events**. This approach creates a bridge between your existing system and AG-UI, making it perfect for adding agent capabilities to current applications.
10+
A middleware implementation allows you to **translate existing protocols and
11+
applications to AG-UI events**. This approach creates a bridge between your
12+
existing system and AG-UI, making it perfect for adding agent capabilities to
13+
current applications.
1014

1115
## When to use a middleware implementation
12-
Middleware is the flexible option. It allows you to translate existing protocols and applications to AG-UI events
13-
creating a bridge between your existing system and AG-UI.
16+
17+
Middleware is the flexible option. It allows you to translate existing protocols
18+
and applications to AG-UI events creating a bridge between your existing system
19+
and AG-UI.
1420

1521
Middleware is great for:
22+
1623
- Taking your **existing protocol or API** and **translating it universally**
1724
- Working within the confines of **an existing system or framework**
1825
- **When you don't have direct control** over the agent framework or system
1926

2027
## What you'll build
2128

2229
In this guide, we'll create a middleware agent that:
30+
2331
1. Extends the `AbstractAgent` class
2432
2. Connects to OpenAI's GPT-4o model
2533
3. Translates OpenAI responses to AG-UI events
2634
4. Runs in-process with your application
2735

28-
This approach gives you maximum flexibility to integrate with existing codebases while maintaining the full power of the AG-UI protocol.
36+
This approach gives you maximum flexibility to integrate with existing codebases
37+
while maintaining the full power of the AG-UI protocol.
2938

3039
Let's get started!
3140

@@ -408,7 +417,9 @@ Did you build a custom adapter that others could reuse? We welcome community
408417
contributions!
409418

410419
1. Fork the [AG-UI repository](https://github.com/ag-ui-protocol/ag-ui)
411-
2. Add your package under `integrations/` with docs and tests
420+
2. Add your package under `typescript-sdk/integrations/`. See
421+
[Contributing](../development/contributing) for more details and naming
422+
conventions.
412423
3. Open a pull request describing your use-case and design decisions
413424

414425
If you have questions, need feedback, or want to validate an idea first, start a

docs/quickstart/server.mdx

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,26 @@ description: "Implement AG-UI compatible servers"
55

66
# Introduction
77

8-
A server implementation allows you to **emit AG-UI events directly from your agent or server**. This approach is ideal when you're building a new agent from scratch or want a dedicated service for your agent capabilities.
8+
A server implementation allows you to **emit AG-UI events directly from your
9+
agent or server**. This approach is ideal when you're building a new agent from
10+
scratch or want a dedicated service for your agent capabilities.
911

1012
## When to use a server implementation
11-
Server implementations allow you to directly emit AG-UI events from your agent or server. If you are not using an
12-
agent framework or haven't created a protocol for your agent framework yet, this is the best way to get started.
13+
14+
Server implementations allow you to directly emit AG-UI events from your agent
15+
or server. If you are not using an agent framework or haven't created a protocol
16+
for your agent framework yet, this is the best way to get started.
1317

1418
Server implementations are also great for:
19+
1520
- Building a **new agent frameworks** from scratch
1621
- **Maximum control** over how and what events are emitted
1722
- Exposing your agent as a **standalone API**
1823

1924
## What you'll build
2025

2126
In this guide, we'll create a standalone HTTP server that:
27+
2228
1. Accepts AG-UI protocol requests
2329
2. Connects to OpenAI's GPT-4o model
2430
3. Streams responses back as AG-UI events
@@ -77,8 +83,8 @@ cp -r integrations/server-starter integrations/openai-server
7783

7884
### Update metadata
7985

80-
Open `integrations/openai-server/package.json` and update the fields to match your new
81-
folder:
86+
Open `integrations/openai-server/package.json` and update the fields to match
87+
your new folder:
8288

8389
```json
8490
{
@@ -93,9 +99,9 @@ folder:
9399
Next, update the class name inside `integrations/openai-server/src/index.ts`:
94100

95101
```ts
96-
// change the name to OpenAIServerAgent
97-
export class ServerStarterAgent extends HttpAgent { }
98-
102+
// Change the name to OpenAIServerAgent to add a minimal middleware for your integration.
103+
// You can use this later on to add configuration etc.
104+
export class OpenAIServerAgent extends HttpAgent {}
99105
```
100106

101107
Finally, introduce your integration to the dojo by adding it to
@@ -436,7 +442,9 @@ Did you build a custom server that others could reuse? We welcome community
436442
contributions!
437443

438444
1. Fork the [AG-UI repository](https://github.com/ag-ui-protocol/ag-ui)
439-
2. Add your package under `integrations/` with docs and tests
445+
2. Add your package under `typescript-sdk/integrations/`. See
446+
[Contributing](../development/contributing) for more details and naming
447+
conventions.
440448
3. Open a pull request describing your use-case and design decisions
441449

442450
If you have questions, need feedback, or want to validate an idea first, start a

0 commit comments

Comments
 (0)