AI & ML
Trails - Jac Hacks SF
tirthsuba15 Dev.to (EN Zone)
7 views
Building Trails at JacHacks SF
Team: Tirth Suba and Aarnav Gutti
At JacHacks SF, we built Trails, a research system inspired by how ants find food.
Ants leave chemical trails behind them. Useful paths get stronger as more ants use them, while bad paths slowly fade away. We wanted to see if AI agents could coordinate in a similar way.
The Idea
Trails gives five AI agents a graph containing 40 pieces of evidence related to a research question.
Instead of constantly messaging each other, the agents explore the graph and leave trails on useful connections. Other agents can see those trails and use them to decide where to go next.
As more agents find a connection useful, that path becomes stronger. Paths that are not useful fade over time.
At the end, Trails creates an evidence map. Strong research paths are easy to spot, and users can click on them to see the full evidence chain, including the sources and scores behind it.
How the Agents Work
One challenge was making sure five agents could search at the same time without interfering with each other.
We split the process into two parts. First, each agent looks at the available paths and proposes its best next move. After every agent has made a choice, those moves are applied in a fixed order.
The trails then fade slightly after each round. This means a path has to stay useful if it wants to remain important.
This setup allowed the agents to work together without directly communicating.
Where AI Was Used
We used the AI model for three main things:
Creating different search angles.
Scoring how relevant each piece of evidence was.
Explaining the strongest path once it was found.
The evidence scores were saved, so the model only had to score them once. After that, most of the graph search could run without repeatedly calling the model.
Building With Jac
Jac worked well for our project because Trails depends heavily on graphs.
Our evidence is stored in the graph, and the connections between evidence change as the agents explore. Jac made working with that structure much easier.
It also helped with saving and reloading our data, and it made exposing the project through an API easier than building everything manually.
Problems We Ran Into
The strangest issue we faced was what we called the zombie server.
Sometimes we would stop a server and start a new one, but the old server would still be running in the background. We would test new code and get old results, which made it seem like our changes were broken.
We also ran into Jac version issues. One install command gave us a version that did not support some of the features we needed, so everyone had to make sure they were using the same version.
Another problem was a silent .env failure where our API keys were not loading correctly. We ended up loading them manually to make sure the program would not crash.
Some error messages were also confusing until we realized that certain cleanup commands had not been run.
What We Learned
The biggest thing we learned was that AI agents do not always need to talk directly to each other.
They can coordinate through a shared environment.
In Trails, that shared environment is the graph. One agent can strengthen a useful path, and another agent can discover and follow it later.
We would use Jac again for projects involving graphs or multiple agents because those were the areas where it helped us the most.
Trails started with a simple question: What if AI agents worked together the way ants do?
Instead of only showing a final answer, Trails shows how the agents got there, which evidence mattered, and which research paths became the strongest.
Read original: https://dev.to/tirthsuba15/trails-jac-hacks-sf-2jcl
← Previous
Benchmarking My MCP Security Scanner: 14 of 14 Findings, Zero False Positives
Next →
Understanding Cordis: The TypeScript Framework Built for Hot-Swapping Everything
Related
I let an AI make phone calls, then took the word "booked" away from it
AI & ML
1
DEV Community
The LLM security failure that doesn't raise an error is the one that costs you
AI & ML
1
DEV Community
Web app that turns Chess games (PGN) into a dark fantasy battle
AI & ML
3
Reddit r/webdev
I don't write the code. I drive the bus.
AI & ML
1
Dev.to (EN Zone)
Comments0
No comments yet — be the first