Skip to content

[Feat]: Support serving dynamic multiple agents requests #134

@richardanaya

Description

@richardanaya

Is your feature request related to a problem? Please describe.

We have a support for single agent request handler, but would be great to support request handling for multiple agent endpoints. This can be useful because agent behavior can be determined based on runtime configuration retrieval rather than explicit code.

Examples:

  • "I want to be able to restrict certain agents for certain users"
  • "I want to be able to to have agents run with certain behavior for certain users"

Describe the solution you'd like

Something like:

export class DynamicAgentRequestHandler implements A2ARequestHandle

Many of it's components would be dynamic based on the URL route.

Right now the library seems very oriented toward singular static agents written in code. We could have it by dynamic like:

const requestHandler = new DynamicAgentRequestHandler(
  async (route) => (route.url.includes("hello")) ? helloAgentCard : goodbyeAgentCard,
  async (route) =>  new InMemoryTaskStore(),
  async (route) => (route.url.includes("hello")) ? helloAgentExecutor: goodbyeAgentExecutor
);

Describe alternatives you've considered

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions