Skip to content

Commit 70cd6f3

Browse files
Merge branch 'main' into DIGCS-1-migrate-bibucket-to-github
# Conflicts: # src/components/guides-section/consts.js
2 parents a948cb4 + 715419b commit 70cd6f3

File tree

176 files changed

+9335
-1337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+9335
-1337
lines changed

.github/workflows/claude-pr-reviewer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
- name: Check for changed files
2525
id: changed-files
26-
uses: tj-actions/changed-files@v46
26+
uses: tj-actions/changed-files@v47
2727
with:
2828
files: |
2929
docs/**

.github/workflows/sync-docs-with-mapping-config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
ref: main
3535

3636
- name: Set up Python
37-
uses: actions/setup-python@v5
37+
uses: actions/setup-python@v6
3838
with:
3939
python-version: "3.10"
4040

.github/workflows/verify-docs-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
with:
2323
persist-credentials: true
2424
- name: Install dependencies
25-
uses: actions/setup-node@v4
25+
uses: actions/setup-node@v5
2626
with:
2727
node-version: lts/*
2828
cache: npm

docs/actions-and-automations/create-self-service-experiences/security/security.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ When Port makes outbound calls (for example when using the [Webhook](/actions-an
1212

1313
Port outbound calls will originate from one of the following IP addresses:
1414

15-
```text showLineNumbers
16-
44.221.30.248, 44.193.148.179, 34.197.132.205, 3.251.12.205, 34.252.219.131, 54.75.236.107
15+
```text
16+
US - 44.221.30.248, 44.193.148.179, 34.197.132.205
17+
EU - 3.251.12.205, 34.252.219.131, 54.75.236.107
1718
```

docs/ai-interfaces/ai-agents/interact-with-ai-agents.md

Lines changed: 142 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,37 @@ curl 'https://api.port.io/v1/agent/<AGENT_IDENTIFIER>/invoke?stream=true' \\
143143
--data-raw '{"prompt":"What is my next task?"}'
144144
```
145145

146+
**Processing Quota Information:**
147+
148+
When processing the streaming response, you'll receive quota usage information in the final `done` event. Here's a JavaScript example of how to handle this:
149+
150+
```javascript showLineNumbers
151+
const eventSource = new EventSource(apiUrl);
152+
153+
eventSource.addEventListener('done', (event) => {
154+
const data = JSON.parse(event.data);
155+
156+
if (data.rateLimitUsage) {
157+
const { remainingRequests, remainingTokens, remainingTimeMs } = data.rateLimitUsage;
158+
159+
// Check if quota is running low
160+
if (remainingRequests < 10 || remainingTokens < 10000) {
161+
console.warn('Quota running low, consider rate limiting');
162+
// Implement rate limiting logic
163+
}
164+
165+
// Schedule next request after quota reset if needed
166+
if (remainingRequests === 0) {
167+
setTimeout(() => {
168+
// Safe to make next request
169+
}, remainingTimeMs);
170+
}
171+
}
172+
173+
eventSource.close();
174+
});
175+
```
176+
146177
**Using MCP Server Backend Mode via API:**
147178

148179
You can override the agent's default backend mode by adding the `use_mcp` parameter:
@@ -182,7 +213,21 @@ event: execution
182213
data: Your final answer from the agent.
183214
184215
event: done
185-
data: {}
216+
data: {
217+
"rateLimitUsage": {
218+
"maxRequests": 200,
219+
"remainingRequests": 193,
220+
"maxTokens": 200000,
221+
"remainingTokens": 179910,
222+
"remainingTimeMs": 903
223+
},
224+
"monthlyQuotaUsage": {
225+
"monthlyLimit": 20,
226+
"remainingQuota": 19,
227+
"month": "2025-09",
228+
"remainingTimeMs": 1766899073
229+
}
230+
}
186231
```
187232

188233
**Possible Event Types:**
@@ -242,11 +287,36 @@ The final textual answer or a chunk of the answer from the agent for the user. F
242287
<details>
243288
<summary><b><code>done</code> (Click to expand)</b></summary>
244289

245-
Signals that the agent has finished processing and the response stream is complete.
290+
Signals that the agent has finished processing and the response stream is complete. This event also includes quota usage information for managing your API limits.
246291

247-
```json
248-
{}
292+
```json showLineNumbers
293+
{
294+
"rateLimitUsage": {
295+
"maxRequests": 200,
296+
"remainingRequests": 193,
297+
"maxTokens": 200000,
298+
"remainingTokens": 179910,
299+
"remainingTimeMs": 903
300+
},
301+
"monthlyQuotaUsage": {
302+
"monthlyLimit": 20,
303+
"remainingQuota": 19,
304+
"month": "2025-09",
305+
"remainingTimeMs": 1766899073
306+
}
307+
}
249308
```
309+
310+
**Quota Usage Fields:**
311+
- `maxRequests`: Maximum number of requests allowed in the current rolling window
312+
- `remainingRequests`: Number of requests remaining in the current window
313+
- `maxTokens`: Maximum number of tokens allowed in the current rolling window
314+
- `remainingTokens`: Number of tokens remaining in the current window
315+
- `remainingTimeMs`: Time in milliseconds until the rolling window resets
316+
317+
:::tip Managing quota usage
318+
Use the quota information in the `done` event to implement client-side rate limiting and avoid hitting API limits. When `remainingRequests` or `remainingTokens` are low, consider adding delays between requests or queuing them for later execution.
319+
:::
250320
</details>
251321

252322
</TabItem>
@@ -339,17 +409,40 @@ We limit this data storage strictly to these purposes. You can contact us to opt
339409

340410
## Limits
341411

342-
Port applies limits to AI agent interactions to ensure fair usage across all customers:
412+
Port applies two different types of limits to AI agent interactions to ensure fair usage across all customers:
413+
414+
### Rate limits
415+
- **Query limit**: ~40 queries per hour
416+
- **Token usage limit**: 800,000 tokens per hour
417+
- These limits reset hourly
418+
419+
### Monthly quota
420+
- **Default quota**: 20 AI invocations per month
421+
- Each invocation of Port AI counts as one request against your quota
422+
- Quota resets monthly
423+
343424

344-
- **Query limit**: ~40 queries per hour.
345-
- **Token usage limit**: 800,000 tokens per hour.
346425

347426
:::caution Usage limits
348427
Usage limits may change without prior notice. Once a limit is reached, you will need to wait until it resets.
349428
If you attempt to interact with an agent after reaching a limit, you will receive an error message indicating that the limit has been exceeded.
350429
The query limit is estimated and depends on the actual token usage.
351430
:::
352431

432+
### Monitor your usage
433+
434+
You can monitor your current usage in several ways:
435+
436+
#### Rate limits
437+
- Check the final `done` event in streaming responses for remaining requests, tokens, and reset time
438+
439+
#### Monthly quota
440+
You can monitor your current monthly quota usage by making a GET request to the `/v1/quota/ai-invocations` endpoint
441+
442+
:::tip Proactive quota monitoring
443+
Check your monthly quota before making multiple AI agent requests to avoid hitting limits. When `remainingQuota` is low, consider implementing rate limiting or queuing requests until the monthly quota resets. Note that you may also encounter hourly rate limits, which are separate from this monthly quota.
444+
:::
445+
353446
## Common errors
354447

355448
Here are some common errors you might encounter when working with AI agents and how to resolve them:
@@ -448,6 +541,48 @@ Ensure that:
448541
The AI invocation entity contains the `feedback` property where you can mark is as `Negative` or `Positive`. We're working on adding a more convenient way to rate conversation from Slack and from the UI.
449542
</details>
450543

544+
<details>
545+
<summary><b>What are the usage limits and how can I know them? (Click to expand)</b></summary>
546+
547+
Port applies the following limits to AI agent interactions:
548+
- **Query limit**: ~40 queries per hour
549+
- **Token usage limit**: 800,000 tokens per hour
550+
551+
You can monitor your current usage in several ways:
552+
- Check the final `done` event in streaming responses for remaining requests, tokens, and reset time (hourly rate limits)
553+
- Make a GET request to `/v1/quota/ai-invocations` to see your monthly quota status
554+
555+
Note that Port has both hourly rate limits and monthly quotas. For detailed information, see the [Limits](#limits) section above.
556+
557+
</details>
558+
559+
<details>
560+
<summary><b>What happens when I reach a limit and what can I do? (Click to expand)</b></summary>
561+
562+
**What happens when you reach a limit:**
563+
- You are temporarily blocked from making new AI agent requests
564+
- You will receive an error message indicating which limit has been exceeded
565+
- Access resumes automatically when the limit resets
566+
567+
**What you can do:**
568+
569+
**For rate limits (hourly):**
570+
- Wait for the limits to reset (they reset every hour)
571+
- Monitor the `remainingTimeMs` field to know exactly when you can make requests again
572+
- The error message will indicate it's a rate limit issue
573+
574+
**For monthly quota:**
575+
- Wait for the monthly quota to reset at the beginning of the next month
576+
- Contact our support team to learn more about our plans and quota upgrades available for your organization
577+
- The error message will indicate it's a quota limit issue
578+
579+
**General recommendations:**
580+
- Implement rate limiting in your applications to avoid hitting limits
581+
- Monitor your usage proactively using the monitoring methods described above
582+
- Consider batching requests or optimizing your AI agent interactions for efficiency
583+
584+
</details>
585+
451586
<details>
452587
<summary><b>How is my data with AI agents handled? (Click to expand)</b></summary>
453588

docs/ai-interfaces/port-mcp-server/overview-and-installation.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,13 @@ If you encounter errors:
195195
- **Permission issues**: You may need to run with appropriate permissions
196196
:::
197197

198+
:::warning VSCode action tool issue
199+
In some versions of VS Code, the MCP server might not start or return an error in the chat because of a configuration issue with the action related tools. To deal with it, [deselect](./available-tools#select-which-tools-to-use) the tools `create_action`, `update_action`, and `delete_action`.
200+
This is relevant for cases where you see an error like this one:
201+
```
202+
Failed to validate tool mcp_port_create_action: Error: tool parameters array type must have items. Please open a Github issue for the MCP server or extension which provides this tool
203+
```
204+
:::
198205

199206
**Step 1: Configure MCP Server Settings**
200207

docs/api-reference/approve-an-action-run.api.mdx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
id: approve-an-action-run
33
title: "Approve an action run"
4-
description: "This route allows you to approve or decline a request to execute an action that requires approval.<br/><br/>To learn more about manual approval for actions, check out the [documentation](https://docs.port.io/create-self-service-experiences/set-self-service-actions-rbac/#configure-manual-approval-for-actions)."
4+
description: "This route allows you to approve or decline a request to execute an"
55
sidebar_label: "Approve an action run"
66
hide_title: true
77
hide_table_of_contents: true
8-
api: eJztWNtu4zYQ/RWCfWgCxNEm3SejKOBcgAab7hputkARGAEtjW1uJFElKSdew//eGZK6OJadS1+yQPPgSCJneOZwOBeuuBUzw/u3fBBbqXI2KnPDx0c8ARNrWdA33uc3c2mYVqUFJtJUPRi2VCWziomi0GoBTGmWQJzKHCcwDf+UYCyNwyPETipnwi9g58K6GVKDCfIiPf51oqPf3M+NYikInbNMaRSc4KosE3kp0no2m+J6Xp85YvEc4ntG0+wc2G2i4jKD3AoaHh/MrS1MP4rwszkulLbHUkWxBmGhZyCd4o9eyBh68FiAlpDHYCIDdnMwLNbTExFHP8Uqn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CBb26ETbaC9uMNkvaqfYYwuWeDxE01cJUpcdSvM+Pu69IttDW5cJbUQUxdq+EatSy93drtFP+74M98z5YNEW65PWKTEjVuOUG14ktnAiM+zYB/etvOiEbD0K7n2sKJ5d8tZoIC59Ntl7T59D0Ib9KpRWTbF+Xp2k6/0nDZ4/GN+iHzV4UalOSlPflhTCSMD8R/4tRjIov2cPdoD24qkihlk1QFd54AuvxpjTwEMPg2wCkc0FL1JN3UgSFszBjkCRQuIOy40aEHQ4u3v7O63Ii16lvkIlb7svzgFQXwW6oRqBvK54JNSt9KuFhUd+eLMnWmqHxxofG+EBqtXJxP2YGTeiX9GqdslqFwIuWuTl4P7R3RuS2kqajofboP/2jXeU=
99
sidebar_class_name: "patch api-method"
1010
info_path: api-reference/port-api
1111
custom_edit_url: null
@@ -36,7 +36,14 @@ import Heading from "@theme/Heading";
3636

3737

3838

39-
This route allows you to approve or decline a request to execute an action that requires approval.<br/><br/>To learn more about manual approval for actions, check out the [documentation](https://docs.port.io/create-self-service-experiences/set-self-service-actions-rbac/#configure-manual-approval-for-actions).
39+
This route allows you to approve or decline a request to execute an
40+
action that requires approval.<br/><br/>To learn more about manual
41+
approval for actions, check out the
42+
[documentation](https://docs.port.io/create-self-service-experiences/set-self-service-actions-rbac/#configure-manual-approval-for-actions).
43+
:::info Version parameter value
44+
Set the `version` parameter to `v2` for the latest version of the API.
45+
:::
46+
4047

4148
<Heading
4249
id={"request"}
@@ -47,7 +54,7 @@ This route allows you to approve or decline a request to execute an action that
4754
</Heading>
4855

4956
<ParamsDetails
50-
parameters={[{"schema":{"type":"string","enum":["v1","v2"]},"in":"query","name":"version","required":false},{"schema":{"type":"string"},"in":"path","name":"run_id","required":true,"description":"The identifier of the action run."}]}
57+
parameters={[{"schema":{"type":"string","enum":["v1","v2"]},"in":"query","name":"version","required":false,"description":"Specifies the API version to use. Please use `v2` for the latest version of the API."},{"schema":{"type":"string"},"in":"path","name":"run_id","required":true,"description":"The identifier of the action run."}]}
5158
>
5259

5360
</ParamsDetails>

0 commit comments

Comments
 (0)