Skip to content
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

Integrating Tools from other frameworks into CaptainAgent #310

Merged
merged 12 commits into from
Dec 29, 2024
Merged

Conversation

LeoLjl
Copy link
Collaborator

@LeoLjl LeoLjl commented Dec 29, 2024

This PR integrates tools from other platforms into CaptainAgent. This is achieved through interoperability. For developers, they need to modify only one line for defining CaptainAgent instance. For example:

# assume that ag2_tool is a Tool instance
captain_agent = CaptainAgent(
    name="captain_agent",
    llm_config=llm_config,
    code_execution_config={"use_docker": False, "work_dir": "groupchat"},
    agent_lib="captainagent_expert_library.json",
    tool_lib=[ag2_tool],  # The main difference lies here: we pass the converted tool to the agent
    agent_config_save_path=None,
)

The only difference is to pass a list of AG2 Tools into tool_lib, this will let equip all the agents created within nested chat with the AG2 tools, and they can use python code to call the relevant tools without the need to defining it in the code.

Why are these changes needed?

Related issue number

This PR closes #307

Checks

Copy link
Collaborator

@skzhang1 skzhang1 left a comment

Choose a reason for hiding this comment

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

LGTM

@LeoLjl LeoLjl added this pull request to the merge queue Dec 29, 2024
Merged via the queue into main with commit 07a3d25 Dec 29, 2024
203 of 211 checks passed
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