You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add TypeScript documentation and examples for AI agent tools
- Expanded documentation for TypeScript AI agents with tool registration examples
- Added new documentation pages for custom tools in TypeScript
- Updated installation and quickstart guides to include TypeScript sections
- Created example scripts demonstrating single and multi-agent tool usage
- Introduced new documentation for external tools like Google Trends
Copy file name to clipboardExpand all lines: docs/index.mdx
+98-10Lines changed: 98 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,27 +114,53 @@ agents.start()
114
114
</Steps>
115
115
</Tab>
116
116
<Tabtitle="No Code">
117
-
<Tip>
118
-
PraisonAI combines PraisonAI Agents, AutoGen, and CrewAI into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customization, and efficient human-agent collaboration.
119
-
</Tip>
120
117
<Steps>
121
118
<Steptitle="Install Package">
119
+
Install the No Code PraisonAI Package:
122
120
```bash
123
-
pip install praisonai
121
+
pip install praisonaiagents
124
122
```
125
123
</Step>
124
+
126
125
<Steptitle="Set API Key">
127
126
```bash
128
-
export OPENAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxx
127
+
export OPENAI_API_KEY=your_openai_key
129
128
```
130
129
</Step>
131
-
<Steptitle="Auto Mode">
132
-
```bash
133
-
praisonai --auto create a movie script about Robots in Mars
134
-
```
135
130
136
-
This will automatically create required agents and complete the task
131
+
<Steptitle="Create Config">
132
+
Create `agents.yaml`:
133
+
134
+
<CodeGroup>
135
+
```yaml Single Agent
136
+
roles:
137
+
summarise_agent:
138
+
instructions: Summarise Photosynthesis
139
+
```
140
+
141
+
```yaml Multiple Agents
142
+
roles:
143
+
diet_agent:
144
+
instructions: Give me 5 healthy food recipes
145
+
blog_agent:
146
+
instructions: Write a blog post about the food recipes
147
+
```
148
+
</CodeGroup>
137
149
150
+
<Note>
151
+
You can automatically create `agents.yaml` using:
152
+
```bash
153
+
praisonai --init "your task description"
154
+
```
155
+
</Note>
156
+
157
+
</Step>
158
+
159
+
<Step title="Run Agents">
160
+
Execute your config:
161
+
```bash
162
+
praisonai agents.yaml
163
+
```
138
164
</Step>
139
165
</Steps>
140
166
</Tab>
@@ -180,6 +206,68 @@ agents.start();
180
206
</Step>
181
207
</Steps>
182
208
</Tab>
209
+
<Tab title="TypeScript">
210
+
<Steps>
211
+
<Step title="Install Package">
212
+
<CodeGroup>
213
+
```bash npm
214
+
npm install praisonai
215
+
```
216
+
```bash yarn
217
+
yarn add praisonai
218
+
```
219
+
</CodeGroup>
220
+
</Step>
221
+
<Step title="Set API Key">
222
+
```bash
223
+
export OPENAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxx
224
+
```
225
+
</Step>
226
+
<Step title="Create File">
227
+
Create `app.ts` file
228
+
229
+
## Code Example
230
+
231
+
<CodeGroup>
232
+
```javascript Single Agent
233
+
import { Agent } from 'praisonai';
234
+
235
+
const agent = new Agent({
236
+
instructions: `You are a creative writer who writes short stories with emojis.`,
237
+
name: "StoryWriter"
238
+
});
239
+
240
+
agent.start("Write a story about a time traveler")
0 commit comments