@minded-ai/mindedjs 1.0.89 → 1.0.91-beta-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/agent.d.ts +4 -0
  2. package/dist/agent.d.ts.map +1 -1
  3. package/dist/agent.js +32 -6
  4. package/dist/agent.js.map +1 -1
  5. package/dist/events/AgentEvents.d.ts +5 -0
  6. package/dist/events/AgentEvents.d.ts.map +1 -1
  7. package/dist/events/AgentEvents.js +1 -0
  8. package/dist/events/AgentEvents.js.map +1 -1
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +1 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/nodes/addAppToolNode.d.ts.map +1 -1
  14. package/dist/nodes/addAppToolNode.js +2 -2
  15. package/dist/nodes/addAppToolNode.js.map +1 -1
  16. package/dist/nodes/addJumpToNode.d.ts.map +1 -1
  17. package/dist/nodes/addJumpToNode.js +2 -2
  18. package/dist/nodes/addJumpToNode.js.map +1 -1
  19. package/dist/nodes/addJunctionNode.d.ts +7 -0
  20. package/dist/nodes/addJunctionNode.d.ts.map +1 -0
  21. package/dist/nodes/addJunctionNode.js +20 -0
  22. package/dist/nodes/addJunctionNode.js.map +1 -0
  23. package/dist/nodes/addPromptNode.d.ts.map +1 -1
  24. package/dist/nodes/addPromptNode.js +2 -2
  25. package/dist/nodes/addPromptNode.js.map +1 -1
  26. package/dist/nodes/addToolNode.d.ts.map +1 -1
  27. package/dist/nodes/addToolNode.js +2 -2
  28. package/dist/nodes/addToolNode.js.map +1 -1
  29. package/dist/nodes/addToolRunNode.d.ts.map +1 -1
  30. package/dist/nodes/addToolRunNode.js +2 -3
  31. package/dist/nodes/addToolRunNode.js.map +1 -1
  32. package/dist/nodes/addTriggerNode.d.ts.map +1 -1
  33. package/dist/nodes/addTriggerNode.js +1 -2
  34. package/dist/nodes/addTriggerNode.js.map +1 -1
  35. package/dist/nodes/nodeFactory.d.ts.map +1 -1
  36. package/dist/nodes/nodeFactory.js +2 -5
  37. package/dist/nodes/nodeFactory.js.map +1 -1
  38. package/dist/platform/mindedConnectionTypes.d.ts +5 -0
  39. package/dist/platform/mindedConnectionTypes.d.ts.map +1 -1
  40. package/dist/platform/mindedConnectionTypes.js +1 -0
  41. package/dist/platform/mindedConnectionTypes.js.map +1 -1
  42. package/dist/types/Agent.types.d.ts +11 -6
  43. package/dist/types/Agent.types.d.ts.map +1 -1
  44. package/dist/types/Agent.types.js +1 -0
  45. package/dist/types/Agent.types.js.map +1 -1
  46. package/docs/.gitbook/assets/ADLC.png +0 -0
  47. package/docs/.gitbook/assets/PII-masking.png +0 -0
  48. package/docs/.gitbook/assets/image.png +0 -0
  49. package/docs/README.md +54 -0
  50. package/docs/SUMMARY.md +39 -0
  51. package/docs/examples/order-refund-flow.md +566 -0
  52. package/docs/getting-started/environment-configuration.md +98 -0
  53. package/docs/getting-started/installation.md +44 -0
  54. package/docs/getting-started/project-configuration.md +206 -0
  55. package/docs/getting-started/quick-start.md +262 -0
  56. package/docs/integrations/zendesk.md +554 -0
  57. package/docs/low-code-editor/edges.md +392 -0
  58. package/docs/low-code-editor/flows.md +74 -0
  59. package/docs/low-code-editor/nodes.md +331 -0
  60. package/docs/low-code-editor/playbooks.md +262 -0
  61. package/docs/low-code-editor/tools.md +303 -0
  62. package/docs/low-code-editor/triggers.md +156 -0
  63. package/docs/platform/events.md +374 -0
  64. package/docs/platform/logging.md +72 -0
  65. package/docs/platform/memory.md +219 -0
  66. package/docs/platform/pii-masking.md +220 -0
  67. package/docs/platform/secrets.md +99 -0
  68. package/docs/resources/your-first-eval.md +108 -0
  69. package/docs-structure.md +141 -0
  70. package/package.json +5 -3
  71. package/src/agent.ts +36 -8
  72. package/src/events/AgentEvents.ts +5 -0
  73. package/src/index.ts +0 -1
  74. package/src/nodes/addAppToolNode.ts +3 -3
  75. package/src/nodes/addJumpToNode.ts +3 -3
  76. package/src/nodes/addJunctionNode.ts +19 -0
  77. package/src/nodes/addPromptNode.ts +3 -3
  78. package/src/nodes/addToolNode.ts +2 -3
  79. package/src/nodes/addToolRunNode.ts +3 -4
  80. package/src/nodes/addTriggerNode.ts +3 -3
  81. package/src/nodes/nodeFactory.ts +1 -5
  82. package/src/platform/mindedConnectionTypes.ts +6 -0
  83. package/src/types/Agent.types.ts +11 -5
