Skip to content

feat: Agents SDK documentation #1533

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

feat: Agents SDK documentation #1533

wants to merge 2 commits into from

Conversation

Prat011
Copy link
Collaborator

@Prat011 Prat011 commented Apr 9, 2025

No description provided.

Copy link

vercel bot commented Apr 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
composio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 13, 2025 6:12pm

Copy link

Review Summary

Skipped posting 3 drafted comments based on your review threshold. Feel free to update them here.

Draft Comments
fern/frameworks/openai-agents.mdx:18-18
The code block is incorrectly labeled as `bash Python` instead of just `python`, which may cause syntax highlighting issues.

Scores:

  • Production Impact: 1
  • Fix Specificity: 5
  • Urgency Impact: 1
  • Total Score: 7

Reason for filtering: The comment addresses a minor syntax highlighting issue with code block language specification that has minimal production impact and low urgency.

Analysis: This comment addresses incorrect code block language specification (bash Python vs python). While the fix is very specific and straightforward, it only affects documentation syntax highlighting and has no impact on actual code functionality or production systems. This is a cosmetic documentation issue with very low urgency.

fern/frameworks/openai-agents.mdx:12-12
The code block for installing packages is incorrectly labeled as `bash Python` instead of just `bash` or `python`.

Scores:

  • Production Impact: 1
  • Fix Specificity: 5
  • Urgency Impact: 1
  • Total Score: 7

Reason for filtering: The issue is a minor documentation formatting error with minimal impact on functionality

Analysis: This is a minor markdown formatting issue in documentation where a code block has an incorrect language tag. While the fix is very specific and clear, it has no impact on production functionality and very low urgency. The total score of 7 is well below the threshold of 14 required to keep the comment.

fern/frameworks/openai-agents.mdx:40-42
The documentation mentions `GEMINI_API_KEY` in the environment variables tip, but there's no reference to Gemini in the code or explanation of why it's needed.

Scores:

  • Production Impact: 3
  • Fix Specificity: 5
  • Urgency Impact: 4
  • Total Score: 12

Reason for filtering: The comment identifies a documentation inconsistency that could cause user confusion

Analysis: The bug identifies a documentation error where GEMINI_API_KEY is mentioned but not used in the code. This could cause user confusion and failed implementations (production_impact: 3). The fix is very clear and directly applicable (fix_specificity: 5). The urgency is high as documentation errors directly impact user experience (urgency_impact: 4). Total score is 12, which is below the threshold of 14, but the issue should still be addressed.

Comment on lines +35 to +38
```python Python
request = toolset.initiate_connection(app=App.GITHUB)
print(f"Open this URL to authenticate: {request.redirectUrl}")
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The toolset variable is used in line 36 but it's initialized as composio_toolset in line 25, causing a reference error.

📝 Committable Code Suggestion

‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
```python Python
request = toolset.initiate_connection(app=App.GITHUB)
print(f"Open this URL to authenticate: {request.redirectUrl}")
```
```python Python
request = composio_toolset.initiate_connection(app=App.GITHUB)
print(f"Open this URL to authenticate: {request.redirectUrl}")
</details>
<!-- suggestion_end -->

Comment on lines +18 to +26
```bash Python
import asyncio
import dotenv
from agents import Agent, Runner
from composio_openai_agents import Action, ComposioToolSet

# Initialize Composio toolset
composio_toolset = ComposioToolSet()
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The App class is used in lines 36 and 48 but is not imported in the code examples, causing a NameError.

📝 Committable Code Suggestion

‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
```bash Python
import asyncio
import dotenv
from agents import Agent, Runner
from composio_openai_agents import Action, ComposioToolSet
# Initialize Composio toolset
composio_toolset = ComposioToolSet()
```
```bash Python
import asyncio
import dotenv
from agents import Agent, Runner
from composio_openai_agents import Action, ComposioToolSet, App
# Initialize Composio toolset
composio_toolset = ComposioToolSet()
</details>
<!-- suggestion_end -->

Copy link
Contributor

github-actions bot commented Apr 9, 2025

