https://www.boundaryml.com logo
Wanted to check regarding how to tackle
# questions
t
Wanted to check regarding how to tackle a problem where too many agent nodes are there using BAML. Similar to langgraph or any graph execution framework.
v
Could you articulate what you mean?
So in this example the application main thread is actually doing some sort of orchestration of these A,B and C agents based on there responses
r
They each have a prompt that gets executed… seems like BAML plugs in to orchestrate those prompts? What’s different about this use case?
t
@Vaibhav (BAML 🐑) / @aaronv (BAML) any thoughts ?
@rjurney How BAML plugs in to orchestrate ?
r
Look at the tools documentation
t
Tool calling seems just limited to one of the blocks that i have mentioned in the above images (A1…C1) So i agree using tool calling we might be able to achieve both of the above architectures (2 images above) but we have to write some graph/workflow executor code which will interact with A1…C1
r
Each agent can have its own BAML prompt... the types are shared across all files, which is powerful. You can use the same types in a different prompt, with differing other classes, in different agents in Python. You call your baml_client asynchronously to make each one act. You message pass however you're doing that - A2A is one way.
What I described above can work for your router - there is a demo of one of those in the tools/function calling documentation. BAML doesn't orchestrate multi-agent workflows, but you can use the BAML client
baml-cli generate
generates in Python, Ruby or Typescript to build as many agents as you want. They can take the result from the LLM and pass it to other agents however you want. They can use A2A messages or query results from MCP to parameterize more BAML calls.