https://www.boundaryml.com logo
BAML is so awesome. I can't believe I
# general
b
BAML is so awesome. I can't believe I didn't know about it until now. It's SO much better than LangChain/AutoGPT etc. Actually I never wanted a "plug and play" agent module, BAML is what I really wanted all along, but since the field is so new so we are still all figuring out what the right abstractions are. The BAML team really nailed it. Making a DSL seems like the right way to start approaching this.
a
Thanks for the kind words. How'd you hear about BAML?
we have a tonnn of things coming
b
a
sweet, ty!
we should probably post more on reddit hah
b
BAML feels like what LangChain users actually want. Not to throw shade on Harrison, but I feel like actually using his framework doesn't align with how he presents it as this very modular thing. Using LangChain feels nothing like modular, or even low-level. The things we wanted to be modular and transparent are all abstracted away, and the things we don't care about is up to us to configure and write rigid boilerplate. BAML is what we really want. I'm currently working on integrating BAML functions with LangGraph nodes and using LangSmith for observability. I could totally see LangChain just getting abandoned, and instead LangGraph could be like a meta-framework on top of BAML to build agents, and then LangSmith for observability (their platform is much more mature than the BoundaryML) DSPy for fine-tuning and prompt-optimization I feel like these 3 technologies should merge. I'm wondering how BoundaryML will make money unless you make an observability platform that is better than LangSmith. Maybe there is another way to make money that is more closely related to developing the DSL too, but what do I know.
BAML = Low level modular prompting LangGraph = Orchestration LangSmith = Observability + build data set BAML = use data set from LangSmith to manually optimize prompt OR... DSPy integrating with BAML somehow. I see a workflow where BAML functions are written with simple tests initially, but that some workflow eventually would get you to use the real production data as test cases. LangSmith seems like a very good platform for building the production data set for testing
If you can nail this transition from manual written tests to production data set testing in the BoundaryML observability platform, I think you struck gold. I like to start out by writing the test just in my local editor with the vs code plugin. But it would be so cool to be able to "debug" an agent workflow step by step using real production data as test cases, and then modify the prompt in a specific step until it outputs the right thing consistently
Btw i'm a front-end dev+designer with a lot of experience, looking for a remote job I would love to work on building the BoundaryML observability platform UX Full plug: http://segefjord.space https://consult.segefjord.space
I'm just blurting out a brainstorm here, don't mind me DSPy is awesome for throwing out the idea of manually writing prompts at the production level. The workflow should be: start by writing manual test cases in the BAML file. Then eventually move onto production and use an observability tool to collect example cases which is fed into DSPy to then automatically optimize the prompt for production So my idea is to integrate DSPy for automatic prompt-optimization way beyond manually tweaking inside of VS-code (although that method is really perfect to get a starting point). I also see this as a perfect use-case of a commercial product offering that sits on top of the DSL
Which could be integrated with client-swapping too, maybe we could have DSPy do that heavy lifting
v
^you've basically nailed what we expect to be building and releasing 🙂
this is such a cool perspective to see you arrive at naturally as well!
wehre di you first hear about BAML btw?
a
They mentioned above it was on reddit
v
dumb i was just excited reading through the messages haha
a
Ill let you know how to apply!
Also id love to get your feedback on our langgraph alternative. Will let you know more details soon
b
... Can i know about the details... NOW? I'm litteraly building something with LangGraph today
And yes. It's a remote job web scraper. I was supposed to apply for jobs, now I'm doing this... of course
Yea as I was writing it, I was realizing it's probably exactly what you are working on anyway. There is just a lot to build still, especially for the commercial platform I see nailing the UX/DX as really crucial. But I think you really did a great job by creating a DSL as the foundation beneath any abstractions we put on top. It's easy to see at a high level where to go, but actually figuring out how to make it happen at the concrete level is hard.
a
details will come sooon!
s
Oh boy, I can't wait to see this.
k
Have you seen [Tensorzero](https://github.com/tensorzero/tensorzero) ? I think it is really close to what you are building. The idea behind Tensorzero is to think of LLM apps as partially observable Markov decision processes ([here is the Tensorzero blog post explaining it](https://www.tensorzero.com/blog/think-of-llm-applications-as-pomdps-not-agents/)). It's Apache 2 licensed and written in Rust. They also think the interface between applications and LLMs should be functions. between application variables. I believe they also use Minijinja for templating. However, since they use TOML files and JSON schemas for defining the functions and an HTTP API for calling the functions the developer experience with BAML is so much better. Also no schema aligned parsing. Would be really amazing to combine BAML and Tensorzero
[Burr](https://burr.dagworks.io/) is an amazing alternative to LangGraph (pinging @broken💎shaders ). It has a really polished DX. It has tracing, state persistence, visualization and debugging. You can gather data from executions for evaluations and [generate tests with pytest](https://burr.dagworks.io/examples/guardrails/creating_tests/). Here's a nice [blog post about test driven development for LLM apps](https://blog.dagworks.io/p/test-driven-development-tdd-of-llm) from the developers. Is your LangGraph alternative language-agnostic?
b
Thank you so much @kskyten this is awesome
a
@kskyten hadn't heard of tensorzero, thanks for sharing. LLM as functions is the best abstraction. And the DX in tensorzero does seem painful. We hope to do this 100x better. What we're working on is our answer to orchestration, then we will focus more on evals.
b
Orchestration > evals Can't wait to see what you cooked up 💯 Rather take your time and get it right than ship too fast And yes YC gang there is such a thing as shipping too fast
c
Wow @broken💎shaders , I'm moving towards almost this exact stack, except self-hosted Arize Phoenix for (OSS) for observability: BAML = Low level modular prompting (for LangGraph nodes and for evals w/ LLM judges) LangGraph = Orchestration Phoenix = Observability (though I needed to build my own simple OTel tracer for BAML+LangGraph, standard LangGraph tracer didn't extend well to tracing BAML functions inside nodes) DSPy = Prompt optimization A BAML-native workflow definition tool / LangGraph alternative would call my attention, but to actually move logic to it I'd need to see integration w/ other tools/protocols (at least OpenInference tracing and AG-UI/CopilotKit to integrate agents with the application layer). What I feel is mostly missing in BAML right now is the ability to define test cases via a file for a proper BAML-native Evals infra. I'm almost building a custom tool to generate BAML test cases based on a file haha
a
I'm interested in what you'd like to see for test cases -- if you can expand on that or create a github issue it'd help us! Especially what kind of testing flow would be ideal for you
c
But honestly, BAML has the potential to remove LangGraph and DSPy from this stack haha Since Boundary's paid offering is an observability tool I don't expect much work making it play nice with OpenInference natively, but thats ok
I'd like to easily pick a dataset of records from my production traces and run them through different Eval judges defined in BAML. What I can currently do is build this eval infra in a GPL, but then I can't use any of the BAML-native
test
functionality.
We're stressing this out this quarter, I'd be down to opening an Issue to discuss this when the pains are clearer in the next few weeks 🙂
a
sounds good! Happy to meet as well if that's faster, but yeah let me know. We're working on customers closely to solve these kinds of problems
b
After actually working with BAML for a while now, I also arrived to the conclusion that no frameworks are needed. I don't see any value in LangGraph anymore. However it would be awesome with an orchestration framework that turns state into an event-stack like in the most recent podcast episode.
It was really awesome of Anders to share parts of his code - I just wish I could look at his repo to get better understanding, especially since I never used
effect.ts
before so it added some overhead to comprehension, but I would love to learn to replicate his system, seemed extremely powerful
v
Soon TM 😉
b
Thanks for the episode! 12 factor agents, BAML, what Anders demoed for event-driven orchestration - this is where it's at in 2025 🔥
c
Interesting take, @broken💎shaders ! TBH I feel that for solo projects or core app functionality, orchestration frameworks are indeed overrated. But when working on an AI platform where multiple dev teams need a happy path to develop and deploy AI agents, frameworks like LangGraph provide convenient abstractions and integrations (human in the loop, durable execution, data persistence layer, etc.). But using LangGraph w/ the LangChain llm primitives makes extremely bloated string-based code, and that's where BAML shines rn 🙂
b
I don't have experience working on AI projects in big dev teams! I would love to though, I'm currently looking for opportunities to work on. Did you watch the most recent episode of AI that works? Vaibhav got Anders from Sagekit on to talk about event-driven state management and the benefits over the "mutate a global state object"-approach (LangGraph etc.) - it got me very interested to learn
effect.ts
!
I have to applaud the BAML team for taking on the "no frameworks" approach. If you were using JQuery in the early days of frontend, your mind would get polluted with the wrong abstractions and make it harder for you to invent something like React or Svelte. I feel like that's where we're at with agents. LangGraph is JQuery. It just get's in the way of the better abstractions we really want to make.
This is the code for my current browser agent loop, no frameworks, just raw dogging some Python basic logic, it's really not that bad:
Copy code
python
browser_actions: dict[BrowserActions, Callable] = {
  BrowserActions.Navigate: browser_agent_navigate,
  BrowserActions.Click: browser_agent_click,
  BrowserActions.FINISHED: browser_agent_finish,
}

async def browser_agent(
  state: BrowserAgentState,
  goal: str,
  instructions: str | None = None,
  vision: bool = False
) -> BrowserFinished | None:
  STEP_COUNT = 0
  while STEP_COUNT < 30:
    STEP_COUNT += 1

    try:
      b64_screen = None
      if vision is True:
        from baml_py import Image
        from agent import vision as screen_vision
        b64_screen = Image.from_base64(
          "image/png",
          await screen_vision.capture_screen_b64(page, debug=True),
        )

      agent_step = await b.BrowserAgent(
        instructions=instructions,
        goal=goal,
        events = state.events.promptify_history(),
        location = page.url,
        html = await DOMSnapshot(page),
        screenshot=b64_screen,
      )

      taking_actions = [f"{call.action.value}({call.action_params})" for call in agent_step.invoke_actions]

      state.events.add(dedent(f'''
        (AgentID=BrowserAgent) invoking actions: {
          taking_actions
        }, reason: "{
          agent_step.reasoning.final_reason
        }", prediction/expectation: "{
          agent_step.reasoning.prediction
        }"
      ''').strip())
      
      for call in agent_step.invoke_actions:
        action_fn = browser_actions[call.action]
        await action_fn(call.action_params, state)

        match call.action_params:
          case BrowserFinished():
            return call.action_params

    except:
      print("Failed step, retrying...")
a
Thanks for the kind words 🙂