Ask HN: Do you roll your own agent or use a framework?
I am curious if people here roll their own agents from scratch or use frameworks. I am trying to what frameworks are really working, and why. I have so far hand-rolled all of my agents, some of this is because when I first tried LangChain I was intimidated by how complex/bloated it was. It felt like writing Java while I was actually writing Python. There is also a big element of wanting a lot more control on how my agent works compared to what a framework could provide us (around context management, compacting histories if the chat gets too big etc). Having said that I am curious
1. Do you use frameworks, if so which one?
2. If you used a framework but churned, which one did you churn from and why?
3. How has the process of rolling your own framework been? How is the experience of running it in production?
7 comments
[ 3.3 ms ] story [ 26.5 ms ] threadNon-technical people have suggested using other tools like n8n or make.
Being able to write tests, use version control, and make full use of a programming language I am proficient with are perks.
It is also enshittification resistant unlike other platforms. I still might use them for something lightweight.
I have rolled my own solutions in previous roles and it worked well for very simple tasks (analyze this output and make sure it meets this criteria or try again...) I would be concerned about complexity if there were more steps, tool calls, or the need to compose multiple agents out of the same nodes, tools, state, etc...
Curious to hear more what you mean about compacting histories? Langgraph state management is simple enough and a custom reducer function gives you full control of context management...
I use the OpenAI messages spec, and have the messages be an append only list, to make it easy to reason about.
Don’t bother compacting histories imo. worse case just summarise and spin up a new agent with the context.
good luck!
You can see our framework [here](https://github.com/aurelio-labs/graphai). I don't necessarily recommend it as it's built for our use-cases and I make no guarantees for others, but it might be interesting to see what rolling your own might look like