Skip to content

Add documentation for agents #55

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

Merged
merged 3 commits into from
Feb 13, 2025
Merged

Add documentation for agents #55

merged 3 commits into from
Feb 13, 2025

Conversation

guillaq
Copy link
Collaborator

@guillaq guillaq commented Feb 13, 2025

Set the docstring for agents. Also fix the types so that cursor knows that agent functions are available on all agents

Screenshot 2025-02-13 at 9 26 35 AM Screenshot 2025-02-13 at 9 29 06 AM

Copy link
Contributor

@pierrevalade pierrevalade left a comment

Choose a reason for hiding this comment

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

I really like these changes. I think having a consistent @agent decorator and then using .run or .stream on the agent class instance is much clearer, and allows for more flexibility (for the same agent, you can decide to stream, or not, at the run-level).

I'll work on updating the SDK documentation accordingly, also.

# It is possible to call the run function directly to get a run object if needed
run = await agent.run(CallFeedbackInput(...))
# Or the stream function to get a stream of run objects (see below)
chunks = [chunk async for chunk in agent.stream(CallFeedbackInput(...))
Copy link
Contributor

Choose a reason for hiding this comment

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

@guillaq could you please clarify how to print the chunk as they arrive?

Copy link
Contributor

Choose a reason for hiding this comment

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

actually, I think I've got it. Let me try! :)

@guillaq guillaq merged commit 6969157 into main Feb 13, 2025
5 checks passed
@guillaq guillaq deleted the guillaume/update-agent-doc branch February 13, 2025 20:18
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