https://www.boundaryml.com logo
🟡 Request for Code Generation and Execution Examp...
# questions
s
Hello BAML team . Do you have any examples/reference implementation on how to generate code using baml, run it, and then extract the results of the run via a dynamic schema or similar that i can pass it back into the agent loop.
a
Baml code or Python/TS code?
s
thaks, will have a look at it...all of our agent baml client is generated in go. but happy yo have the generated code in python, which is likely what llm's have most in distribution, that i can run with limited libraries (mostly excel, pandas) in either a dedicated isolated docker container or some sort on command exec with very limited resources
v
https://github.com/ai-that-works/ai-that-works/tree/main/2026-02-03-prompting-is-becoming-a-product-surface this is a slightly more complete example as well! video will be live monday morning!!
s
sorry...my term "generate code" was probably ambiguous in a BAML context. I was talking about a BAML function that will have the LLM generate python code that I could then extract , run in isolation somehow, take the results (including errors etc) , use another BAML function to parse out results as structured output and then continue think of it as a mini coding agent requirement.
v
ah, for that its still very similar to the example i shared. instead of a schema, you just prompt it to generate python code
s
lol lol lol..this is so good. we have a form builder built into our product for supplier surveys. in the next iteration we were thinking of an initial text -> llm -> forms interface . this makes it one more step closer.
5 Views