Skip to content

Update docs and changelog #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# 1.4.0 (2025-06-06)

### Features

- add plugin system with dynamic loading
- add Redis-backed message bus
- add multi-flow runner via `runAgentFlows`
- add CLI `inspect` command
- add HttpNode for HTTP requests

### Bug Fixes

- fix HttpNode typing for typedoc
- fix context type declarations

---

# 1.0.0 (2025-04-19)

### Bug Fixes
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,20 @@ const decideNode = new DecisionNode('decide', async (context) => {
});
```

### HttpNode

`HttpNode` performs HTTP requests during a flow. Provide the request `url`,
optional `method`, headers and body. Values can be static or derived from the
current context.

```typescript
import { HttpNode } from 'ai-agent-flow/nodes/http';

const fetchData = new HttpNode('fetch-data', {
url: 'https://api.example.com/data',
});
```

### MessageBus

The `MessageBus` enables event-driven communication between agents. It allows agents to send and subscribe to messages asynchronously.
Expand Down
26 changes: 26 additions & 0 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,32 @@ flowchart TD

---

## 🌐 4. HTTP Request Example

**File:** `examples/http-request.ts`

Fetches data from a REST API using `HttpNode`.

### 🧱 Flow Structure:

```mermaid
flowchart TD
HTTP[HttpNode: fetch data] --> DONE[Flow completed]
```

### 💡 What it does:

- Sends a GET request to a JSON placeholder API
- Parses the JSON response
- Prints the result to the console

### ✨ Key Features:

- Shows how to call external APIs within a flow
- Supports dynamic URL and headers from context

---

## 🛠 Tips for Customization

You can modify any example to:
Expand Down
Loading