@alt-glitch
Copy link
Collaborator

@Prat011 approved. just check if the PR reviews are relevant and merge.

Copy link
Contributor

Copy link

Review Summary

Skipped posting 5 drafted comments based on your review threshold. Feel free to update them here.

Draft Comments
fern/authentication/connection.mdx:59-67
There's a duplicate code block in the Python example for initiating a connection. The `toolset.execute_action()` call appears twice with almost identical parameters, which is likely unintentional and confusing for users.

Scores:

  • Production Impact: 2
  • Fix Specificity: 5
  • Urgency Impact: 2
  • Total Score: 9

Reason for filtering: The total score is below the required threshold of 14 for inclusion

Analysis: This is a documentation issue with duplicate code examples that may confuse users but won't cause production failures. The fix is very clear and specific, simply removing the duplicate code block. However, this is a low urgency issue as it's in documentation and doesn't affect system functionality.

fern/frameworks/anthropic.mdx:16-18
The TypeScript code block is empty, which makes the CodeGroup component incomplete. This should either be filled with appropriate TypeScript installation instructions or removed.

Scores:

  • Production Impact: 1
  • Fix Specificity: 5
  • Urgency Impact: 2
  • Total Score: 8

Reason for filtering: The comment addresses a minor documentation issue with an empty code block that has low production impact and urgency.

Analysis: The issue is about an empty TypeScript code block in documentation. While the fix is very specific (adding npm install command), this has minimal production impact as it's purely documentation-related. Documentation completeness is important but not urgent, and users can likely still understand the content without this specific code block. Total score of 8 is below the required threshold of 14.

fern/frameworks/anthropic.mdx:6-22
The documentation is incomplete as it only contains installation instructions but doesn't show how to actually use Claude 3.7 Sonnet to star a GitHub repository as promised in the introduction.

Scores:

  • Production Impact: 1
  • Fix Specificity: 4
  • Urgency Impact: 2
  • Total Score: 7

Reason for filtering: The total score is below the required threshold of 14 for inclusion.

Analysis: This comment identifies missing usage instructions in documentation, which has minimal production impact (1) as it doesn't affect functionality. The fix is fairly specific (4) as it's clear what needs to be added. The urgency is low (2) as documentation issues don't break functionality. With a total score of 7, this falls below the required threshold of 14 for inclusion.

js/Makefile:10-17
The `clean` and `clean_build` targets have duplicate functionality. The `clean_build` target should depend on `clean` rather than duplicating its command.

Scores:

  • Production Impact: 1
  • Fix Specificity: 5
  • Urgency Impact: 1
  • Total Score: 7

Reason for filtering: The issue is a minor code organization improvement with no production impact. It's about removing duplicate code in a Makefile by having clean_build depend on clean instead of duplicating the rm command. This is a code quality improvement that doesn't meet the high threshold for inclusion.

Analysis: This comment addresses duplicate code in Makefile targets, which is a code organization issue. While the fix is very specific and easy to implement (5), it has minimal production impact (1) as both implementations work correctly. The urgency is very low (1) as this is purely a maintenance improvement. Total score of 7 falls well below the required threshold of 14.

python/plugins/livekit/composio_livekit/toolset.py:96-141
The `execute_action_wrapper` function returns JSON string but its annotation indicates it returns `Dict[str, Any]`. This type mismatch could cause issues with type checking or runtime behavior.

Scores:

  • Production Impact: 4
  • Fix Specificity: 5
  • Urgency Impact: 4
  • Total Score: 13

Reason for filtering: The comment identifies a legitimate type mismatch that could cause issues with type checking or runtime behavior

Analysis: The type mismatch between the function's return annotation (Dict[str, Any]) and actual return value (str) could cause type checking errors and potential runtime issues when other code expects a dictionary but receives a JSON string. The fix is clear and specific, changing the return type annotation from Dict[str, Any] to str. While this won't immediately crash production, it could lead to subtle bugs and integration issues. The total score is 13, which is below the threshold of 14, but the issue is still significant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants