Skip to content

Commit b2afa10

Browse files
update README and remove mocks in dist (#6000)
1 parent 8d5780e commit b2afa10

2 files changed

Lines changed: 55 additions & 1 deletion

File tree

packages/agentflow/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,22 @@
2121

2222
`@flowiseai/agentflow` is a React-based flow editor for creating AI agent workflows. It provides a visual canvas built on ReactFlow for connecting AI agents, LLMs, tools, and logic nodes.
2323

24+
## Features
25+
26+
- **Visual Canvas** — Drag-and-drop flow editor built on ReactFlow with zoom, pan, minimap, and fit-to-view controls
27+
- **15 Built-in Node Types** — Start, Agent, LLM, Condition, Condition Agent, Human Input, Loop, Direct Reply, Custom Function, Tool, Retriever, Sticky Note, HTTP, Iteration, and Execute Flow
28+
- **Node Editor Dialog** — Modal for editing node parameters with dynamic input types (text, number, boolean, dropdown, arrays, async options)
29+
- **Rich Text Editor** — TipTap-based editor with syntax highlighting for JavaScript, TypeScript, Python, and JSON (lazy-loaded)
30+
- **Specialized Input Components** — Condition builder, messages input (role + content), and structured output schema builder
31+
- **AI Flow Generator** — Generate flows from natural language descriptions with model selection
32+
- **Flow Validation** — Detects empty flows, missing start nodes, disconnected nodes, cycles, hanging edges, and per-node input errors with visual feedback
33+
- **Dark Mode** — Full light/dark theme support via design tokens and CSS variables
34+
- **Read-Only Mode** — Disable editing for view-only embedding
35+
- **Custom Rendering** — Replace the default header and node palette with your own components via render props
36+
- **Imperative API** — Programmatic control via ref (`getFlow`, `validate`, `fitView`, `clear`, `addNode`, `toJSON`)
37+
- **Request Interceptor** — Customize outgoing API requests (headers, credentials) via an Axios interceptor callback
38+
- **Keyboard Shortcuts** — Cmd/Ctrl+S to save
39+
2440
## Installation
2541

2642
```bash
@@ -139,10 +155,48 @@ The `requestInterceptor` callback runs inside the Axios request pipeline and has
139155
- Follow the **principle of least privilege** — only read or modify the specific config properties you need (e.g., `withCredentials`, custom headers).
140156
- If the interceptor throws, the error is caught, logged, and the **original unmodified config** is used so the request still proceeds safely.
141157

158+
### Node Types
159+
160+
The following node types are available in the palette by default. Use the `components` prop to restrict which types are shown.
161+
162+
<!-- prettier-ignore -->
163+
| Node Type | Description |
164+
| -------------------------- | ------------------------------------ |
165+
| `startAgentflow` | Entry point (required, always shown) |
166+
| `agentAgentflow` | AI agent execution |
167+
| `llmAgentflow` | LLM / language model call |
168+
| `conditionAgentflow` | Conditional branching |
169+
| `conditionAgentAgentflow` | Agent-level conditional branching |
170+
| `humanInputAgentflow` | Wait for user input |
171+
| `loopAgentflow` | Loop / iteration |
172+
| `directReplyAgentflow` | Direct response to user |
173+
| `customFunctionAgentflow` | Custom JavaScript function |
174+
| `toolAgentflow` | Tool integration |
175+
| `retrieverAgentflow` | Data retrieval |
176+
| `stickyNoteAgentflow` | Canvas annotation (not connectable) |
177+
| `httpAgentflow` | HTTP request |
178+
| `iterationAgentflow` | Iteration / map-reduce container |
179+
| `executeFlowAgentflow` | Execute a sub-flow |
180+
142181
### Design Note
143182

144183
`<Agentflow>` is an **uncontrolled component**. The `initialFlow` prop seeds the canvas state on mount, but the component owns its own state afterward. Use the `ref` for imperative access and `onFlowChange` to observe changes.
145184

185+
## Exports
186+
187+
Beyond the main `<Agentflow>` component, the package exports utilities for advanced usage:
188+
189+
```ts
190+
// Main component and provider
191+
// Types
192+
193+
// Hooks
194+
// Validation
195+
// Node utilities
196+
197+
// Field visibility helpers
198+
```
199+
146200
## Development
147201

148202
```bash

packages/agentflow/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default defineConfig(({ mode }) => {
1212
dts({
1313
insertTypesEntry: true,
1414
include: ['src/**/*'],
15-
exclude: ['src/**/*.test.ts', 'src/**/*.test.tsx', 'src/__test_utils__/**']
15+
exclude: ['src/**/*.test.ts', 'src/**/*.test.tsx', 'src/**/__*__/**']
1616
})
1717
],
1818
resolve: {

0 commit comments

Comments
 (0)