@@ -0,0 +1,220 @@
1
+ # PII Masking
2
+
3
+ ## Overview
4
+
5
+ The Minded platform provides built-in protection for Personally Identifiable Information (PII) through an advanced masking mechanism. This feature ensures that sensitive data remains secure throughout your application's lifecycle while preserving the contextual integrity of your business logic.
6
+
7
+ <figure><img src="../.gitbook/assets/PII-masking.png" alt="PII Masking Flow Diagram"></figure>
8
+
9
+ ## How to Use PII Masking
10
+
11
+ ### Step 1: Configure PII Masking in the Minded Platform
12
+
13
+ To enable PII masking, go to the agent configuration panel and toggle **"Enable PII Masking"**. Then, configure the masking behavior according to your needs by specifying:
14
+
15
+ - **Entity Types**: Define which data entities should be treated as PII. Any entity that requires masking must be explicitly listed.
16
+ - **Detection Model**: By default, Minded uses OpenAI's GPT-4.1-mini for PII detection. Optionally, you can provide a custom Azure OpenAI deployment. Be sure to include the corresponding API key in the environment's secrets.
17
+ - **TTL Settings**: TTL (Time-to-Live) determines how long masked data is stored for a specific `sessionId`. The default TTL is 14 hours.
18
+ - **Trigger SessionId Field**: Specify the property name in your incoming webhook payload that contains the session ID. This field is used to identify and group PII data per session. It must be a single word with no special characters (only letters, numbers, and underscores allowed).
19
+
20
+ Once enabled, PII masking is automatically applied at critical points within the platform:
21
+
22
+ - All webhook payloads are masked upon receipt.
23
+ - App integrations undergo automatic unmasking before requests and re-masking after responses.
24
+
25
+ ### Step 2: Use PII Masking via the Minded SDK
26
+
27
+ Minded provides automatic PII masking capabilities for HTTP requests within your agent workflows. When a trigger is received with a sessionId, the PII masking functionality is automatically initialized and made available to your custom code through the agent's PII gateway.
28
+
29
+ #### PII Gateway for HTTP Requests
30
+
31
+ The PII gateway enables secure HTTP communication by automatically handling PII masking/unmasking for your API calls. It provides a complete HTTP client interface similar to popular libraries like Axios, supporting all common HTTP methods.
32
+
33
+ The PII masking gateway ensures:
34
+
35
+ - **Automatic Unmasking**: Requests are automatically unmasked before being sent to external APIs
36
+ - **Secure Routing**: All requests are routed through Minded's secure gateway infrastructure
37
+ - **Response Masking**: API responses are automatically masked before being returned to your agent
38
+ - **Session Isolation**: PII data is properly isolated per session using the sessionId
39
+ - **Error Handling**: Comprehensive error handling for network issues and API failures
40
+
41
+ > **Note:** API error responses are **not** masked. The PII gateway requires a valid sessionId to function properly.
42
+
43
+ #### Available HTTP Methods
44
+
45
+ The PII gateway supports all standard HTTP methods:
46
+
47
+ ```ts
48
+ // GET request
49
+ const userData = await agent.piiGateway.get(sessionId, 'https://api.example.com/user/123');
50
+
51
+ // POST request
52
+ const createResult = await agent.piiGateway.post(sessionId, 'https://api.example.com/users', {
53
+ name: 'John Doe',
54
+ email: 'john@example.com',
55
+ });
56
+
57
+ // PUT request
58
+ const updateResult = await agent.piiGateway.put(sessionId, 'https://api.example.com/user/123', {
59
+ email: 'newemail@example.com',
60
+ });
61
+
62
+ // DELETE request
63
+ const deleteResult = await agent.piiGateway.delete(sessionId, 'https://api.example.com/user/123');
64
+
65
+ // PATCH request
66
+ const patchResult = await agent.piiGateway.patch(sessionId, 'https://api.example.com/user/123', {
67
+ email: 'updated@example.com',
68
+ });
69
+ ```
70
+
71
+ #### Example Usage in Tools
72
+
73
+ ```ts
74
+ // POST request example - within a custom tool
75
+ import { Tool } from '@minded-ai/mindedjs';
76
+ import { logger } from '@minded-ai/mindedjs';
77
+
78
+ const modelParams = z.object({
79
+ prev: z.string().describe('The email to update'),
80
+ new: z.string().describe('The new email address'),
81
+ });
82
+
83
+ const updateEmailTool: Tool<any, any> = {
84
+ name: 'updateEmail',
85
+ description: 'Update the email',
86
+ input: modelParams,
87
+ execute: async ({ input, state, agent }) => {
88
+ try {
89
+ logger.info('Updating email via PII gateway', {
90
+ sessionId: state.sessionId,
91
+ });
92
+
93
+ const response = await agent.piiGateway.post(state.sessionId, 'https://www.acme.com/update_email', {
94
+ oldEmail: input.prev,
95
+ newEmail: input.new,
96
+ });
97
+
98
+ logger.info('Email update successful', {
99
+ sessionId: state.sessionId,
100
+ status: response.status,
101
+ });
102
+
103
+ return {
104
+ result: 'Email updated successfully',
105
+ state: {
106
+ memory: {
107
+ emailUpdated: true,
108
+ lastEmailUpdate: new Date().toISOString(),
109
+ },
110
+ },
111
+ };
112
+ } catch (error) {
113
+ logger.error('Email update failed', {
114
+ sessionId: state.sessionId,
115
+ error: error.message,
116
+ });
117
+ throw error;
118
+ }
119
+ },
120
+ };
121
+ ```
122
+
123
+ #### Request Configuration
124
+
125
+ You can also pass additional configuration options:
126
+
127
+ ```ts
128
+ const response = await agent.piiGateway.post(
129
+ sessionId,
130
+ 'https://api.example.com/data',
131
+ { data: 'example' },
132
+ {
133
+ headers: {
134
+ Authorization: 'Bearer token',
135
+ 'Content-Type': 'application/json',
136
+ },
137
+ params: {
138
+ version: 'v1',
139
+ format: 'json',
140
+ },
141
+ },
142
+ );
143
+ ```
144
+
145
+ #### How It Works
146
+
147
+ 1. **Trigger Received**: When your agent receives a trigger with a sessionId, the PII masking gateway is automatically initialized and available via `agent.piiGateway`
148
+ 2. **Session Binding**: The PII gateway is bound to the specific session context, ensuring proper PII isolation
149
+ 3. **Request Processing**: When you make HTTP requests through the gateway:
150
+ - Request data is automatically unmasked using session-specific mappings
151
+ - The request is sent to the target API with real, unmasked data
152
+ - The response is received and automatically masked before being returned
153
+ 4. **Error Handling**: Network errors and API errors are properly handled and logged
154
+
155
+ ## How PII Masking Works
156
+
157
+ ### Input Processing
158
+
159
+ The masking workflow begins as data enters the Minded platform:
160
+
161
+ 1. The platform receives input (e.g. JSON object or string) tagged with a unique `sessionId`.
162
+
163
+ 2. PII entities are identified using the configured detection model.
164
+
165
+ 3. Detected entities are replaced with structured placeholders such as:
166
+
167
+ - `<PERSON1>`, `<PERSON2>` for names
168
+ - `<PHONE1>` for phone numbers
169
+ - `<ADDRESS1>`, `<ADDRESS2>` for addresses
170
+ - Other entity types as defined in your configuration
171
+
172
+ 4. A secure internal PII database (PII-DB) manages the mapping:
173
+
174
+ - Each `sessionId` has its own isolated mapping store
175
+ - Example mapping:
176
+
177
+ ```
178
+ "Kate" → <PERSON1>
179
+ "Josh Wildon" → <PERSON2>
180
+ ```
181
+
182
+ - Consistent masking/unmasking is maintained throughout the session
183
+ - Data is automatically purged from the PII-DB based on TTL settings
184
+
185
+ ### Session ID Configuration
186
+
187
+ The **Trigger SessionId Field** setting in the UI specifies which field in your webhook payload contains the session identifier:
188
+
189
+ - **Field Name**: Must be a valid property name (letters, numbers, underscores only)
190
+ - **Examples**: `sessionId`, `session_id`, `conversationId`, `userId`
191
+ - **Purpose**: Groups all PII data for a specific user session together
192
+ - **Requirements**:
193
+ - Single word identifier
194
+ - No special characters except underscores
195
+ - Must exist in every webhook payload
196
+
197
+ Example webhook payload where we set **Trigger SessionId Field** to **webhookId**:
198
+
199
+ ```json
200
+ {
201
+ "webhookId": "user_12345_conversation_67890",
202
+ "customerName": "John Doe",
203
+ "email": "john.doe@example.com",
204
+ "orderDetails": "Need help with order #ABC123"
205
+ }
206
+ ```
207
+
208
+ ### Mask Consistency
209
+
210
+ The platform guarantees deterministic masking within a session:
211
+
212
+ - Each unique entity always receives the same placeholder
213
+ - New placeholders are generated only for previously unseen entities
214
+ - Cross-reference logic maintains consistent relationships between data
215
+ - TTL should be aligned with your agent's session lifecycle for optimal performance
216
+
217
+ ### Logging and Storage
218
+
219
+ - All logs within the platform are written **only with masked data**
220
+ - Raw, unmasked data is **never** logged
@@ -0,0 +1,99 @@
1
+ # Secrets
2
+
3
+ Secrets allow you to securely store sensitive configuration data like API keys and database credentials in your deployed MindedJS agents.
4
+
5
+ ## Overview
6
+
7
+ Secrets are configured through the platform dashboard and automatically injected into `process.env` when your agent is deployed. They are only available in deployed agents, not during local development.
8
+
9
+ **Key Features:**
10
+ - Secure storage on the platform backend
11
+ - Automatic injection into `process.env` for deployed agents
12
+ - Environment-specific configuration (dev/staging/production)
13
+ - Deploy-time access only
14
+
15
+ ## Usage
16
+
17
+ ### Basic Access
18
+
19
+ ```typescript
20
+ // Access secrets via process.env in deployed agents
21
+ const apiKey = process.env.OPENAI_API_KEY;
22
+ const databaseUrl = process.env.DATABASE_URL;
23
+
24
+ // Always validate required secrets
25
+ if (!apiKey) {
26
+ throw new Error('OPENAI_API_KEY secret not configured');
27
+ }
28
+ ```
29
+
30
+ ### In Tools
31
+
32
+ ```typescript
33
+ import { Tool } from 'mindedjs';
34
+
35
+ const weatherTool: Tool<{ city: string }, any> = {
36
+ name: 'getWeather',
37
+ description: 'Get weather information for a city',
38
+ parameters: {
39
+ type: 'object',
40
+ properties: {
41
+ city: { type: 'string', description: 'The city to get weather for' }
42
+ },
43
+ required: ['city']
44
+ },
45
+ handler: async ({ city }) => {
46
+ const apiKey = process.env.WEATHER_API_KEY;
47
+
48
+ if (!apiKey) {
49
+ throw new Error('WEATHER_API_KEY secret not configured');
50
+ }
51
+
52
+ const response = await fetch(`https://api.weather.com/v1/current?key=${apiKey}&q=${city}`);
53
+ return await response.json();
54
+ }
55
+ };
56
+ ```
57
+
58
+ ## Configuration
59
+
60
+ ### Platform Management
61
+
62
+ Configure secrets in the MindedJS platform dashboard:
63
+ - Navigate to your agent's settings
64
+ - Use the secrets management interface to add/edit secrets
65
+ - Configure different values per environment
66
+ - Changes require redeployment to take effect
67
+
68
+ ### Naming Conventions
69
+
70
+ Use `UPPER_SNAKE_CASE` with descriptive names:
71
+ - `OPENAI_API_KEY`
72
+ - `DATABASE_URL`
73
+ - `WEBHOOK_SECRET`
74
+ - `JWT_SIGNING_KEY`
75
+
76
+ ## Local Development
77
+
78
+ When developing locally, you can use the `.env` file (in the root of your project) to set the secrets or environment variables.
79
+
80
+ ```bash
81
+ # .env file
82
+ MINDED_CONNECTION_TOKEN=abc
83
+ API_KEY=xyz
84
+ ```
85
+
86
+ ## Best Practices
87
+
88
+ - **Always validate** that required secrets exist before use
89
+ - **Never log** secret values in console output or logs
90
+ - **Use descriptive names** for clarity
91
+ - **Separate environments** with different secret values
92
+ - **Never commit** `.env` files or hardcode secrets
93
+ - **Regular rotation** of secrets through the platform
94
+
95
+ ## Troubleshooting
96
+
97
+ - **Secret not available**: Verify it's configured in platform dashboard with exact name (case-sensitive) and agent is deployed
98
+ - **Local development**: Remember secrets only work in deployed agents - use `.env` files or fallbacks locally
99
+ - **Changes not applied**: Secret changes require redeployment to take effect
@@ -0,0 +1,108 @@
1
+ # Your First Eval
2
+
3
+ At Minded, we strong believe in the [Agent Development Lifecycle (ADLC)](https://www.minded.com/blog/adlc-loop), our agentic take on the Software Development Lifecycle (SDLC), a.k.a. how to ship reliable agents fast.
4
+
5
+ In this guide we’ll vibe-code an agent that sets the stage for the last-mile prompt engineering needed to go live to production - you’ll get a fresh from the oven agent
6
+
7
+ ## The ADLC flow
8
+
9
+ Here’s how an [Agent Squad](https://www.minded.com/blog/agent-squad) team up from 0 to 1
10
+
11
+ <figure><img src="../getting-started/.gitbook/assets/ADLC.png" alt=""><figcaption></figcaption></figure>
12
+
13
+ ## Step by Step
14
+
15
+ ### Define Minimum Viable Agent (MVA)
16
+
17
+ **Owner: Agent Product Manager**
18
+
19
+ Define the absolute minimum the agent needs to do before going live.
20
+
21
+ For the most part that means answering the following questions
22
+
23
+ If possible handoff to human reps anything that’s outside of that scope.
24
+
25
+ | Aspect | Example response for an ecommerce support agent |
26
+ | ----------------------- | ---------------------------------------------------------- |
27
+ | Initial use case | Order status |
28
+ | Interface | Zendesk messaging |
29
+ | How to interact with it | sending SMS to the support number |
30
+ | Handoff mechanism | Assign CS Human tag on Zendesk upon escalation |
31
+ | Metric | Deflection rate - % of support tickets solved by the agent |
32
+
33
+ ### Prepare E2E evals of real world cases
34
+
35
+ **Owner: Domain Expert**
36
+
37
+ Prepare end-to-end examples of how humans solve real world cases, each example should ideally include:
38
+
39
+ 1. Screen recording of the different apps operated throughout the resolution
40
+ 2. Explanation of the decision making process behind the resolution
41
+ 3. If you’re using a knowledge base, then list all the relevant articles from it that are used for this resolution
42
+ 4. List all other data sources used throughout the resolution (such as admin panels)
43
+
44
+ ### Identify data sources per each eval
45
+
46
+ **Owner: Agent Engineer**
47
+
48
+ This step is critical to build agents that take actions and make decisions:
49
+
50
+ 1. Identify the data sources available to the AI Agent to be able to reproduce the decision making process and/or actions of the end-to-end evals of the previous step. The most obvious data source are the interface (often that’s the customer support CRM such as Zendesk), and the admin panel (often that’s the human operator dashboard, such as Retool), however often these data sources can get tricky from 3rd party
51
+ 2. Map each data source into an API endpoint and ensure the relevant fields are available from the API
52
+ 3. When an API is not available consider alternatives such as Computer Use, and make sure the authentication could be enabled for an AI Agent.
53
+
54
+ ### Run the agent locally
55
+
56
+ **Owner: Agent Engineer**
57
+
58
+ Now is the time to make sure all the tools and knowledge are accessible for the agent
59
+
60
+ 1. Setup the local development environment (see getting started guide)
61
+ 2. Add tools per each data source
62
+ 3. Add knowledge per each knowledge source
63
+ 4. Add a prompt node to the agent that uses each of the above tools and knowledge bases and make sure that each of them are being called by the agent
64
+
65
+ ### Prompt Engineering
66
+
67
+ **Owner: Agent Engineer**
68
+
69
+ Next you’re going to solve each of the above evals by retrying again and again.
70
+
71
+ You are probably going to run a similar process to each of the eval examples:
72
+
73
+ 1. Invoke the trigger - ideally in a way that lets the agent actually pull the data it needs for the example
74
+ 2. Run the scenario in a step by step manner, whenever you run into an issue troubleshoot, solve it, and retry
75
+ 1. Evaluate the steps, normally evaluation covers:
76
+ 1. Agent tone of voice
77
+ 2. Tools accuracy - are the input parameters configured correctly?
78
+ 3. Did the agent invoke the right tool at the right time? with the right parameters?
79
+ 4. Did the agent take necessary actions?
80
+ 5. Did it retrieve the right knowledge base articles? Did it parse them correctly?
81
+ 2. If there were any issues there are usually two ways to go about it - solve it with code, or solve it with prompt (see our prompt engineering best practices)
82
+ 3. After you’ve applied a fix - retry the last step, until you’re able to reach the desired state
83
+ 4. If you weren’t able to solve it - consider escalating similar cases in the future, to let humans take care of cases where the agent is not perfect yet
84
+ 5. Repeat until the example reaches its final step successfully
85
+ 3. Now that the example run fully it is time to review post-run logs, actions and analytics
86
+
87
+ ### Agent Warm up
88
+
89
+ **Owner: Agent Engineer**
90
+
91
+ **Warm up** is everything that happens from the moment the agent wakes up to the first node execution. This is the window where we inject critical context, like `user_id` , or qualifying triggers to ensure the agent is laser-focused on the task it needs to resolve.
92
+
93
+ 1. Qualify the trigger - review the data schema of the trigger and make your mind if some of those data points should indicate the agent is not qualified for certain scenarios. Remember it’s usually best to launch a reliable agent at small scale (see MVA above).
94
+ 2. Enrich context - some context should or could be introduced to the agent upfront. It could be parameters `user_id` , or some tools (for example pulling order details for an ecommerce support agent)
95
+
96
+ ### QA
97
+
98
+ **Owner: Domain Expert**
99
+
100
+ This is the final OK before going live. This is where the expert “stress test” the agent for more edge cases, and evaluates the results.
101
+
102
+ If the agent is good enough - then awesome time to deploy. Otherwise, it’s time for more evals 💪🏻
103
+
104
+ ### Publish
105
+
106
+ **Owner: Agent Engineer**
107
+
108
+ Hit deploy on the platform and follow our deployment instructions for more details.
@@ -0,0 +1,141 @@
1
+ # GitBook Documentation Structure
2
+
3
+ ## Recommended File Organization
4
+
5
+ ```
6
+ docs/
7
+ ├── README.md # Introduction & Why MindedJS
8
+ ├── getting-started/
9
+ │ ├── installation.md # Installation instructions
10
+ │ ├── quick-start.md # Quick start example
11
+ │ └── project-setup.md # Project structure & configuration
12
+ ├── core-concepts/
13
+ │ ├── memory.md # Memory system
14
+ │ ├── flows.md # Flow overview
15
+ │ ├── nodes.md # Node types overview
16
+ │ ├── edges.md # Edge types overview
17
+ │ ├── tools.md # Tools system
18
+ │ └── events.md # Event system
19
+ ├── node-types/
20
+ │ ├── trigger-nodes.md # TRIGGER nodes
21
+ │ ├── prompt-nodes.md # PROMPT_NODE nodes
22
+ │ ├── tool-nodes.md # TOOL nodes
23
+ │ ├── app-tool-nodes.md # APP_TOOL nodes
24
+ │ └── junction-nodes.md # JUNCTION nodes
25
+ ├── edge-types/
26
+ │ ├── step-forward.md # STEP_FORWARD edges
27
+ │ ├── prompt-condition.md # PROMPT_CONDITION edges
28
+ │ └── logical-condition.md # LOGICAL_CONDITION edges
29
+ ├── implementation-examples/
30
+ │ ├── node-examples.md # All node implementation examples
31
+ │ ├── edge-examples.md # All edge implementation examples
32
+ │ └── complete-flows.md # Full flow examples
33
+ ├── how-to-guides/
34
+ │ ├── add-new-tool.md # Adding tools
35
+ │ ├── listen-for-events.md # Event handling
36
+ │ ├── persist-memory.md # Memory persistence
37
+ │ └── run-from-cli.md # CLI execution
38
+ ├── api-reference/
39
+ │ ├── agent-class.md # Agent class reference
40
+ │ ├── tool-interface.md # Tool interface
41
+ │ ├── flow-schema.md # Flow YAML schema
42
+ │ └── event-types.md # Event type definitions
43
+ └── examples/
44
+ ├── order-refund-flow.md # Order refund example
45
+ ├── customer-support.md # Customer support example
46
+ └── e-commerce-agent.md # E-commerce example
47
+ ```
48
+
49
+ ## SUMMARY.md Structure
50
+
51
+ ```markdown
52
+ # Table of contents
53
+
54
+ * [Introduction](README.md)
55
+
56
+ ## Getting Started
57
+ * [Installation](getting-started/installation.md)
58
+ * [Quick Start](getting-started/quick-start.md)
59
+ * [Project Setup](getting-started/project-setup.md)
60
+
61
+ ## Core Concepts
62
+ * [Memory Types](core-concepts/memory.md)
63
+ * [Flows](core-concepts/flows.md)
64
+ * [Nodes](core-concepts/nodes.md)
65
+ * [Edges](core-concepts/edges.md)
66
+ * [Tools](core-concepts/tools.md)
67
+ * [Events](core-concepts/events.md)
68
+
69
+ ## Node Types
70
+ * [Trigger Nodes](node-types/trigger-nodes.md)
71
+ * [Prompt Nodes](node-types/prompt-nodes.md)
72
+ * [Tool Nodes](node-types/tool-nodes.md)
73
+ * [App Tool Nodes](node-types/app-tool-nodes.md)
74
+ * [Junction Nodes](node-types/junction-nodes.md)
75
+
76
+ ## Edge Types
77
+ * [Step Forward](edge-types/step-forward.md)
78
+ * [Prompt Condition](edge-types/prompt-condition.md)
79
+ * [Logical Condition](edge-types/logical-condition.md)
80
+
81
+ ## Implementation Examples
82
+ * [Node Examples](implementation-examples/node-examples.md)
83
+ * [Edge Examples](implementation-examples/edge-examples.md)
84
+ * [Complete Flows](implementation-examples/complete-flows.md)
85
+
86
+ ## How-to Guides
87
+ * [Add a New Tool](how-to-guides/add-new-tool.md)
88
+ * [Listen for Events](how-to-guides/listen-for-events.md)
89
+ * [Persist Memory](how-to-guides/persist-memory.md)
90
+ * [Run from CLI](how-to-guides/run-from-cli.md)
91
+
92
+ ## API Reference
93
+ * [API Reference](https://minded-ai.github.io/mindedjs-api-referance)
94
+
95
+ ## Examples
96
+ * [Order Refund Flow](examples/order-refund-flow.md)
97
+ * [Customer Support](examples/customer-support.md)
98
+ * [E-commerce Agent](examples/e-commerce-agent.md)
99
+ ```
100
+
101
+ ## Content Distribution Guide
102
+
103
+ ### README.md (Introduction)
104
+ - Why MindedJS section
105
+ - Key features/benefits
106
+ - Brief overview
107
+ - Link to getting started
108
+
109
+ ### getting-started/quick-start.md
110
+ - The current quick start example
111
+ - Basic project setup
112
+ - First flow creation
113
+
114
+ ### core-concepts/
115
+ - Split the "Core Concepts" section into individual files
116
+ - Each concept gets detailed explanation
117
+ - Keep tables and type definitions here
118
+
119
+ ### node-types/ & edge-types/
120
+ - Detailed documentation for each type
121
+ - Implementation details
122
+ - Advanced configuration options
123
+ - Best practices for each type
124
+
125
+ ### implementation-examples/
126
+ - All the practical examples
127
+ - Code snippets
128
+ - Real-world use cases
129
+
130
+ ### api-reference/
131
+ - Complete API documentation
132
+ - Method signatures
133
+ - Parameter details
134
+ - Return types
135
+
136
+ This structure provides:
137
+ 1. **Progressive disclosure** - readers can dive deeper as needed
138
+ 2. **Easy navigation** - logical grouping of related content
139
+ 3. **Searchability** - specific topics in dedicated files
140
+ 4. **Maintainability** - easier to update specific sections
141
+ 5. **Cross-references** - ability to link between related concepts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minded-ai/mindedjs",
3
- "version": "1.0.89",
3
+ "version": "1.0.91-beta-1",
4
4
  "description": "MindedJS is a TypeScript library for building agents.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,7 +9,9 @@
9
9
  },
10
10
  "files": [
11
11
  "dist",
12
- "src"
12
+ "src",
13
+ "docs",
14
+ "docs-structure.md"
13
15
  ],
14
16
  "scripts": {
15
17
  "build": "tsc && npm run copy-templates",
@@ -64,4 +66,4 @@
64
66
  "uuid": "^11.1.0",
65
67
  "ws": "^8.15.1"
66
68
  }
67
- }
69
+ }