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

feat: add tools to the agent briefing #69

Open
pkarw opened this issue Dec 10, 2024 · 4 comments
Open

feat: add tools to the agent briefing #69

pkarw opened this issue Dec 10, 2024 · 4 comments

Comments

@pkarw
Copy link
Collaborator

pkarw commented Dec 10, 2024

Related to #68, #63

Add kind of a agent briefing - where agents present the tools they have assigned to the supervisor prior to selecting the right agent for the task. I mean in the simplest way would be to modify the prompt in selectAgent: https://github.com/callstackincubator/ai-agent-framework/blob/bf188ffffbd8fdf1eaff8a7fb488a89837b1206a/packages/framework/src/supervisor/selectAgent.ts#39

@pkarw pkarw changed the title feat: Add tools to the agent briefing feat: add tools to the agent briefing Dec 10, 2024
@pkarw
Copy link
Collaborator Author

pkarw commented Dec 11, 2024

To implement this feature we could potentially modify selectAgent:

      {
        role: 'user',
        content: s`
          Here is the task:
          <task>${agentRequest.map((request) => request.content).join(',')}</task>

          Here are the available agents:
          <agents>
            ${agents.map(
              (agent, index) =>
                `<agent index="${index}">
                  <purpose>${agent.role} - ${agent.description}</purpose>
                  <tools>
                    ${
                      agent.tools
                        ? Object.entries(agent.tools)
                            .map(
                              ([name, tool]) => `<tool name="${name}">${tool.description}</tool>`
                            )
                            .join('')
                        : ''
                    }
                 </agent>`
            )}
          </agents>

          Select the most suitable agent for this task.
        `,
      },
      ```

@grabbou
Copy link
Collaborator

grabbou commented Dec 11, 2024

An alternative approach that I would like to experiment with, is for supervisor to be able to do a roundtrip with its agents to select the task, where agents can answer with confidence (e.g. score) how good they are to accomplish this task. Post-refactor, I would see that as a tool, which can be replaced to satisfy your own requirements. Supervisor would then, talk to all the agents and be able to get an answer, who's best to deal with it (this could also take into account "business" in the future, when we allow parallelism).

@grabbou
Copy link
Collaborator

grabbou commented Dec 11, 2024

This could also in the future take past self assessments into consideration, teaching supervisor that selected agent isn't as good as it thinks (confidence)

@pkarw
Copy link
Collaborator Author

pkarw commented Dec 14, 2024

This is great idea related to #72 - kind of reinforcement training

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

No branches or pull requests

2 participants